forked from integrated_whb/integrated_whb
Merge remote-tracking branch 'origin/dev' into dev
commit
65590d7490
|
|
@ -1,5 +1,6 @@
|
|||
package com.zcloud.controller.assignedManage;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
|
@ -7,16 +8,16 @@ import com.zcloud.service.assignedManage.AssignedManageService;
|
|||
import com.zcloud.service.freighttrailer.FreightTrailerService;
|
||||
import com.zcloud.service.operatingvehicles.OperatingVehiclesService;
|
||||
import com.zcloud.service.system.ImgFilesService;
|
||||
import com.zcloud.service.taxationManage.TaxationManageService;
|
||||
import com.zcloud.util.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.util.CollectionUtils;
|
||||
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.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/assignedmanage")
|
||||
|
|
@ -25,9 +26,6 @@ public class AssignedManageController extends BaseController {
|
|||
@Autowired
|
||||
private AssignedManageService assignedManageService;
|
||||
|
||||
@Autowired
|
||||
private Smb smb;
|
||||
|
||||
@Autowired
|
||||
private ImgFilesService imgfilesService;
|
||||
|
||||
|
|
@ -37,100 +35,163 @@ public class AssignedManageController extends BaseController {
|
|||
@Autowired
|
||||
private FreightTrailerService freightTrailerService;
|
||||
|
||||
/**新增
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/add")
|
||||
@RequestMapping(value = "/add")
|
||||
@ResponseBody
|
||||
public Object add() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object add() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("ASSIGNED_ID", this.get32UUID()); //车船税主键
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("ASSIGNED_ID", this.get32UUID()); //车船税主键
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("ASSIGNED_DATE", pd.get("TRANSACTION_DATE"));
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pd.put("VEHICLE_TYPE",pd.get("ASSIGNED_VEHICLE_MODEL"));
|
||||
pd.put("NOW_CONTACT_NUMBER",pd.get("NOW_OWNERS_NUMBER"));
|
||||
pd.put("VEHICLE_TYPE", pd.get("ASSIGNED_VEHICLE_MODEL"));
|
||||
pd.put("NOW_CONTACT_NUMBER", pd.get("NOW_OWNERS_NUMBER"));
|
||||
assignedManageService.save(pd);
|
||||
PageData pageData = assignedManageService.findById(pd);
|
||||
String vehicle = pageData.getString("RAW_PLATE_NUMBER");
|
||||
PageData pd2 = new PageData();
|
||||
pd2.put("CORPINFO_ID", pd.get("CORPINFO_ID"));
|
||||
pd2.put("ID", vehicle);
|
||||
List<PageData> vehicleInfo = freightTrailerService.vehicleList(pd2);
|
||||
if ("1".equals(vehicleInfo.get(0).get("TRAFFIC_TYPE") + "")) {
|
||||
// 营运车辆
|
||||
PageData operating = new PageData();
|
||||
operating.put("CORPINFO_ID", pd.get("CORPINFO_ID"));
|
||||
operating.put("OPERATING_ID", vehicleInfo.get(0).get("ID"));
|
||||
operating.put("ISASSIGNED", "1");
|
||||
operatingVehiclesService.setAssinedStatus(operating);
|
||||
} else if ("2".equals(vehicleInfo.get(0).get("TRAFFIC_TYPE") + "")) {
|
||||
// 货运挂车
|
||||
PageData freightTrailer = new PageData();
|
||||
freightTrailer.put("CORPINFO_ID", pd.get("CORPINFO_ID"));
|
||||
freightTrailer.put("FREIGHTTRAILER_ID", vehicleInfo.get(0).get("ID"));
|
||||
freightTrailer.put("ISASSIGNED", "1");
|
||||
freightTrailerService.setAssinedStatus(freightTrailer);
|
||||
}
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**删除
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
@RequestMapping(value = "/delete")
|
||||
@ResponseBody
|
||||
public Object delete() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
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());
|
||||
pd.put("DELETORNAME", Jurisdiction.getUsername());
|
||||
pd.put("DELETORNAME", Jurisdiction.getName());
|
||||
pd.put("DELETTIME", DateUtil.date2Str(new Date()));
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
PageData assignedInfo = new PageData();
|
||||
assignedInfo.put("ASSIGNED_ID", pd.get("ASSIGNED_ID"));
|
||||
assignedInfo.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
PageData pageData = assignedManageService.findById(assignedInfo);
|
||||
String vehicle = pageData.getString("RAW_PLATE_NUMBER");
|
||||
PageData pd2 = new PageData();
|
||||
pd2.put("CORPINFO_ID", pd.get("CORPINFO_ID"));
|
||||
pd2.put("ID", vehicle);
|
||||
List<PageData> vehicleInfo = freightTrailerService.vehicleList(pd2);
|
||||
if ("1".equals(vehicleInfo.get(0).get("TRAFFIC_TYPE") + "")) {
|
||||
// 营运车辆
|
||||
PageData operating = new PageData();
|
||||
operating.put("CORPINFO_ID", pd.get("CORPINFO_ID"));
|
||||
operating.put("OPERATING_ID", vehicleInfo.get(0).get("ID"));
|
||||
operating.put("ISASSIGNED", "0");
|
||||
operatingVehiclesService.setAssinedStatus(operating);
|
||||
} else if ("2".equals(vehicleInfo.get(0).get("TRAFFIC_TYPE") + "")) {
|
||||
// 货运挂车
|
||||
PageData freightTrailer = new PageData();
|
||||
freightTrailer.put("CORPINFO_ID", pd.get("CORPINFO_ID"));
|
||||
freightTrailer.put("FREIGHTTRAILER_ID", vehicleInfo.get(0).get("ID"));
|
||||
freightTrailer.put("ISASSIGNED", "0");
|
||||
freightTrailerService.setAssinedStatus(freightTrailer);
|
||||
}
|
||||
assignedManageService.delete(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
/**修改
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/edit")
|
||||
@RequestMapping(value = "/edit")
|
||||
@ResponseBody
|
||||
public Object edit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object edit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); // 修改人名字
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
String expireDate = pd.getString("EXPIRE_DATE");
|
||||
String day = DateUtil.getDay();
|
||||
boolean flag = DateUtil.compareDate(expireDate, day);
|
||||
if(flag) {
|
||||
pd.put("EXPIRE_STATUS","expirestatus_01");
|
||||
}else{
|
||||
pd.put("EXPIRE_STATUS","expirestatus_02");
|
||||
if (DateUtil.compareDate(expireDate, day)) {
|
||||
pd.put("EXPIRE_STATUS", "expirestatus_01");
|
||||
} else {
|
||||
pd.put("EXPIRE_STATUS", "expirestatus_02");
|
||||
}
|
||||
assignedManageService.edit(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
/**去修改页面获取数据
|
||||
|
||||
/**
|
||||
* 去修改页面获取数据
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/goEdit")
|
||||
@RequestMapping(value = "/goEdit")
|
||||
@ResponseBody
|
||||
public Object goEdit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object goEdit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pd = assignedManageService.findById(pd);
|
||||
|
||||
if (StringUtils.equals(pd.getString("TYPE"), "2")) {
|
||||
pd.put("ENGINE_NUMBER", "--");
|
||||
pd.put("POWER_TYPE", "--");
|
||||
pd.put("EMISSION_STANDARD", "--");
|
||||
}
|
||||
PageData pd2 = new PageData();
|
||||
pd2.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
||||
pd2.put("ID", pd.get("RAW_PLATE_NUMBER"));
|
||||
List<PageData> pageData = freightTrailerService.vehicleList(pd2);
|
||||
pd.put("PLATE_NUMBER", pageData.get(0).get("PLATE_NUMBER"));
|
||||
pd.put("FOREIGN_KEY", pd.getString("ASSIGNED_ID"));
|
||||
pd.put("TYPE",120);
|
||||
pd.put("TYPE", 120);
|
||||
List<PageData> nowVehicleOperationCertificateImgs = imgfilesService.listAll(pd);//车头照片
|
||||
pd.put("TYPE",121);
|
||||
pd.put("TYPE", 121);
|
||||
List<PageData> nowDrivinglicenseImg = imgfilesService.listAll(pd);//行驶证照片
|
||||
map.put("nowVehicleOperationCertificateImgs", nowVehicleOperationCertificateImgs);
|
||||
map.put("nowDrivinglicenseImg", nowDrivinglicenseImg);
|
||||
|
|
@ -139,19 +200,18 @@ public class AssignedManageController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value="/list")
|
||||
@RequestMapping(value = "/list")
|
||||
@ResponseBody
|
||||
public Object list(Page page) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object list(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = assignedManageService.list(page); //列出MajorDangerSource列表
|
||||
List<PageData> vehicleList = new ArrayList<>();
|
||||
List<PageData> varList = assignedManageService.list(page); //列出MajorDangerSource列表
|
||||
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
|
|
@ -183,42 +243,53 @@ public class AssignedManageController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/getassignedoperationvehiclelist")
|
||||
@RequestMapping(value = "/getAssignedVehicleList")
|
||||
@ResponseBody
|
||||
public Object getAssignedOperationVehicleList() throws Exception {
|
||||
public Object getAssignedVehicleList() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
String corpId = Jurisdiction.getCORPINFO_ID();
|
||||
List<PageData> operationList = operatingVehiclesService.operationVehicleList(corpId); //列出Question列表
|
||||
List<PageData> assignedList = assignedManageService.assignedList(corpId);
|
||||
for (int i = 0; i < assignedList.size(); i++) {
|
||||
for (int j = 0; j < operationList.size(); j++) {
|
||||
if(assignedList.get(i).get("RAW_PLATE_NUMBER").equals(operationList.get(j).get("PLATE_NUMBER"))) {
|
||||
operationList.remove(j);
|
||||
}
|
||||
}
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
List<PageData> allOperatingVehicleList = operatingVehiclesService.getPulldownVehicleList(pd); // 查询出所有不包括 删除、报废的营运车辆
|
||||
List<PageData> allAssignedList = assignedManageService.assignedList(corpId); // 所有过户的车辆
|
||||
|
||||
List<PageData> varList = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(allAssignedList)) {
|
||||
varList = allOperatingVehicleList.stream().parallel()
|
||||
.filter(operating -> allAssignedList.stream()
|
||||
.noneMatch(assigned -> StringUtils.equals(operating.getString("OPERATING_ID"), assigned.getString("RAW_PLATE_NUMBER"))))
|
||||
.collect(Collectors.toList());
|
||||
} else {
|
||||
varList = allOperatingVehicleList;
|
||||
}
|
||||
map.put("varList", operationList);
|
||||
|
||||
map.put("varList", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/getassignedfreighttrailerlist")
|
||||
@RequestMapping(value = "/getAssignedFreightTrailerList")
|
||||
@ResponseBody
|
||||
public Object getAssignedFreightTrailerList() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
String errInfo = "success";
|
||||
String corpId = Jurisdiction.getCORPINFO_ID();
|
||||
List<PageData> freightList = freightTrailerService.trailerList(corpId);
|
||||
List<PageData> freightList = freightTrailerService.getPulldownVehicleList(corpId);
|
||||
List<PageData> assignedList = assignedManageService.assignedList(corpId);
|
||||
for (int i = 0; i < assignedList.size(); i++) {
|
||||
for (int j = 0; j < freightList.size(); j++) {
|
||||
if(assignedList.get(i).get("RAW_PLATE_NUMBER").equals(freightList.get(j).get("PLATE_NUMBER"))) {
|
||||
freightList.remove(j);
|
||||
}
|
||||
}
|
||||
|
||||
List<PageData> varList = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(assignedList)) {
|
||||
varList = freightList.stream().parallel()
|
||||
.filter(freight -> assignedList.stream()
|
||||
.noneMatch(assigned -> StringUtils.equals(freight.getString("FREIGHTTRAILER_ID"), assigned.getString("RAW_PLATE_NUMBER"))))
|
||||
.collect(Collectors.toList());
|
||||
} else {
|
||||
varList = freightList;
|
||||
}
|
||||
map.put("varList", freightList);
|
||||
|
||||
map.put("varList", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,16 +18,17 @@ import com.zcloud.util.Smb;
|
|||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
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;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 北斗管理
|
||||
|
|
@ -59,23 +60,23 @@ public class BeidouController extends BaseController {
|
|||
// @RequiresPermissions( value = {"question:add" , "courseware:add"}, logical = Logical.OR)
|
||||
@ResponseBody
|
||||
@LogAnno(menuType = "机务档案", menuServer = "北斗管理", instructionsOperate = "北斗管理", instructionsType = "新增")
|
||||
public Object add(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception {
|
||||
public Object add(@RequestParam(value = "FFILE", required = false) MultipartFile file) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("BEIDOU_ID", this.get32UUID()); //主键
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); //添加人
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
pd.put("TRANSPORTATIONCOMPANY", Jurisdiction.getCORPINFO_ID()); // 运输企业
|
||||
pd.put("ARCHIVES_TYPE", "正常"); //档案状态
|
||||
|
||||
pd.put("ARCHIVES_TYPE", "0"); //档案状态
|
||||
pd.put("VEHICLE", pd.get("PLATE_NUMBER")); //档案状态
|
||||
String ffile = DateUtil.getDays();
|
||||
if (file != null && StringUtils.isNotBlank(pd.getString("CREATORNAME"))){
|
||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||
if (file != null && StringUtils.isNotBlank(pd.getString("CREATORNAME"))) {
|
||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".") + 1).toLowerCase();
|
||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName)) {
|
||||
errInfo = "fail";
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -85,26 +86,33 @@ public class BeidouController extends BaseController {
|
|||
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("TRANSPORTATIONCOMPANY") + "/" + ffile);
|
||||
pd.put("CONTRACT", Const.FILEPATHFILE + pd.getString("TRANSPORTATIONCOMPANY") + "/" + ffile + "/" + fileName);
|
||||
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
|
||||
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
|
||||
pd.put("ATTACHMENT_NAME", pd.getString("CREATORNAME"));
|
||||
pd.put("CONFIRM_MESSAGE_TIME", DateUtil.date2Str(new Date()));
|
||||
}
|
||||
|
||||
PageData operationData = new PageData();
|
||||
operationData.put("OPERATING_ID", pd.get("VEHICLE"));
|
||||
operationData.put("CORPINFO_ID", pd.get("CORPINFO_ID"));
|
||||
PageData resData = operatingVehiclesService.findById(operationData);
|
||||
if(!ObjectUtils.isEmpty(resData)) {
|
||||
if(StringUtils.isNotBlank(pd.getString("DUE_DATE"))) {
|
||||
if (!ObjectUtils.isEmpty(resData)) {
|
||||
if (StringUtils.isNotBlank(pd.getString("DUE_DATE"))) {
|
||||
String expireDate = pd.getString("DUE_DATE");
|
||||
String day = DateUtil.getDay();
|
||||
if(DateUtil.compareDate(expireDate, day)) {
|
||||
resData.put("NETWORK_STATUS","已入网");
|
||||
}else{
|
||||
resData.put("NETWORK_STATUS","超时入网");
|
||||
if (DateUtil.compareDate(expireDate, day)) {
|
||||
resData.put("NETWORK_STATUS", "已入网");
|
||||
} else {
|
||||
resData.put("NETWORK_STATUS", "超时入网");
|
||||
}
|
||||
}
|
||||
operatingVehiclesService.edit(resData);
|
||||
}
|
||||
if(DateUtil.compareDate(pd.getString("DUE_DATE"),DateUtil.getDay()) && DateUtil.compareDate(DateUtil.getDay(),pd.getString("REMINDER_DATE"))) {
|
||||
pd.put("REVERT", 2);
|
||||
} else if (DateUtil.compareDate(DateUtil.getDay(),pd.getString("DUE_DATE"))) {
|
||||
pd.put("REVERT", 0);
|
||||
} else if (DateUtil.compareDate(pd.getString("DUE_DATE"),DateUtil.getDay())) {
|
||||
pd.put("REVERT", 1);
|
||||
}
|
||||
beidouService.save(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -127,7 +135,7 @@ public class BeidouController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("DELETEOR", Jurisdiction.getUSER_ID()); //删除人id
|
||||
pd.put("DELETEORNAME", Jurisdiction.getUsername()); //删除人
|
||||
pd.put("DELETEORNAME", Jurisdiction.getName()); //删除人
|
||||
pd.put("DELETTIME", DateUtil.date2Str(new Date())); //删除时间
|
||||
beidouService.delete(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
|
|
@ -150,22 +158,29 @@ public class BeidouController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
PageData operationData = new PageData();
|
||||
operationData.put("OPERATING_ID", pd.get("VEHICLE"));
|
||||
operationData.put("CORPINFO_ID", pd.get("CORPINFO_ID"));
|
||||
PageData resData = operatingVehiclesService.findById(operationData);
|
||||
if(!ObjectUtils.isEmpty(resData)) {
|
||||
if (!ObjectUtils.isEmpty(resData)) {
|
||||
String dueDate = pd.getString("DUE_DATE");
|
||||
String day = DateUtil.getDay();
|
||||
if(DateUtil.compareDate(dueDate, day)) {
|
||||
resData.put("NETWORK_STATUS","已入网");
|
||||
}else{
|
||||
resData.put("NETWORK_STATUS","超时入网");
|
||||
if (DateUtil.compareDate(dueDate, day)) {
|
||||
resData.put("NETWORK_STATUS", "已入网");
|
||||
} else {
|
||||
resData.put("NETWORK_STATUS", "超时入网");
|
||||
}
|
||||
operatingVehiclesService.edit(resData);
|
||||
}
|
||||
if(DateUtil.compareDate(pd.getString("DUE_DATE"),DateUtil.getDay()) && DateUtil.compareDate(DateUtil.getDay(),pd.getString("REMINDER_DATE"))) {
|
||||
pd.put("REVERT", 2);
|
||||
} else if (DateUtil.compareDate(DateUtil.getDay(),pd.getString("DUE_DATE"))) {
|
||||
pd.put("REVERT", 0);
|
||||
} else if (DateUtil.compareDate(pd.getString("DUE_DATE"),DateUtil.getDay())) {
|
||||
pd.put("REVERT", 1);
|
||||
}
|
||||
beidouService.edit(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -188,7 +203,7 @@ public class BeidouController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
beidouService.edit2(pd);
|
||||
map.put("pd", pd);
|
||||
|
|
@ -214,6 +229,51 @@ public class BeidouController extends BaseController {
|
|||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = beidouService.list(page); //列出Question列表
|
||||
varList.stream().anyMatch(data -> {
|
||||
if ("1".equals(data.getString("OPEAR_ISSCRAP")) || "1".equals(data.getString("FREIGHT_ISSCRAP"))) {
|
||||
data.put("ARCHIVES_TYPE", "1");
|
||||
} else if ("1".equals(data.getString("OPEAR_ISASSIGNED")) || "1".equals(data.getString("FREIGHT_ISASSIGNED"))) {
|
||||
data.put("ARCHIVES_TYPE", "2");
|
||||
}
|
||||
return false;
|
||||
});
|
||||
varList.forEach(data -> {
|
||||
Date dueDate = DateUtil.fomatDate(data.getString("DUE_DATE"));
|
||||
Date reminderDate = DateUtil.fomatDate(data.getString("REMINDER_DATE"));
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String toDay = sdf.format(new Date());
|
||||
Date date = null;
|
||||
try {
|
||||
date = sdf.parse(toDay);
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
// 已到期
|
||||
if(dueDate.before(date)) {
|
||||
data.put("REVERT", "0");
|
||||
try {
|
||||
beidouService.edit(data);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
// 即将到期
|
||||
} else if ((dueDate.after(date) || dueDate.equals(date)) && (reminderDate.before(date) || reminderDate.equals(date))) {
|
||||
data.put("REVERT", "2");
|
||||
try {
|
||||
beidouService.edit(data);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
// 未到期
|
||||
}else{
|
||||
data.put("REVERT", "1");
|
||||
try {
|
||||
beidouService.edit(data);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -238,7 +298,7 @@ public class BeidouController extends BaseController {
|
|||
pd = beidouService.findById(pd); //根据ID读取
|
||||
|
||||
pd.put("FOREIGN_KEY", pd.getString("BEIDOU_ID"));
|
||||
pd.put("TYPE",128);
|
||||
pd.put("TYPE", 128);
|
||||
List<PageData> beidouinfoImgs = imgfilesService.listAll(pd);//北斗资料图片
|
||||
map.put("pd", pd);
|
||||
map.put("beidouinfoImgs", beidouinfoImgs);
|
||||
|
|
@ -253,64 +313,70 @@ public class BeidouController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID",Jurisdiction.getCORPINFO_ID());
|
||||
if(!StringUtils.isEmpty(pd.getString("TRAFFIC_TYPE")) && pd.getString("TRAFFIC_TYPE").equals("1")) {
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
if (!StringUtils.isEmpty(pd.getString("TRAFFIC_TYPE")) && pd.getString("TRAFFIC_TYPE").equals("1")) {
|
||||
// 营运车辆
|
||||
List<PageData> operatingList = operatingVehiclesService.operationVehicleList(pd.getString("CORPINFO_ID"));
|
||||
page.setPd(pd);
|
||||
List<PageData> insAnnually = beidouService.list(page);
|
||||
for (int i = 0; i < insAnnually.size(); i++) {
|
||||
for (int j = 0; j < operatingList.size(); j++) {
|
||||
if(operatingList.get(j).get("OPERATING_ID").equals(insAnnually.get(i).get("VEHICLE"))) {
|
||||
operatingList.remove(j);
|
||||
}
|
||||
}
|
||||
List<PageData> compassList = beidouService.list(page);
|
||||
|
||||
List<PageData> varList = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(compassList)) {
|
||||
varList = operatingList.stream().parallel()
|
||||
.filter(operating -> compassList.stream()
|
||||
.noneMatch(compass -> StringUtils.equals(operating.getString("OPERATING_ID"), compass.getString("VEHICLE"))))
|
||||
.collect(Collectors.toList());
|
||||
} else {
|
||||
varList = operatingList;
|
||||
}
|
||||
if(pd.containsKey("ID")){
|
||||
if (pd.containsKey("ID")) {
|
||||
pd.put("OPERATING_ID", pd.getString("ID"));
|
||||
pd.put("FOREIGN_KEY", pd.getString("OPERATING_ID"));
|
||||
pd.put("TYPE",121);
|
||||
pd.put("TYPE", 121);
|
||||
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
|
||||
map.put("drivingLicenseImgs", drivingLicenseImgs);
|
||||
}
|
||||
operatingList.forEach(operating -> {
|
||||
varList.forEach(operating -> {
|
||||
operating.put("ID", operating.getString("OPERATING_ID"));
|
||||
});
|
||||
map.put("list", operatingList);
|
||||
map.put("list", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
if("2".equals(pd.getString("TRAFFIC_TYPE"))) {
|
||||
if ("2".equals(pd.getString("TRAFFIC_TYPE"))) {
|
||||
// 货运挂车
|
||||
List<PageData> freightList = freightTrailerService.trailerList(pd.getString("CORPINFO_ID"));
|
||||
page.setPd(pd);
|
||||
List<PageData> insAnnually = beidouService.list(page);
|
||||
for (int i = 0; i < insAnnually.size(); i++) {
|
||||
for (int j = 0; j < freightList.size(); j++) {
|
||||
if(freightList.get(j).get("FREIGHTTRAILER_ID").equals(insAnnually.get(i).get("VEHICLE"))) {
|
||||
freightList.remove(j);
|
||||
}
|
||||
}
|
||||
|
||||
List<PageData> varList = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(insAnnually)) {
|
||||
varList = freightList.stream().parallel()
|
||||
.filter(freight -> insAnnually.stream()
|
||||
.noneMatch(ins -> StringUtils.equals(freight.getString("FREIGHTTRAILER_ID"), ins.getString("VEHICLE"))))
|
||||
.collect(Collectors.toList());
|
||||
} else {
|
||||
varList = freightList;
|
||||
}
|
||||
if(pd.containsKey("ID")){
|
||||
if (pd.containsKey("ID")) {
|
||||
pd.put("FREIGHTTRAILER_ID", pd.getString("ID"));
|
||||
pd.put("FOREIGN_KEY", pd.getString("FREIGHTTRAILER_ID"));
|
||||
pd.put("TYPE",121);
|
||||
pd.put("TYPE", 121);
|
||||
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
|
||||
map.put("drivingLicenseImgs", drivingLicenseImgs);
|
||||
}
|
||||
freightList.forEach(freight -> {
|
||||
varList.forEach(freight -> {
|
||||
freight.put("ID", freight.getString("FREIGHTTRAILER_ID"));
|
||||
});
|
||||
map.put("list", freightList);
|
||||
map.put("list", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
List<PageData> resData = freightTrailerService.vehicleList(pd);
|
||||
if(pd.containsKey("ID")){
|
||||
if (pd.containsKey("ID")) {
|
||||
pd.put("FOREIGN_KEY", pd.getString("ID"));
|
||||
pd.put("TYPE",121);
|
||||
pd.put("TYPE", 121);
|
||||
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
|
||||
map.put("drivingLicenseImgs", drivingLicenseImgs);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,68 @@
|
|||
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.TrafficCommitentItemService;
|
||||
import com.zcloud.service.comprehensive.TrafficDrivingItemService;
|
||||
import com.zcloud.service.comprehensive.TrafficDrivingSignService;
|
||||
import com.zcloud.service.comprehensive.TrafficSecurityWaybillRegistrationService;
|
||||
import com.zcloud.util.DateUtil;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import com.zcloud.util.Smb;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartRequest;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/app/commitentitem")
|
||||
public class AppTrafficCommitentItemController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private TrafficCommitentItemService trafficCommitentItemService;
|
||||
|
||||
@Autowired
|
||||
private Smb smb;
|
||||
|
||||
|
||||
/**新增
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/add")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
public Object add(MultipartRequest request) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
|
||||
String SIGNTIME[] = pd.getString("SIGNTIME").split(",");
|
||||
|
||||
for (int i = 0; i < SIGNTIME.length; i++) {
|
||||
fileList.add(request.getFile("file" + i));
|
||||
}
|
||||
pd.put("DRIVING_SIGN_ID", this.get32UUID());
|
||||
pd.put("ISDELETE", "0"); //是否删除
|
||||
pd.put("CREATORNAME", pd.getString("USER_NAME"));
|
||||
pd.put("CREATOR", pd.getString("USER_ID"));
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date()));
|
||||
pd.put("OPERATOR", pd.getString("USER_ID"));
|
||||
pd.put("OPERATORNAME", pd.getString("USER_NAME"));
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date()));
|
||||
pd.put("PRACTITIONER", pd.getString("USER_ID"));
|
||||
trafficCommitentItemService.save(pd, fileList.toArray(new MultipartFile[fileList.size()]));
|
||||
|
||||
map.put("pd",pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@ 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.TrafficDrivingCommitmentService;
|
||||
import com.zcloud.service.comprehensive.TrafficDrivingTypeService;
|
||||
import com.zcloud.util.Const;
|
||||
import com.zcloud.util.DateUtil;
|
||||
|
|
@ -29,6 +30,9 @@ public class AppTrafficDrivingTypeController extends BaseController {
|
|||
@Autowired
|
||||
private Smb smb;
|
||||
|
||||
@Autowired
|
||||
private TrafficDrivingCommitmentService trafficDrivingCommitmentService;
|
||||
|
||||
|
||||
|
||||
/**新增
|
||||
|
|
@ -99,6 +103,22 @@ public class AppTrafficDrivingTypeController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/safetycommitment")
|
||||
@ResponseBody
|
||||
public Object safetycommitment(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = trafficDrivingCommitmentService.listForDrivingCommitment(page);
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/saveFile")
|
||||
@ResponseBody
|
||||
public Object saveFile(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@ public class AppTrafficSecurityNoticeController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("DELETOR", Jurisdiction.getUSER_ID()); //删除人id
|
||||
pd.put("DELETORNAME", Jurisdiction.getUsername()); //删除人姓名
|
||||
pd.put("DELETOR", pd.getString("USER_ID")); //删除人id
|
||||
pd.put("DELETORNAME", pd.getString("USERNAME")); //删除人姓名
|
||||
pd.put("DELETETIME", DateUtil.date2Str(new Date())); //删除时间
|
||||
securityNoticeService.delete(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
|
|
@ -61,7 +61,15 @@ public class AppTrafficSecurityNoticeController extends BaseController {
|
|||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
pd.put("SIGNEDDATE",DateUtil.date2Str(new Date())); // 签收时间
|
||||
PageData pageData = new PageData();
|
||||
pageData.put("NOTIFICATION_ID", pd.getString("NOTIFICATION_ID"));
|
||||
pageData.put("PERSON_ID", pd.getString("USER_ID"));
|
||||
PageData securityNotice = securityReadDetail.listByUserIdOrNoticeId(pageData);
|
||||
if(StringUtils.isEmpty(securityNotice.getString("SIGNEDDATE"))) {
|
||||
pd.put("SIGNEDDATE",DateUtil.date2Str(new Date())); // 签收时间
|
||||
}else{
|
||||
pd.put("SIGNEDDATE",securityNotice.getString("SIGNEDDATE"));
|
||||
}
|
||||
pd.put("SIGNING", "1"); //设置签收情况
|
||||
if (pd.getString("REPLYCONTENT") != null && !pd.getString("REPLYCONTENT").isEmpty()) {
|
||||
pd.put("REPLYDATE", DateUtil.date2Str(new Date())); //设置回复时间
|
||||
|
|
@ -108,7 +116,7 @@ public class AppTrafficSecurityNoticeController extends BaseController {
|
|||
* 1.获取关系信息
|
||||
* 2.根据关系信息找到公告信息
|
||||
*/
|
||||
pd.put("USER_ID", Jurisdiction.getUSER_ID());
|
||||
// pd.put("USER_ID", pd.getString("loginUserId"));
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = trafficSecurityReadDetailService.listByUserId(page);
|
||||
map.put("varList", varList);
|
||||
|
|
|
|||
|
|
@ -4,11 +4,13 @@ import com.zcloud.controller.base.BaseController;
|
|||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.comprehensive.TrafficDrivingCommitmentService;
|
||||
import com.zcloud.service.comprehensive.TrafficDrivingSignService;
|
||||
import com.zcloud.service.comprehensive.TrafficDrivingTypeService;
|
||||
import com.zcloud.service.comprehensive.TrafficSecurityWaybillRegistrationService;
|
||||
import com.zcloud.util.DateUtil;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import com.zcloud.util.Tools;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
|
@ -30,6 +32,9 @@ public class AppTrafficSecurityWaybillRegistrationController extends BaseControl
|
|||
@Autowired
|
||||
private TrafficDrivingTypeService trafficDrivingTypeService;
|
||||
|
||||
@Autowired
|
||||
private TrafficDrivingSignService trafficDrivingSignService;
|
||||
|
||||
|
||||
@RequestMapping(value = "/listForSecurityWaybillre")
|
||||
@ResponseBody
|
||||
|
|
@ -57,21 +62,6 @@ public class AppTrafficSecurityWaybillRegistrationController extends BaseControl
|
|||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/forSecurityPerson")
|
||||
@ResponseBody
|
||||
public Object forSecurityPerson() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("TRANSPORTATIONCOMPANY", Jurisdiction.getCORPINFO_ID());
|
||||
pd = trafficSecurityWaybillRegistrationService.forSecurityPerson(pd);
|
||||
pd.put("PRACTITIONER", Jurisdiction.getName());
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看详情
|
||||
* @return
|
||||
|
|
@ -84,6 +74,14 @@ public class AppTrafficSecurityWaybillRegistrationController extends BaseControl
|
|||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
List<PageData> commitmentList = trafficDrivingCommitmentService.getDrivingCommitment(pd);
|
||||
List<PageData> list = trafficDrivingSignService.findWaybillRegistrationId(pd);
|
||||
for (PageData pageData : commitmentList) {
|
||||
for (PageData data : list) {
|
||||
if(StringUtils.equals(pageData.getString("DRIVINGCOMMITMENT_ID"), data.getString("DRIVINGTYPE_ID"))) {
|
||||
pageData.put("STATUS", data.getString("STATUS"));
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
pd = trafficDrivingTypeService.infoCategory(pd); //根据ID读取
|
||||
// if(pd.getString("OPERATOR"))
|
||||
|
|
@ -124,7 +122,7 @@ public class AppTrafficSecurityWaybillRegistrationController extends BaseControl
|
|||
if (shippingDate != null && shippingDate.after(new Date())) {
|
||||
pd.put("WAYBILLSTATUS", "1");
|
||||
} else {
|
||||
pd.put("WAYBILLSTATUS", "0");
|
||||
pd.put("WAYBILLSTATUS", "3");
|
||||
}
|
||||
|
||||
trafficSecurityWaybillRegistrationService.save(pd);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import com.zcloud.entity.PageData;
|
|||
import com.zcloud.logs.LogAnno;
|
||||
import com.zcloud.service.comprehensive.TrafficDrivingCommitmentService;
|
||||
import com.zcloud.util.*;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.crypto.hash.SimpleHash;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -42,11 +42,12 @@ public class TrafficDrivingCommitmentController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
Warden.initDate(pd);
|
||||
pd.put("DRIVINGCOMMITMENT_ID", this.get32UUID());
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //主键
|
||||
pd.put("ISDELETE", "0"); //是否删除
|
||||
pd.put("INQUIRYCONCLUSION","正常");
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername());
|
||||
pd.put("CREATORNAME", Jurisdiction.getName());
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //创建人
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //创建时间
|
||||
trafficDrivingCommitmentService.save(pd);
|
||||
|
|
@ -68,8 +69,9 @@ public class TrafficDrivingCommitmentController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //操作人
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); //操作人
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); //操作人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //操作时间
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
trafficDrivingCommitmentService.edit(pd);
|
||||
|
||||
map.put("pd",pd);
|
||||
|
|
@ -85,9 +87,14 @@ public class TrafficDrivingCommitmentController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = trafficDrivingCommitmentService.listForDrivingCommitment(page);
|
||||
varList.stream().forEach(data -> {
|
||||
if(StringUtils.equals(data.getString("INQUIRYCONCLUSION"), "正常")) {
|
||||
data.put("INQUIRYCONCLUSION", "1");
|
||||
}
|
||||
});
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -106,8 +113,9 @@ public class TrafficDrivingCommitmentController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("DELETOR", Jurisdiction.getUSER_ID());//删除人id
|
||||
pd.put("DELETORNAME", Jurisdiction.getUsername());//删除人姓名
|
||||
pd.put("DELETORNAME", Jurisdiction.getName());//删除人姓名
|
||||
pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
trafficDrivingCommitmentService.delete(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
|
|
@ -124,6 +132,7 @@ public class TrafficDrivingCommitmentController extends BaseController {
|
|||
Map<String, Object> map = new HashMap<>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pd = trafficDrivingCommitmentService.findById(pd); // 根据ID读取
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public class TrafficDrivingTypeController extends BaseController {
|
|||
pd.put("DRIVINGTYPE_ID", this.get32UUID());
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //主键
|
||||
pd.put("ISDELETE", "0"); //是否删除
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername());
|
||||
pd.put("CREATORNAME", Jurisdiction.getName());
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //创建人
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //创建时间
|
||||
trafficDrivingTypeService.save(pd);
|
||||
|
|
@ -62,8 +62,9 @@ public class TrafficDrivingTypeController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //操作人
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); //操作人
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); //操作人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //操作时间
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
trafficDrivingTypeService.edit(pd);
|
||||
|
||||
map.put("pd",pd);
|
||||
|
|
@ -81,7 +82,7 @@ public class TrafficDrivingTypeController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = trafficDrivingTypeService.listForDrivingType(page);
|
||||
map.put("varList", varList);
|
||||
|
|
@ -102,8 +103,9 @@ public class TrafficDrivingTypeController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("DELETOR", Jurisdiction.getUSER_ID());//删除人id
|
||||
pd.put("DELETORNAME", Jurisdiction.getUsername());//删除人姓名
|
||||
pd.put("DELETORNAME", Jurisdiction.getName());//删除人姓名
|
||||
pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
trafficDrivingTypeService.delete(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
|
|
@ -120,9 +122,11 @@ public class TrafficDrivingTypeController extends BaseController {
|
|||
Map<String, Object> map = new HashMap<>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pd = trafficDrivingTypeService.findById(pd); // 根据ID读取
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.zcloud.controller.comprehensive;
|
||||
|
||||
import com.alibaba.excel.util.DateUtils;
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
|
@ -36,7 +37,7 @@ public class TrafficSafetyActivitiesController extends BaseController {
|
|||
String activities_Id = this.get32UUID();
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 创建人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); // 创建人姓名
|
||||
pd.put("OPERATINGCOMPANY", Jurisdiction.getCORPINFO_ID()); // 经营企业
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 经营企业
|
||||
pd.put("ACTIVITIES_ID", activities_Id); // 主键
|
||||
pd.put("CREATETIME", DateUtil.date2Str(new Date())); // 添加时间
|
||||
pd.put("COMPLETIONSTATUS", "0");
|
||||
|
|
@ -58,9 +59,10 @@ public class TrafficSafetyActivitiesController extends BaseController {
|
|||
map.put("msg", "文件格式不正确!");
|
||||
return map;
|
||||
}
|
||||
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile);
|
||||
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName);
|
||||
//String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
String fileName = file.getOriginalFilename();
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
|
||||
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
|
||||
}
|
||||
|
|
@ -83,8 +85,15 @@ public class TrafficSafetyActivitiesController extends BaseController {
|
|||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); // 修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); // 修改人姓名
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
pd.put("OPERATINGCOMPANY", Jurisdiction.getCORPINFO_ID()); // 经营企业
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 经营企业
|
||||
pd.put("ISDELETE", "0");
|
||||
|
||||
if(!StringUtils.isEmpty(pd.getString("EXPIRYDATE")) && DateUtil.compareDate(pd.getString("EXPIRYDATE"),DateUtil.getDay())) {
|
||||
pd.put("VALIDSTATUS","1");
|
||||
} else if (DateUtil.compareDate(DateUtil.getDay(),pd.getString("EXPIRYDATE"))) {
|
||||
pd.put("VALIDSTATUS","0");
|
||||
}
|
||||
|
||||
String ffile = DateUtil.getDays();
|
||||
|
||||
if (file != null && StringUtils.isNotBlank(pd.getString("OPERATORNAME"))){
|
||||
|
|
@ -96,9 +105,9 @@ public class TrafficSafetyActivitiesController extends BaseController {
|
|||
map.put("msg", "文件格式不正确!");
|
||||
return map;
|
||||
}
|
||||
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile);
|
||||
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName);
|
||||
String fileName = file.getOriginalFilename();
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
|
||||
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
|
||||
}
|
||||
|
|
@ -123,21 +132,16 @@ public class TrafficSafetyActivitiesController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
String SYSTEMNAME = pd.getString("SYSTEMNAME"); // 关键词检索条件
|
||||
if (Tools.notEmpty(SYSTEMNAME))
|
||||
pd.put("SYSTEMNAME", SYSTEMNAME.trim());
|
||||
|
||||
String COMPLETIONSTATUS = pd.getString("COMPLETIONSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(COMPLETIONSTATUS))
|
||||
pd.put("COMPLETIONSTATUS", COMPLETIONSTATUS.trim());
|
||||
|
||||
String VALIDSTATUS = pd.getString("VALIDSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(VALIDSTATUS))
|
||||
pd.put("VALIDSTATUS", VALIDSTATUS.trim());
|
||||
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 运输企业
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = activeService.listForSafetyActivitieslist(page);
|
||||
varList.forEach(active -> {
|
||||
if(DateUtil.getDay().equals(active.getString("EXPIRYDATE")) || DateUtil.compareDate(active.getString("EXPIRYDATE"),DateUtil.getDay())){
|
||||
active.put("VALIDSTATUS","1");
|
||||
} else if (DateUtil.compareDate(DateUtil.getDay(),active.getString("EXPIRYDATE"))) {
|
||||
active.put("VALIDSTATUS","0");
|
||||
}
|
||||
});
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ public class TrafficSafetyAssessmentController extends BaseController {
|
|||
pd.put("ISDELETE", "0");
|
||||
String ffile = DateUtil.getDays();
|
||||
|
||||
|
||||
if (file != null && StringUtils.isNotBlank(pd.getString("OPERATORNAME"))){
|
||||
pd.put("COMPLETIONSTATUS", "1");
|
||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||
|
|
@ -96,13 +97,16 @@ public class TrafficSafetyAssessmentController extends BaseController {
|
|||
map.put("msg", "文件格式不正确!");
|
||||
return map;
|
||||
}
|
||||
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
// String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
String fileName = file.getOriginalFilename();
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile);
|
||||
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName);
|
||||
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
|
||||
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
safetyAssessmentService.edit(pd);
|
||||
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -123,21 +127,17 @@ public class TrafficSafetyAssessmentController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
String SYSTEMNAME = pd.getString("SYSTEMNAME"); // 关键词检索条件
|
||||
if (Tools.notEmpty(SYSTEMNAME))
|
||||
pd.put("SYSTEMNAME", SYSTEMNAME.trim());
|
||||
|
||||
String COMPLETIONSTATUS = pd.getString("COMPLETIONSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(COMPLETIONSTATUS))
|
||||
pd.put("COMPLETIONSTATUS", COMPLETIONSTATUS.trim());
|
||||
|
||||
String VALIDSTATUS = pd.getString("VALIDSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(VALIDSTATUS))
|
||||
pd.put("VALIDSTATUS", VALIDSTATUS.trim());
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = safetyAssessmentService.listForSafetyAssessment(page);
|
||||
varList.forEach(safetyAssessment -> {
|
||||
if(DateUtil.getDay().equals(safetyAssessment.get("EXPIRYDATE")) || DateUtil.compareDate(safetyAssessment.getString("EXPIRYDATE"),DateUtil.getDay())) {
|
||||
safetyAssessment.put("VALIDSTATUS","1");
|
||||
} else if (DateUtil.compareDate(DateUtil.getDay(),safetyAssessment.getString("EXPIRYDATE"))) {
|
||||
safetyAssessment.put("VALIDSTATUS","0");
|
||||
}
|
||||
});
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public class TrafficSafetyManualController extends BaseController {
|
|||
String manual_Id = this.get32UUID();
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 创建人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); // 创建人姓名
|
||||
pd.put("OPERATINGCOMPANY", Jurisdiction.getCORPINFO_ID()); // 经营企业
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 经营企业
|
||||
pd.put("MANUAL_ID", manual_Id); // 主键
|
||||
pd.put("CREATETIME", DateUtil.date2Str(new Date())); // 添加时间
|
||||
pd.put("COMPLETIONSTATUS", "0");
|
||||
|
|
@ -57,9 +57,10 @@ public class TrafficSafetyManualController extends BaseController {
|
|||
map.put("msg", "文件格式不正确!");
|
||||
return map;
|
||||
}
|
||||
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile);
|
||||
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName);
|
||||
//String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
String fileName = file.getOriginalFilename();
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
|
||||
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
|
||||
}
|
||||
|
|
@ -82,8 +83,16 @@ public class TrafficSafetyManualController extends BaseController {
|
|||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); // 修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); // 修改人姓名
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
pd.put("OPERATINGCOMPANY", Jurisdiction.getCORPINFO_ID()); // 经营企业
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 经营企业
|
||||
pd.put("ISDELETE", "0");
|
||||
|
||||
|
||||
if(!StringUtils.isEmpty(pd.getString("EXPIRYDATE")) && DateUtil.compareDate(pd.getString("EXPIRYDATE"),DateUtil.getDay())) {
|
||||
pd.put("VALIDSTATUS","1");
|
||||
} else if (DateUtil.compareDate(DateUtil.getDay(),pd.getString("EXPIRYDATE"))) {
|
||||
pd.put("VALIDSTATUS","0");
|
||||
}
|
||||
|
||||
String ffile = DateUtil.getDays();
|
||||
|
||||
if (file != null && StringUtils.isNotBlank(pd.getString("OPERATORNAME"))){
|
||||
|
|
@ -95,9 +104,10 @@ public class TrafficSafetyManualController extends BaseController {
|
|||
map.put("msg", "文件格式不正确!");
|
||||
return map;
|
||||
}
|
||||
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile);
|
||||
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName);
|
||||
//String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
String fileName = file.getOriginalFilename();
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
|
||||
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
|
||||
}
|
||||
|
|
@ -122,21 +132,16 @@ public class TrafficSafetyManualController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
String SYSTEMNAME = pd.getString("SYSTEMNAME"); // 关键词检索条件
|
||||
if (Tools.notEmpty(SYSTEMNAME))
|
||||
pd.put("SYSTEMNAME", SYSTEMNAME.trim());
|
||||
|
||||
String COMPLETIONSTATUS = pd.getString("COMPLETIONSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(COMPLETIONSTATUS))
|
||||
pd.put("COMPLETIONSTATUS", COMPLETIONSTATUS.trim());
|
||||
|
||||
String VALIDSTATUS = pd.getString("VALIDSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(VALIDSTATUS))
|
||||
pd.put("VALIDSTATUS", VALIDSTATUS.trim());
|
||||
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 运输企业
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = safetyManualService.listForSafetyManuallist(page);
|
||||
varList.forEach(manual -> {
|
||||
if(DateUtil.getDay().equals(manual.getString("EXPIRYDATE")) || DateUtil.compareDate(manual.getString("EXPIRYDATE"),DateUtil.getDay())){
|
||||
manual.put("VALIDSTATUS","1");
|
||||
} else if (DateUtil.compareDate(DateUtil.getDay(),manual.getString("EXPIRYDATE"))) {
|
||||
manual.put("VALIDSTATUS","0");
|
||||
}
|
||||
});
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class TrafficSafetyMeetingController extends BaseController {
|
|||
pd.put("CREATORNAME", Jurisdiction.getName()); // 创建人姓名
|
||||
pd.put("SAFETY_MEETING_ID", safety_meeting_id); // 主键
|
||||
pd.put("CREATETIME", DateUtil.date2Str(new Date())); // 添加时间
|
||||
pd.put("TRANSPORTATIONCOMPANY", Jurisdiction.getCORPINFO_ID()); // 运输企业
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 运输企业
|
||||
pd.put("MEETING_STATUS", "0"); // 会议状态
|
||||
pd.put("MEETING_PERSONS", "0"); // 参会人数
|
||||
pd.put("ISDELETE", "0");
|
||||
|
|
@ -56,8 +56,8 @@ public class TrafficSafetyMeetingController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("TRANSPORTATIONCOMPANY") + "/" + ffile);
|
||||
pd.put("CONFIRM_MESSAGE_SIGN_ROUTE", Const.FILEPATHFILE + pd.getString("TRANSPORTATIONCOMPANY") + "/" + ffile + "/" + fileName);
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
pd.put("CONFIRM_MESSAGE_SIGN_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
|
||||
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
|
||||
}
|
||||
|
|
@ -72,8 +72,8 @@ public class TrafficSafetyMeetingController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
String videoFileName = this.get32UUID() + videoFile.getOriginalFilename().substring(videoFile.getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(videoFile, videoFileName, Const.FILEPATHFILE + pd.getString("TRANSPORTATIONCOMPANY") + "/" + ffile);
|
||||
pd.put("VIDEO_SIGN_ROUTE", Const.FILEPATHFILE + pd.getString("TRANSPORTATIONCOMPANY") + "/" + ffile + "/" + videoFileName);
|
||||
smb.sshSftp(videoFile, videoFileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
pd.put("VIDEO_SIGN_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + videoFileName);
|
||||
pd.put("VIDEO_NAME",pd.getString("CREATORNAME"));
|
||||
}
|
||||
String meetingDate = pd.getString("MEETING_DATE");
|
||||
|
|
@ -117,15 +117,7 @@ public class TrafficSafetyMeetingController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
String MEETING_TITLE = pd.getString("MEETING_TITLE"); // 关键词检索条件
|
||||
if (Tools.notEmpty(MEETING_TITLE))
|
||||
pd.put("MEETING_TITLE", MEETING_TITLE.trim());
|
||||
|
||||
String MEETING_TYPE = pd.getString("MEETING_TYPE"); // 关键词检索条件
|
||||
if (Tools.notEmpty(MEETING_TYPE))
|
||||
pd.put("MEETING_TYPE", MEETING_TYPE.trim());
|
||||
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 运输企业
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = trafficSafetyMeetingService.listForSafetyMeeting(page);
|
||||
Date date = DateUtil.fomatDate(DateUtil.getDay());
|
||||
|
|
@ -182,7 +174,7 @@ public class TrafficSafetyMeetingController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("DELETOR", Jurisdiction.getUSER_ID());//删除人id
|
||||
pd.put("DELETORNAME", Jurisdiction.getUsername());//删除人姓名
|
||||
pd.put("DELETORNAME", Jurisdiction.getName());//删除人姓名
|
||||
pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间
|
||||
trafficSafetyMeetingService.delete(pd);
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -223,9 +215,9 @@ public class TrafficSafetyMeetingController extends BaseController {
|
|||
String PRACTITIONER = pd.getString("PRACTITIONER"); // 关键词检索条件
|
||||
if (Tools.notEmpty(PRACTITIONER))
|
||||
pd.put("PRACTITIONER", PRACTITIONER.trim());
|
||||
String PRACTITIONERTYPE = pd.getString("PRACTITIONERTYPE"); // 关键词检索条件
|
||||
String PRACTITIONERTYPE = pd.getString("PRACTITIONER_TYPE"); // 关键词检索条件
|
||||
if (Tools.notEmpty(PRACTITIONERTYPE))
|
||||
pd.put("PRACTITIONERTYPE", PRACTITIONERTYPE.trim());
|
||||
pd.put("PRACTITIONER_TYPE", PRACTITIONERTYPE.trim());
|
||||
String SIGNEDSTATUS = pd.getString("SIGNEDSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(SIGNEDSTATUS))
|
||||
pd.put("SIGNEDSTATUS", SIGNEDSTATUS.trim());
|
||||
|
|
|
|||
|
|
@ -68,14 +68,14 @@ public class TrafficSafetyOccupationalHazardsController extends BaseController {
|
|||
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
|
||||
}
|
||||
|
||||
page.setPd(pd);
|
||||
/*page.setPd(pd);
|
||||
List<PageData> varList = occupationalHazardsService.listForSafetyOccupationalHazardsUser(page);
|
||||
if (!varList.isEmpty()){
|
||||
for(PageData varPd : varList){
|
||||
varPd.put("VALIDSTATUS", "2");
|
||||
occupationalHazardsService.edit(varPd);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
occupationalHazardsService.save(pd);
|
||||
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -97,8 +97,14 @@ public class TrafficSafetyOccupationalHazardsController extends BaseController {
|
|||
pd.put("OPERATINGCOMPANY", Jurisdiction.getCORPINFO_ID()); // 经营企业
|
||||
pd.put("ISDELETE", "0");
|
||||
pd.put("COMPLETIONSTATUS", "1");
|
||||
pd.put("VALIDSTATUS", "1");
|
||||
pd.put("ISSIGNED", "1");
|
||||
|
||||
if (DateUtil.compareDate(DateUtil.getDay(), pd.getString("EXPIRYDATE"))) {
|
||||
pd.put("VALIDSTATUS", "0");
|
||||
} else {
|
||||
pd.put("VALIDSTATUS", "1");
|
||||
}
|
||||
|
||||
String ffile = DateUtil.getDays();
|
||||
|
||||
if (file != null && StringUtils.isNotBlank(pd.getString("OPERATORNAME"))){
|
||||
|
|
@ -139,21 +145,7 @@ public class TrafficSafetyOccupationalHazardsController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
String OCCUPATIONALNAME = pd.getString("OCCUPATIONALNAME"); // 关键词检索条件
|
||||
if (Tools.notEmpty(OCCUPATIONALNAME))
|
||||
pd.put("OCCUPATIONALNAME", OCCUPATIONALNAME.trim());
|
||||
|
||||
String COMPLETIONSTATUS = pd.getString("COMPLETIONSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(COMPLETIONSTATUS))
|
||||
pd.put("COMPLETIONSTATUS", COMPLETIONSTATUS.trim());
|
||||
|
||||
String VALIDSTATUS = pd.getString("VALIDSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(VALIDSTATUS))
|
||||
pd.put("VALIDSTATUS", VALIDSTATUS.trim());
|
||||
|
||||
String ISSIGNED = pd.getString("ISSIGNED"); // 关键词检索条件
|
||||
if (Tools.notEmpty(ISSIGNED))
|
||||
pd.put("ISSIGNED", ISSIGNED.trim());
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = occupationalHazardsService.listForSecurityOccupationalHazards(page);
|
||||
|
|
@ -179,6 +171,15 @@ public class TrafficSafetyOccupationalHazardsController extends BaseController {
|
|||
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = occupationalHazardsService.listForSafetyOccupationalHazardsUser(page);
|
||||
varList.forEach(occupational -> {
|
||||
if(DateUtil.getDay().equals(occupational.getString("EXPIRYDATE"))) {
|
||||
occupational.put("VALIDSTATUS", "1");
|
||||
} else if(DateUtil.compareDate(DateUtil.getDay(), occupational.getString("EXPIRYDATE"))) {
|
||||
occupational.put("VALIDSTATUS", "2");
|
||||
}else{
|
||||
occupational.put("VALIDSTATUS", "1");
|
||||
}
|
||||
});
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -218,4 +219,18 @@ public class TrafficSafetyOccupationalHazardsController extends BaseController {
|
|||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value="/getSafetyOccupationalHazardsEdit")
|
||||
@ResponseBody
|
||||
public Object getSafetyOccupationalHazardsEdit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> varList = occupationalHazardsService.getSafetyOccupationalHazardsEdit(pd); //根据ID读取
|
||||
map.put("varList", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public class TrafficSafetyProductionController extends BaseController {
|
|||
pd.put("ISDELETE", "0");
|
||||
|
||||
if (DateUtil.compareDate(DateUtil.getDay(), pd.getString("EXPIRYDATE"))) {
|
||||
pd.put("VALIDSTATUS", "0");
|
||||
pd.put("VALIDSTATUS", "2");
|
||||
} else {
|
||||
pd.put("VALIDSTATUS", "1");
|
||||
}
|
||||
|
|
@ -57,11 +57,16 @@ public class TrafficSafetyProductionController extends BaseController {
|
|||
map.put("msg", "文件格式不正确!");
|
||||
return map;
|
||||
}
|
||||
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
String fileName = file.getOriginalFilename();
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile);
|
||||
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName);
|
||||
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
|
||||
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
|
||||
/*String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile);
|
||||
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName);
|
||||
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
|
||||
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));*/
|
||||
}
|
||||
|
||||
safetyProductionService.save(pd);
|
||||
|
|
@ -84,6 +89,13 @@ public class TrafficSafetyProductionController extends BaseController {
|
|||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
pd.put("OPERATINGCOMPANY", Jurisdiction.getCORPINFO_ID()); // 经营企业
|
||||
pd.put("ISDELETE", "0");
|
||||
|
||||
if (DateUtil.compareDate(DateUtil.getDay(), pd.getString("EXPIRYDATE"))) {
|
||||
pd.put("VALIDSTATUS", "2");
|
||||
} else {
|
||||
pd.put("VALIDSTATUS", "1");
|
||||
}
|
||||
|
||||
String ffile = DateUtil.getDays();
|
||||
|
||||
if (file != null && StringUtils.isNotBlank(pd.getString("OPERATORNAME"))){
|
||||
|
|
@ -95,7 +107,8 @@ public class TrafficSafetyProductionController extends BaseController {
|
|||
map.put("msg", "文件格式不正确!");
|
||||
return map;
|
||||
}
|
||||
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
// String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
String fileName = file.getOriginalFilename();
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile);
|
||||
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName);
|
||||
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
|
||||
|
|
@ -122,21 +135,19 @@ public class TrafficSafetyProductionController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
String SYSTEMNAME = pd.getString("SYSTEMNAME"); // 关键词检索条件
|
||||
if (Tools.notEmpty(SYSTEMNAME))
|
||||
pd.put("SYSTEMNAME", SYSTEMNAME.trim());
|
||||
|
||||
String COMPLETIONSTATUS = pd.getString("COMPLETIONSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(COMPLETIONSTATUS))
|
||||
pd.put("COMPLETIONSTATUS", COMPLETIONSTATUS.trim());
|
||||
|
||||
String VALIDSTATUS = pd.getString("VALIDSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(VALIDSTATUS))
|
||||
pd.put("VALIDSTATUS", VALIDSTATUS.trim());
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = safetyProductionService.listForSafetyProductionlist(page);
|
||||
varList.forEach(safetyProduction -> {
|
||||
if(DateUtil.getDay().equals(safetyProduction.getString("EXPIRYDATE"))) {
|
||||
safetyProduction.put("VALIDSTATUS", "1");
|
||||
} else if(DateUtil.compareDate(DateUtil.getDay(), safetyProduction.getString("EXPIRYDATE"))) {
|
||||
safetyProduction.put("VALIDSTATUS", "2");
|
||||
}else{
|
||||
safetyProduction.put("VALIDSTATUS", "1");
|
||||
}
|
||||
});
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -176,4 +187,18 @@ public class TrafficSafetyProductionController extends BaseController {
|
|||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value="/getSafetyProductionEdit")
|
||||
@ResponseBody
|
||||
public Object getSafetyProductionEdit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> varList = safetyProductionService.getSafetyProductionEdit(pd); //根据ID读取
|
||||
map.put("varList", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,14 +66,14 @@ public class TrafficSafetyResponsibilityController extends BaseController {
|
|||
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
|
||||
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
|
||||
}
|
||||
page.setPd(pd);
|
||||
/*page.setPd(pd);
|
||||
List<PageData> varList = responseService.listForSafetyResponsibilityUser(page);
|
||||
if (!varList.isEmpty()){
|
||||
for(PageData varPd : varList){
|
||||
varPd.put("VALIDSTATUS", "2");
|
||||
responseService.edit(varPd);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
responseService.save(pd);
|
||||
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -93,6 +93,12 @@ public class TrafficSafetyResponsibilityController extends BaseController {
|
|||
pd.put("OPERATORNAME", Jurisdiction.getName()); // 修改人姓名
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
pd.put("OPERATINGCOMPANY", Jurisdiction.getCORPINFO_ID()); // 经营企业
|
||||
|
||||
if (DateUtil.compareDate(DateUtil.getDay(), pd.getString("EXPIRYDATE"))) {
|
||||
pd.put("VALIDSTATUS", "0");
|
||||
} else {
|
||||
pd.put("VALIDSTATUS", "1");
|
||||
}
|
||||
String ffile = DateUtil.getDays();
|
||||
|
||||
if (file != null && StringUtils.isNotBlank(pd.getString("OPERATORNAME"))){
|
||||
|
|
@ -133,21 +139,7 @@ public class TrafficSafetyResponsibilityController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
String RESPONSIBILITYNAME = pd.getString("RESPONSIBILITYNAME"); // 关键词检索条件
|
||||
if (Tools.notEmpty(RESPONSIBILITYNAME))
|
||||
pd.put("RESPONSIBILITYNAME", RESPONSIBILITYNAME.trim());
|
||||
|
||||
String COMPLETIONSTATUS = pd.getString("COMPLETIONSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(COMPLETIONSTATUS))
|
||||
pd.put("COMPLETIONSTATUS", COMPLETIONSTATUS.trim());
|
||||
|
||||
String VALIDSTATUS = pd.getString("VALIDSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(VALIDSTATUS))
|
||||
pd.put("VALIDSTATUS", VALIDSTATUS.trim());
|
||||
|
||||
String ISSIGNED = pd.getString("ISSIGNED"); // 关键词检索条件
|
||||
if (Tools.notEmpty(ISSIGNED))
|
||||
pd.put("ISSIGNED", ISSIGNED.trim());
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = responseService.listForSecurityResponsibility(page);
|
||||
|
|
@ -187,6 +179,15 @@ public class TrafficSafetyResponsibilityController extends BaseController {
|
|||
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = responseService.listForSafetyResponsibilityUser(page);
|
||||
varList.forEach(response -> {
|
||||
if(DateUtil.getDay().equals(response.getString("EXPIRYDATE"))) {
|
||||
response.put("VALIDSTATUS", "1");
|
||||
} else if(DateUtil.compareDate(DateUtil.getDay(), response.getString("EXPIRYDATE"))) {
|
||||
response.put("VALIDSTATUS", "2");
|
||||
}else{
|
||||
response.put("VALIDSTATUS", "1");
|
||||
}
|
||||
});
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -212,4 +213,18 @@ public class TrafficSafetyResponsibilityController extends BaseController {
|
|||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value="/getSafetyResponsibilityEdit")
|
||||
@ResponseBody
|
||||
public Object safetyCommitment() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> varList = responseService.safetyCommitmentById(pd); //根据ID读取
|
||||
map.put("varList", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ public class TrafficSecurityAccidentInvestigationController extends BaseControll
|
|||
pd.put("INCIDENTNUMBER", this.get32UUID()); // 事故编号
|
||||
pd.put("CERTIFICATIONNUMBER", this.get32UUID()); // 认定书编号
|
||||
pd.put("CREATETIME", DateUtil.date2Str(new Date())); // 添加时间
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业id
|
||||
pd.put("DEPARTMENT", Jurisdiction.getCORPINFO_ID()); // 部门
|
||||
pd.put("ISDELETE", "0");
|
||||
|
||||
|
|
@ -90,14 +91,7 @@ public class TrafficSecurityAccidentInvestigationController extends BaseControll
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
String USER_ID = pd.getString("USER_ID");
|
||||
if (Tools.notEmpty(USER_ID))
|
||||
pd.put("USER_ID", USER_ID.trim());
|
||||
|
||||
String ACCIDENTDATE = pd.getString("ACCIDENTDATE"); // 运输车辆
|
||||
if (Tools.notEmpty(ACCIDENTDATE))
|
||||
pd.put("ACCIDENTDATE", ACCIDENTDATE.trim());
|
||||
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = accidentInvestigationService.listForAccidentInvestigation(page);
|
||||
map.put("varList", varList);
|
||||
|
|
@ -118,7 +112,7 @@ public class TrafficSecurityAccidentInvestigationController extends BaseControll
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("DELETOR", Jurisdiction.getUSER_ID());//删除人id
|
||||
pd.put("DELETORNAME", Jurisdiction.getUsername());//删除人姓名
|
||||
pd.put("DELETORNAME", Jurisdiction.getName());//删除人姓名
|
||||
pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间
|
||||
accidentInvestigationService.delete(pd);
|
||||
map.put("result", errInfo);
|
||||
|
|
|
|||
|
|
@ -66,14 +66,6 @@ public class TrafficSecurityCommitmentController extends BaseController {
|
|||
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
|
||||
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
|
||||
}
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = securityCommitmentService.listForSecurityCommitmentUser(page);
|
||||
if (!varList.isEmpty()){
|
||||
for(PageData varPd : varList){
|
||||
varPd.put("VALIDSTATUS", "2");
|
||||
securityCommitmentService.edit(varPd);
|
||||
}
|
||||
}
|
||||
securityCommitmentService.save(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("pd", pd);
|
||||
|
|
@ -92,6 +84,13 @@ public class TrafficSecurityCommitmentController extends BaseController {
|
|||
pd.put("OPERATORNAME", Jurisdiction.getName()); // 修改人姓名
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
pd.put("OPERATINGCOMPANY", Jurisdiction.getCORPINFO_ID()); // 经营企业
|
||||
|
||||
if (DateUtil.compareDate(DateUtil.getDay(), pd.getString("EXPIRYDATE"))) {
|
||||
pd.put("VALIDSTATUS", "0");
|
||||
} else {
|
||||
pd.put("VALIDSTATUS", "1");
|
||||
}
|
||||
|
||||
String ffile = DateUtil.getDays();
|
||||
|
||||
if (file != null && StringUtils.isNotBlank(pd.getString("OPERATORNAME"))){
|
||||
|
|
@ -131,22 +130,7 @@ public class TrafficSecurityCommitmentController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
String COMMITMENTNAME = pd.getString("COMMITMENTNAME"); // 关键词检索条件
|
||||
if (Tools.notEmpty(COMMITMENTNAME))
|
||||
pd.put("COMMITMENTNAME", COMMITMENTNAME.trim());
|
||||
|
||||
String COMPLETIONSTATUS = pd.getString("COMPLETIONSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(COMPLETIONSTATUS))
|
||||
pd.put("COMPLETIONSTATUS", COMPLETIONSTATUS.trim());
|
||||
|
||||
String VALIDSTATUS = pd.getString("VALIDSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(VALIDSTATUS))
|
||||
pd.put("VALIDSTATUS", VALIDSTATUS.trim());
|
||||
|
||||
String ISSIGNED = pd.getString("ISSIGNED"); // 关键词检索条件
|
||||
if (Tools.notEmpty(ISSIGNED))
|
||||
pd.put("ISSIGNED", ISSIGNED.trim());
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = securityCommitmentService.listForSecurityCommitment(page);
|
||||
|
|
@ -169,9 +153,17 @@ public class TrafficSecurityCommitmentController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = securityCommitmentService.listForSecurityCommitmentUser(page);
|
||||
varList.forEach(securityCommitment -> {
|
||||
if(DateUtil.getDay().equals(securityCommitment.getString("EXPIRYDATE"))) {
|
||||
securityCommitment.put("VALIDSTATUS", "1");
|
||||
} else if(DateUtil.compareDate(DateUtil.getDay(), securityCommitment.getString("EXPIRYDATE"))) {
|
||||
securityCommitment.put("VALIDSTATUS", "2");
|
||||
}else{
|
||||
securityCommitment.put("VALIDSTATUS", "1");
|
||||
}
|
||||
});
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -211,4 +203,18 @@ public class TrafficSecurityCommitmentController extends BaseController {
|
|||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value="/safetyCommitment")
|
||||
@ResponseBody
|
||||
public Object safetyCommitment() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> varList = securityCommitmentService.safetyCommitmentById(pd); //根据ID读取
|
||||
map.put("varList", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,27 +1,34 @@
|
|||
package com.zcloud.controller.comprehensive;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.comprehensive.TrafficSecurityCustomerManagementService;
|
||||
import com.zcloud.service.comprehensive.TrafficSecurityNoticeService;
|
||||
import com.zcloud.service.comprehensive.TrafficSecurityWaybillRegistrationService;
|
||||
import com.zcloud.util.Const;
|
||||
import com.zcloud.util.DateUtil;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import com.zcloud.util.Tools;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.util.CollectionUtils;
|
||||
import org.apache.tomcat.util.json.JSONParser;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
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.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/securitycustomer")
|
||||
|
|
@ -29,6 +36,10 @@ public class TrafficSecurityCustomerManagementController extends BaseController
|
|||
@Autowired
|
||||
private TrafficSecurityCustomerManagementService customerManagementService;
|
||||
|
||||
@Autowired
|
||||
private TrafficSecurityWaybillRegistrationService trafficSecurityWaybillRegistrationService;
|
||||
|
||||
|
||||
//新增
|
||||
@RequestMapping(value = "/add")
|
||||
@ResponseBody
|
||||
|
|
@ -36,19 +47,16 @@ public class TrafficSecurityCustomerManagementController extends BaseController
|
|||
Map<String, Object> map = new HashMap<>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData(); // 获取页面提交的数据
|
||||
|
||||
String customermanagement_id = this.get32UUID(); // 生成主键ID
|
||||
pd.put("CUSTOMERMANAGEMENT_ID", customermanagement_id); // 设置客户管理ID
|
||||
pd.put("CUSTOMERNAME_ID", this.get32UUID());
|
||||
pd.put("TRANSPORTATIONCOMPANY", Jurisdiction.getCORPINFO_ID()); // 设置运输公司ID
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 设置运输公司ID
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 设置创建人ID
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); // 设置创建人姓名
|
||||
pd.put("CREATETIME", DateUtil.date2Str(new Date())); // 设置创建时间
|
||||
pd.put("ISDELETE", "0"); // 设置删除标志
|
||||
|
||||
customerManagementService.save(pd);
|
||||
|
||||
if ( pd.getString("contacts") != null && ! pd.getString("contacts").isEmpty()){
|
||||
if (pd.getString("contacts") != null && !pd.getString("contacts").isEmpty()) {
|
||||
List<PageData> contacts = JSON.parseArray(pd.getString("contacts"), PageData.class);
|
||||
for (PageData contact : contacts) {
|
||||
PageData contactPd = new PageData();
|
||||
|
|
@ -63,7 +71,6 @@ public class TrafficSecurityCustomerManagementController extends BaseController
|
|||
contactPd.put("CONTACTPHONE", contact.get("CONTACTPHONE"));
|
||||
contactPd.put("CUSTOMERADDRESS", contact.get("CUSTOMERADDRESS"));
|
||||
contactPd.put("ISDELETE", "0"); // 设置删除标志
|
||||
|
||||
customerManagementService.saveContact(contactPd);
|
||||
}
|
||||
}
|
||||
|
|
@ -73,7 +80,6 @@ public class TrafficSecurityCustomerManagementController extends BaseController
|
|||
return map;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/listForSecurityCustomerManagement")
|
||||
@ResponseBody
|
||||
public Object listForSecurityCustomerManagement(Page page) throws Exception {
|
||||
|
|
@ -81,15 +87,7 @@ public class TrafficSecurityCustomerManagementController extends BaseController
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
String CUSTOMERTYPE = pd.getString("CUSTOMERTYPE"); // 关键词检索条件
|
||||
if (Tools.notEmpty(CUSTOMERTYPE))
|
||||
pd.put("CUSTOMERTYPE", CUSTOMERTYPE.trim());
|
||||
|
||||
String TRANSPORTATIONCOMPANY = pd.getString("TRANSPORTATIONCOMPANY"); // 关键词检索条件
|
||||
if (Tools.notEmpty(TRANSPORTATIONCOMPANY))
|
||||
pd.put("REPLYSTTRANSPORTATIONCOMPANYATUS", TRANSPORTATIONCOMPANY.trim());
|
||||
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = customerManagementService.listForSecurityCustomerManagement(page);
|
||||
map.put("varList", varList);
|
||||
|
|
@ -97,23 +95,150 @@ public class TrafficSecurityCustomerManagementController extends BaseController
|
|||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
@RequestMapping(value = "/delete")
|
||||
@ResponseBody
|
||||
public Object delete() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
public Object delete(Page page) 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("DELETORNAME", Jurisdiction.getName());//删除人姓名
|
||||
pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
// 获取当前客户下的所有联系人
|
||||
List<PageData> customers = customerManagementService.findByCustomerManagementId(pd);
|
||||
// 获取所有订单
|
||||
PageData pageData = new PageData();
|
||||
pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
page.setPd(pageData);
|
||||
List<PageData> waybillRegistrations = trafficSecurityWaybillRegistrationService.listForSecurityWaybill(page);
|
||||
for (PageData customer : customers) {
|
||||
if (waybillRegistrations.stream()
|
||||
.filter(waybillRegistration -> waybillRegistration.containsValue(customer.getString("CONTACT_ID"))).findAny().isPresent()) {
|
||||
map.put("pd", "1");
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
customerManagementService.delete(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/getTrafficCustomerSelectList")
|
||||
@ResponseBody
|
||||
public Object getTrafficCustomerSelectList() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
List<PageData> varList = customerManagementService.getTrafficCustomerSelectList(pd);
|
||||
map.put("varList", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/getTrafficCustomerSelectView")
|
||||
@ResponseBody
|
||||
public Object getTrafficCustomerSelectView() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pd = customerManagementService.getTrafficCustomerSelectView(pd); //根据ID读取客户管理信息
|
||||
PageData pageData = new PageData();
|
||||
pageData.put("CUSTOMERMANAGEMENT_ID", pd.getString("CUSTOMERMANAGEMENT_ID"));
|
||||
pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
List<PageData> customercontactList = customerManagementService.findByCustomerManagementId(pageData);
|
||||
pd.put("customercontactList", customercontactList);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/edit")
|
||||
@ResponseBody
|
||||
public Object edit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); // 修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); // 修改人姓名
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
// 修改 客户管理表
|
||||
customerManagementService.edit(pd);
|
||||
if (pd.getString("contacts") != null && !pd.getString("contacts").isEmpty()) {
|
||||
List<PageData> contacts = JSONArray.parseArray(pd.getString("contacts"), PageData.class);
|
||||
for (PageData contact : contacts) {
|
||||
PageData contactInfo = customerManagementService.findByContactId(contact.getString("CUSTOMERCONTACT_ID"));
|
||||
if (ObjectUtil.isEmpty(contactInfo)) {
|
||||
PageData pageData = new PageData();
|
||||
pageData.put("CUSTOMERADDRESS_ID", this.get32UUID());
|
||||
pageData.put("ISDELETE", "0");
|
||||
pageData.put("CUSTOMERCONTACT_ID", this.get32UUID());
|
||||
pageData.put("CREATOR", Jurisdiction.getUSER_ID());
|
||||
pageData.put("CREATORNAME", Jurisdiction.getName());
|
||||
pageData.put("CONTACT_ID", this.get32UUID());
|
||||
pageData.put("CREATETIME", DateUtil.date2Str(new Date()));
|
||||
pageData.put("CUSTOMERMANAGEMENT_ID", pd.getString("CUSTOMERMANAGEMENT_ID"));
|
||||
pageData.put("CONTACT", contact.getString("CONTACT"));
|
||||
pageData.put("CUSTOMERADDRESS", contact.getString("CUSTOMERADDRESS"));
|
||||
pageData.put("CONTACTPHONE", contact.getString("CONTACTPHONE"));
|
||||
customerManagementService.saveContact(pageData);
|
||||
} else {
|
||||
if (!StringUtils.equals(contact.getString("CONTACT"), contactInfo.getString("CONTACT"))
|
||||
|| !StringUtils.equals(contact.getString("CONTACTPHONE"), contactInfo.getString("CONTACTPHONE"))
|
||||
|| !StringUtils.equals(contact.getString("CUSTOMERADDRESS"), contactInfo.getString("CUSTOMERADDRESS"))) {
|
||||
contact.put("OPERATOR", Jurisdiction.getUSER_ID()); // 修改人id
|
||||
contact.put("OPERATORNAME", Jurisdiction.getName()); // 修改人姓名
|
||||
contact.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
customerManagementService.editContactInfo(contact);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
map.put("result", errInfo);
|
||||
map.put("pd", pd);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/deleteContactInfo")
|
||||
@ResponseBody
|
||||
public Object deleteContactInfo(Page page) 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.getName());//删除人姓名
|
||||
pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
PageData contact = customerManagementService.findByContactId(pd.getString("CUSTOMERCONTACT_ID"));
|
||||
String contactId = contact.getString("CONTACT_ID");
|
||||
PageData pageData = new PageData();
|
||||
pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
page.setPd(pageData);
|
||||
List<PageData> orderList = trafficSecurityWaybillRegistrationService.listForSecurityWaybill(page);
|
||||
if (orderList.stream().parallel()
|
||||
.filter(order -> order.containsValue(contactId)).findAny().isPresent()) {
|
||||
map.put("pd", "1");
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
customerManagementService.deleteContactById(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,22 +136,7 @@ public class TrafficSecurityLaborContractController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
String CONTRACTNAME = pd.getString("CONTRACTNAME"); // 关键词检索条件
|
||||
if (Tools.notEmpty(CONTRACTNAME))
|
||||
pd.put("CONTRACTNAME", CONTRACTNAME.trim());
|
||||
|
||||
String COMPLETIONSTATUS = pd.getString("COMPLETIONSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(COMPLETIONSTATUS))
|
||||
pd.put("COMPLETIONSTATUS", COMPLETIONSTATUS.trim());
|
||||
|
||||
String VALIDSTATUS = pd.getString("VALIDSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(VALIDSTATUS))
|
||||
pd.put("VALIDSTATUS", VALIDSTATUS.trim());
|
||||
|
||||
String ISSIGNED = pd.getString("ISSIGNED"); // 关键词检索条件
|
||||
if (Tools.notEmpty(ISSIGNED))
|
||||
pd.put("ISSIGNED", ISSIGNED.trim());
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = laborContractService.listForLaborContract(page);
|
||||
|
|
|
|||
|
|
@ -1,12 +1,18 @@
|
|||
package com.zcloud.controller.comprehensive;
|
||||
|
||||
import cn.hutool.db.sql.SqlBuilder;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.comprehensive.TrafficSecurityCustomerManagementService;
|
||||
import com.zcloud.service.comprehensive.TrafficSecurityLocationManagementService;
|
||||
import com.zcloud.service.comprehensive.TrafficSecurityWaybillRegistrationService;
|
||||
import com.zcloud.util.DateUtil;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import com.zcloud.util.Tools;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
|
@ -14,10 +20,7 @@ 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;
|
||||
import java.util.*;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/securitylocation")
|
||||
|
|
@ -25,6 +28,10 @@ public class TrafficSecurityLocationManagementController extends BaseController
|
|||
|
||||
@Autowired
|
||||
private TrafficSecurityLocationManagementService locationManagementService;
|
||||
|
||||
@Autowired
|
||||
private TrafficSecurityWaybillRegistrationService trafficSecurityWaybillRegistrationService;
|
||||
|
||||
//新增
|
||||
@RequestMapping(value = "/add")
|
||||
@ResponseBody
|
||||
|
|
@ -32,9 +39,8 @@ public class TrafficSecurityLocationManagementController extends BaseController
|
|||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
|
||||
String locationmanagement_id = this.get32UUID();
|
||||
pd.put("TRANSPORTATIONCOMPANY", Jurisdiction.getCORPINFO_ID()); // 运输企业
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 运输企业
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 创建人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); // 创建人姓名
|
||||
pd.put("LOCATIONMANAGEMENT_ID", locationmanagement_id); // 主键
|
||||
|
|
@ -42,7 +48,15 @@ public class TrafficSecurityLocationManagementController extends BaseController
|
|||
pd.put("ADDRESSDETAILS_ID", this.get32UUID());
|
||||
pd.put("CREATETIME", DateUtil.date2Str(new Date())); // 添加时间
|
||||
pd.put("ISDELETE", "0");
|
||||
|
||||
String[] addrIds = JSON.parseObject(pd.getString("ADMINISTRATIVEREGIONS_ID"), String[].class);
|
||||
String addressId = "";
|
||||
for (String addrId : addrIds) {
|
||||
addressId = addressId + addrId + ",";
|
||||
}
|
||||
if(addressId.endsWith(",")){
|
||||
addressId = addressId.substring(0,addressId.length() - 1);
|
||||
}
|
||||
pd.put("ADMINISTRATIVEREGIONS_ID", addressId);
|
||||
locationManagementService.save(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("pd", pd);
|
||||
|
|
@ -54,18 +68,9 @@ public class TrafficSecurityLocationManagementController extends BaseController
|
|||
public Object listForSecurityLocationManagement(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
|
||||
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());
|
||||
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = locationManagementService.listForSecurityLocationManagement(page);
|
||||
map.put("varList", varList);
|
||||
|
|
@ -81,7 +86,7 @@ public class TrafficSecurityLocationManagementController extends BaseController
|
|||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
@ResponseBody
|
||||
public Object delete() throws Exception{
|
||||
public Object delete(Page page) throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
|
|
@ -89,9 +94,73 @@ public class TrafficSecurityLocationManagementController extends BaseController
|
|||
pd.put("DELETOR", Jurisdiction.getUSER_ID());//删除人id
|
||||
pd.put("DELETORNAME", Jurisdiction.getUsername());//删除人姓名
|
||||
pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
PageData locationInfo = locationManagementService.getTrafficLocationInfo(pd);
|
||||
// 获取地点Id
|
||||
String locationId = locationInfo.getString("LOCATIONNAME_ID");
|
||||
// 获取所有运单
|
||||
PageData pageData = new PageData();
|
||||
pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
page.setPd(pageData);
|
||||
List<PageData> waybillRegistrationList = trafficSecurityWaybillRegistrationService.listForSecurityWaybill(page);
|
||||
// 判断所有运单中是否有此地点
|
||||
if(waybillRegistrationList.stream().parallel().filter(data -> data.containsValue(locationId)).findAny().isPresent()) {
|
||||
map.put("pd", "1");
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
locationManagementService.delete(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/getTrafficLocationSelectList")
|
||||
@ResponseBody
|
||||
public Object getTrafficLocationSelectList() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
List<PageData> varList = locationManagementService.getTrafficLocationSelectList(pd);
|
||||
map.put("varList", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
//详情
|
||||
@RequestMapping(value="/goEdit")
|
||||
@ResponseBody
|
||||
public Object getTrafficLocationInfo() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pd = locationManagementService.getTrafficLocationInfo(pd); // 根据id读取地点信息
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
//修改
|
||||
@RequestMapping(value = "/edit")
|
||||
@ResponseBody
|
||||
public Object edit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); // 修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); // 修改人姓名
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
locationManagementService.edit(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("pd", pd);
|
||||
return map;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import java.util.Date;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/managementagreement")
|
||||
|
|
@ -29,7 +30,7 @@ public class TrafficSecurityManagementAgreementController extends BaseController
|
|||
//新增
|
||||
@RequestMapping(value = "/add")
|
||||
@ResponseBody
|
||||
public Object add(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception {
|
||||
public Object add(@RequestParam(value = "FFILE", required = false) MultipartFile file) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
|
|
@ -37,7 +38,7 @@ public class TrafficSecurityManagementAgreementController extends BaseController
|
|||
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 创建人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); // 创建人姓名
|
||||
pd.put("OPERATINGCOMPANY", Jurisdiction.getCORPINFO_ID()); // 经营企业
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 经营企业
|
||||
pd.put("MANAGEMENTAGREEMENT_ID", managementagreementId); // 主键
|
||||
pd.put("CREATETIME", DateUtil.date2Str(new Date())); // 添加时间
|
||||
pd.put("COMPLETIONSTATUS", "0");
|
||||
|
|
@ -50,20 +51,20 @@ public class TrafficSecurityManagementAgreementController extends BaseController
|
|||
}
|
||||
String ffile = DateUtil.getDays();
|
||||
|
||||
if (file != null && StringUtils.isNotBlank(pd.getString("CREATORNAME"))){
|
||||
if (file != null && StringUtils.isNotBlank(pd.getString("CREATORNAME"))) {
|
||||
pd.put("COMPLETIONSTATUS", "1");
|
||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".") + 1).toLowerCase();
|
||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName)) {
|
||||
errInfo = "fail";
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "文件格式不正确!");
|
||||
return map;
|
||||
}
|
||||
String fileName =file.getOriginalFilename();
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile);
|
||||
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName);
|
||||
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
|
||||
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
|
||||
String fileName = file.getOriginalFilename();
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||
pd.put("ATTACHMENT_NAME", pd.getString("CREATORNAME"));
|
||||
pd.put("CONFIRM_MESSAGE_TIME", DateUtil.date2Str(new Date()));
|
||||
}
|
||||
|
||||
managementAgreementService.save(pd);
|
||||
|
|
@ -76,7 +77,7 @@ public class TrafficSecurityManagementAgreementController extends BaseController
|
|||
//修改
|
||||
@RequestMapping(value = "/edit")
|
||||
@ResponseBody
|
||||
public Object edit(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception {
|
||||
public Object edit(@RequestParam(value = "FFILE", required = false) MultipartFile file) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
|
|
@ -84,13 +85,13 @@ public class TrafficSecurityManagementAgreementController extends BaseController
|
|||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); // 修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); // 修改人姓名
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
pd.put("OPERATINGCOMPANY", Jurisdiction.getCORPINFO_ID()); // 经营企业
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 经营企业
|
||||
pd.put("ISDELETE", "0");
|
||||
String ffile = DateUtil.getDays();
|
||||
|
||||
if (file != null && StringUtils.isNotBlank(pd.getString("OPERATORNAME"))){
|
||||
if (file != null && StringUtils.isNotBlank(pd.getString("OPERATORNAME"))) {
|
||||
pd.put("COMPLETIONSTATUS", "1");
|
||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".") + 1).toLowerCase();
|
||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName)) {
|
||||
errInfo = "fail";
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -98,11 +99,11 @@ public class TrafficSecurityManagementAgreementController extends BaseController
|
|||
return map;
|
||||
}
|
||||
//String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
String fileName =file.getOriginalFilename();
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile);
|
||||
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName);
|
||||
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
|
||||
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
|
||||
String fileName = file.getOriginalFilename();
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||
pd.put("ATTACHMENT_NAME", pd.getString("CREATORNAME"));
|
||||
pd.put("CONFIRM_MESSAGE_TIME", DateUtil.date2Str(new Date()));
|
||||
}
|
||||
|
||||
managementAgreementService.edit(pd);
|
||||
|
|
@ -114,6 +115,7 @@ public class TrafficSecurityManagementAgreementController extends BaseController
|
|||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
|
|
@ -125,21 +127,19 @@ public class TrafficSecurityManagementAgreementController extends BaseController
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
String SYSTEMNAME = pd.getString("SYSTEMNAME"); // 关键词检索条件
|
||||
if (Tools.notEmpty(SYSTEMNAME))
|
||||
pd.put("SYSTEMNAME", SYSTEMNAME.trim());
|
||||
|
||||
String COMPLETIONSTATUS = pd.getString("COMPLETIONSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(COMPLETIONSTATUS))
|
||||
pd.put("COMPLETIONSTATUS", COMPLETIONSTATUS.trim());
|
||||
|
||||
String VALIDSTATUS = pd.getString("VALIDSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(VALIDSTATUS))
|
||||
pd.put("VALIDSTATUS", VALIDSTATUS.trim());
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = managementAgreementService.listForManagementAgreementlist(page);
|
||||
|
||||
/*varList.stream().anyMatch(data -> {
|
||||
if (DateUtil.getDay().equals(data.getString("EXPIRYDATE")) || DateUtil.compareDate(data.getString("EXPIRYDATE"), DateUtil.getDay())) {
|
||||
data.put("VALIDSTATUS", "1");
|
||||
} else {
|
||||
data.put("VALIDSTATUS", "0");
|
||||
}
|
||||
return false;
|
||||
});*/
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -147,14 +147,14 @@ public class TrafficSecurityManagementAgreementController extends BaseController
|
|||
}
|
||||
|
||||
//详情
|
||||
@RequestMapping(value="/goEdit")
|
||||
@RequestMapping(value = "/goEdit")
|
||||
@ResponseBody
|
||||
public Object goEdit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object goEdit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd = managementAgreementService.findById(pd); //根据ID读取
|
||||
pd = managementAgreementService.findById(pd); //根据ID读取
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
|
|
@ -162,18 +162,19 @@ public class TrafficSecurityManagementAgreementController extends BaseController
|
|||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
@RequestMapping(value = "/delete")
|
||||
@ResponseBody
|
||||
public Object delete() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
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("DELETORNAME", Jurisdiction.getName());//删除人姓名
|
||||
pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间
|
||||
managementAgreementService.delete(pd);
|
||||
map.put("result", errInfo);
|
||||
|
|
|
|||
|
|
@ -122,23 +122,7 @@ public class TrafficSecurityManagementStaffingController extends BaseController
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
String SYSTEMNAME = pd.getString("SYSTEMNAME"); // 关键词检索条件
|
||||
if (Tools.notEmpty(SYSTEMNAME))
|
||||
pd.put("SYSTEMNAME", SYSTEMNAME.trim());
|
||||
|
||||
String COMPLETIONSTATUS = pd.getString("COMPLETIONSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(COMPLETIONSTATUS))
|
||||
pd.put("COMPLETIONSTATUS", COMPLETIONSTATUS.trim());
|
||||
|
||||
String VALIDSTATUS = pd.getString("VALIDSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(VALIDSTATUS))
|
||||
pd.put("VALIDSTATUS", VALIDSTATUS.trim());
|
||||
|
||||
String OPERATIONTYPE = pd.getString("OPERATIONTYPE"); // 关键词检索条件
|
||||
if (Tools.notEmpty(OPERATIONTYPE))
|
||||
pd.put("OPERATIONTYPE", OPERATIONTYPE.trim());
|
||||
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = securityManagementStaffingService.listForSecurityStaffing(page);
|
||||
map.put("varList", varList);
|
||||
|
|
|
|||
|
|
@ -30,6 +30,12 @@ public class TrafficSecurityNoticeController extends BaseController {
|
|||
@Autowired
|
||||
private Smb smb;
|
||||
|
||||
@Autowired
|
||||
private UsersService usersService;
|
||||
|
||||
@Autowired
|
||||
private TrafficSecurityReadDetailService trafficSecurityReadDetailService;
|
||||
|
||||
//新增
|
||||
@RequestMapping(value = "/add")
|
||||
@ResponseBody
|
||||
|
|
@ -41,12 +47,11 @@ public class TrafficSecurityNoticeController extends BaseController {
|
|||
String notificationId = this.get32UUID();
|
||||
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 创建人id
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getPOST_ID()); // 创建人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); // 创建人姓名
|
||||
pd.put("TRANSPORTATIONCOMPANY", Jurisdiction.getCORPINFO_ID()); // 运输企业
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 运输企业
|
||||
pd.put("NOTIFICATION_ID", notificationId); // 主键
|
||||
pd.put("CREATETIME", DateUtil.date2Str(new Date())); // 添加时间
|
||||
pd.put("POSTSTATUS", "1"); // 发布状态
|
||||
pd.put("POSTSTATUS", "0"); // 发布状态
|
||||
pd.put("SIGNEDSTATUS", "0"); // 签收状态
|
||||
pd.put("ISDELETE", "0");
|
||||
|
||||
|
|
@ -84,16 +89,6 @@ public class TrafficSecurityNoticeController extends BaseController {
|
|||
pd.put("SIGNING", "0"); // 签收情况
|
||||
pd.put("REPLY", "0"); // 回复情况
|
||||
securityNoticeService.save(pd);
|
||||
|
||||
String[] personIds = pd.getString("PERSON_ID").split(",");
|
||||
for (String personId : personIds) {
|
||||
pd.put("NOTIFICATION_ID", notificationId);
|
||||
pd.put("PERSON_ID", personId.trim());
|
||||
pd.put("READDETAIL_ID", this.get32UUID()); // 主键
|
||||
pd.put("REPLYSTATUS", "0"); // 主键
|
||||
pd.put("SIGNEDSTATUS", "0"); // 主键
|
||||
securityReadDetail.save(pd);
|
||||
}
|
||||
map.put("result", errInfo);
|
||||
map.put("pd", pd);
|
||||
return map;
|
||||
|
|
@ -134,42 +129,34 @@ public class TrafficSecurityNoticeController extends BaseController {
|
|||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
|
||||
String TITLE = pd.getString("TITLE");// 关键词检索条件
|
||||
if (Tools.notEmpty(TITLE))
|
||||
pd.put("TITLE", TITLE.trim());
|
||||
|
||||
String REPLYSTATUS = pd.getString("REPLYSTATUS");// 关键词检索条件
|
||||
if (Tools.notEmpty(REPLYSTATUS))
|
||||
pd.put("REPLYSTATUS", REPLYSTATUS.trim());
|
||||
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = securityNoticeService.listForSecurityNotice(page);
|
||||
|
||||
long replyStatusNum = 0;
|
||||
long signedStatusNum = 0;
|
||||
for (PageData data : varList) {
|
||||
pd.put("NOTIFICATION_ID", data.get("NOTIFICATION_ID"));
|
||||
page.setPd(pd);
|
||||
List<PageData> readDetail = securityReadDetail.getAllReadDetail(page);
|
||||
// pd.put("NOTIFICATION_ID", data.get("NOTIFICATION_ID"));
|
||||
// page.setPd(pd);
|
||||
// List<PageData> readDetail = securityReadDetail.getAllReadDetail(page);
|
||||
//
|
||||
// long currentReplyStatusNum = readDetail.stream()
|
||||
// .filter(d -> "1".equals(d.getString("REPLY")))
|
||||
// .count();
|
||||
// long currentSignedStatusNum = readDetail.stream()
|
||||
// .filter(d -> "1".equals(d.getString("SIGNING")))
|
||||
// .count();
|
||||
// long currentTotalReadDetail = readDetail.size();
|
||||
//
|
||||
// replyStatusNum += currentReplyStatusNum;
|
||||
// signedStatusNum += currentSignedStatusNum;
|
||||
// data.put("REPLYSTATUSNUM", currentReplyStatusNum);
|
||||
// data.put("SIGNEDSTATUSNUM", currentSignedStatusNum);
|
||||
|
||||
long currentReplyStatusNum = readDetail.stream()
|
||||
.filter(d -> "1".equals(d.getString("REPLY")))
|
||||
.count();
|
||||
long currentSignedStatusNum = readDetail.stream()
|
||||
.filter(d -> "1".equals(d.getString("SIGNING")))
|
||||
.count();
|
||||
long currentTotalReadDetail = readDetail.size();
|
||||
|
||||
replyStatusNum += currentReplyStatusNum;
|
||||
signedStatusNum += currentSignedStatusNum;
|
||||
|
||||
data.put("TOTALREADDETAIL", currentTotalReadDetail);
|
||||
data.put("REPLYSTATUSNUM", currentReplyStatusNum);
|
||||
data.put("SIGNEDSTATUSNUM", currentSignedStatusNum);
|
||||
// 获取 回复与签收 的总人数
|
||||
data.put("TOTALREADDETAIL", Tools.notEmpty(data.getString("PERSON_ID"))?data.getString("PERSON_ID").split(",").length : 0);
|
||||
}
|
||||
map.put("REPLYSTATUSNUM", String.valueOf(replyStatusNum));
|
||||
map.put("SIGNEDSTATUSNUM", String.valueOf(signedStatusNum));
|
||||
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -179,7 +166,6 @@ public class TrafficSecurityNoticeController extends BaseController {
|
|||
|
||||
//详情
|
||||
@RequestMapping(value="/goEdit")
|
||||
// @RequiresPermissions("traininginfo:edit")
|
||||
@ResponseBody
|
||||
public Object goEdit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
|
|
@ -187,11 +173,97 @@ public class TrafficSecurityNoticeController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd = securityNoticeService.findById(pd);//根据ID读取
|
||||
String[] personIds = pd.getString("PERSON_ID").split(",");
|
||||
List<PageData> readDetail = new ArrayList<>();
|
||||
List<PageData> names = new ArrayList<>();
|
||||
for (String personId : personIds) {
|
||||
PageData pd2 = new PageData();
|
||||
pd2.put("NOTIFICATION_ID", pd.getString("NOTIFICATION_ID"));
|
||||
pd2.put("PERSON_ID",personId.trim());
|
||||
PageData pageData = trafficSecurityReadDetailService.listByUserIdOrNoticeId(pd2);
|
||||
readDetail.add(pageData);
|
||||
|
||||
// 通过 用户id获取用户名
|
||||
PageData user = new PageData();
|
||||
user.put("USER_ID",personId.trim());
|
||||
PageData pageData1 = usersService.findById(user);
|
||||
names.add(pageData1);
|
||||
}
|
||||
pd.put("readDetail",readDetail);
|
||||
pd.put("names",names);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/edit")
|
||||
@ResponseBody
|
||||
public Object edit(
|
||||
@RequestParam(value="fileList",required=false) MultipartFile file,
|
||||
@RequestParam(value="videoList",required=false) MultipartFile videoFile)
|
||||
throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); // 创建人id
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getPOST_ID()); // 创建人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); // 创建人姓名
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 运输企业
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 添加时间
|
||||
pd.put("POSTSTATUS", "0"); // 发布状态
|
||||
pd.put("SIGNEDSTATUS", "0"); // 签收状态
|
||||
pd.put("ISDELETE", "0");
|
||||
|
||||
String ffile = DateUtil.getDays();
|
||||
if (file != null && StringUtils.isNotBlank(pd.getString("CREATORNAME"))){
|
||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName)) {
|
||||
errInfo = "fail";
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "文件格式不正确!");
|
||||
return map;
|
||||
}
|
||||
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
|
||||
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
|
||||
}
|
||||
|
||||
// 处理 videoFile
|
||||
if (videoFile != null && StringUtils.isNotBlank(pd.getString("CREATORNAME"))) {
|
||||
String videoSuffixName = videoFile.getOriginalFilename().substring(videoFile.getOriginalFilename().lastIndexOf(".") + 1).toLowerCase();
|
||||
if (!"mp4".equals(videoSuffixName)) {
|
||||
errInfo = "fail";
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "视频文件格式不正确!");
|
||||
return map;
|
||||
}
|
||||
String videoFileName = this.get32UUID() + videoFile.getOriginalFilename().substring(videoFile.getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(videoFile, videoFileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
pd.put("VIDEO_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + videoFileName);
|
||||
pd.put("VIDEO_NAME",pd.getString("CREATORNAME"));
|
||||
}
|
||||
|
||||
pd.put("SIGNING", "0"); // 签收情况
|
||||
pd.put("REPLY", "0"); // 回复情况
|
||||
securityNoticeService.edit(pd);
|
||||
|
||||
/*String[] personIds = pd.getString("PERSON_ID").split(",");
|
||||
for (String personId : personIds) {
|
||||
//pd.put("NOTIFICATION_ID", notificationId);
|
||||
pd.put("PERSON_ID", personId.trim());
|
||||
pd.put("READDETAIL_ID", this.get32UUID()); // 主键
|
||||
pd.put("REPLYSTATUS", "0"); // 主键
|
||||
pd.put("SIGNEDSTATUS", "0"); // 主键
|
||||
securityReadDetail.save(pd);
|
||||
}*/
|
||||
map.put("result", errInfo);
|
||||
map.put("pd", pd);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param
|
||||
* @throws Exception
|
||||
|
|
@ -205,7 +277,7 @@ public class TrafficSecurityNoticeController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("DELETOR", Jurisdiction.getUSER_ID());//删除人id
|
||||
pd.put("DELETORNAME", Jurisdiction.getUsername());//删除人姓名
|
||||
pd.put("DELETORNAME", Jurisdiction.getName());//删除人姓名
|
||||
pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间
|
||||
securityNoticeService.delete(pd);
|
||||
securityReadDetail.delete(pd);
|
||||
|
|
@ -230,7 +302,7 @@ public class TrafficSecurityNoticeController extends BaseController {
|
|||
String ArrayDATA_IDS[] = DATA_IDS.split(",");
|
||||
for (String id : ArrayDATA_IDS) {
|
||||
pd.put("NOTIFICATION_ID", id);
|
||||
pd.put("DELETORNAME", Jurisdiction.getUsername());//删除人
|
||||
pd.put("DELETORNAME", Jurisdiction.getName());//删除人
|
||||
pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间
|
||||
securityNoticeService.delete(pd);
|
||||
}
|
||||
|
|
@ -241,4 +313,39 @@ public class TrafficSecurityNoticeController extends BaseController {
|
|||
map.put("result", errInfo);//返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value="/issueSecurityNotice")
|
||||
@ResponseBody
|
||||
public Object issueSecurityNotice() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
// 修改安全通知发布状态
|
||||
securityNoticeService.issueSecurityNotice(pd);
|
||||
// 查询此条通知的信息,获取 推送的ID
|
||||
PageData securityNotice = securityNoticeService.findById(pd);
|
||||
// 把此条通知的ID 和 推送人的ID 存入到 发部表
|
||||
String[] personIds = securityNotice.getString("PERSON_ID").split(",");
|
||||
for (int i = 0; i < personIds.length; i++) {
|
||||
PageData issue = new PageData();
|
||||
issue.put("READDETAIL_ID", this.get32UUID());
|
||||
issue.put("NOTIFICATION_ID",securityNotice.getString("NOTIFICATION_ID"));
|
||||
issue.put("TITLE",securityNotice.getString("TITLE"));
|
||||
issue.put("LEVEL",securityNotice.getString("LEVEL"));
|
||||
issue.put("REPLY", "0");
|
||||
issue.put("SIGNING", "0");
|
||||
issue.put("CORPINFO_ID", securityNotice.getString("CORPINFO_ID"));
|
||||
issue.put("PERSON_ID",personIds[i].trim());
|
||||
issue.put("ISDELETE", "0");
|
||||
issue.put("CREATOR", Jurisdiction.getUSER_ID());
|
||||
issue.put("CREATORNAME", Jurisdiction.getName());
|
||||
issue.put("CREATETIME",DateUtil.date2Str(new Date()));
|
||||
// 编写发布的 insert
|
||||
trafficSecurityReadDetailService.save(issue);
|
||||
}
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.zcloud.controller.base.BaseController;
|
|||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.comprehensive.TrafficSecurityViolationRegistrationService;
|
||||
import com.zcloud.service.system.UsersService;
|
||||
import com.zcloud.util.*;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -23,12 +24,13 @@ import java.util.Map;
|
|||
public class TrafficSecurityViolationRegistrationController extends BaseController {
|
||||
@Autowired
|
||||
private TrafficSecurityViolationRegistrationService violationRegistrationService;
|
||||
|
||||
@Autowired
|
||||
private Smb smb;
|
||||
|
||||
@RequestMapping(value = "/add")
|
||||
@ResponseBody
|
||||
public Object add(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception {
|
||||
public Object add(@RequestParam(value = "FFILE", required = false) MultipartFile file) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
|
|
@ -39,23 +41,23 @@ public class TrafficSecurityViolationRegistrationController extends BaseControll
|
|||
pd.put("CREATORNAME", Jurisdiction.getName()); // 创建人姓名
|
||||
pd.put("REGISTRATION_ID", registration_id); // 主键
|
||||
pd.put("CREATETIME", DateUtil.date2Str(new Date())); // 添加时间
|
||||
pd.put("TRANSPORTATIONCOMPANY", Jurisdiction.getCORPINFO_ID()); // 运输企业
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 运输企业
|
||||
pd.put("ISDELETE", "0");
|
||||
|
||||
String ffile = DateUtil.getDays();
|
||||
if (file != null && StringUtils.isNotBlank(pd.getString("CREATORNAME"))){
|
||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||
if (file != null && StringUtils.isNotBlank(pd.getString("CREATORNAME"))) {
|
||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".") + 1).toLowerCase();
|
||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName)) {
|
||||
errInfo = "fail";
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "文件格式不正确!");
|
||||
return map;
|
||||
}
|
||||
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("TRANSPORTATIONCOMPANY") + "/" + ffile);
|
||||
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("TRANSPORTATIONCOMPANY") + "/" + ffile + "/" + fileName);
|
||||
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
|
||||
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
|
||||
String fileName = file.getOriginalFilename();
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||
pd.put("ATTACHMENT_NAME", pd.getString("CREATORNAME"));
|
||||
pd.put("CONFIRM_MESSAGE_TIME", DateUtil.date2Str(new Date()));
|
||||
}
|
||||
|
||||
violationRegistrationService.save(pd);
|
||||
|
|
@ -72,14 +74,7 @@ public class TrafficSecurityViolationRegistrationController extends BaseControll
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
String USER_ID = pd.getString("USER_ID"); // 运输企业
|
||||
if (Tools.notEmpty(USER_ID))
|
||||
pd.put("USER_ID", USER_ID.trim());
|
||||
|
||||
String PENALTYTIME = pd.getString("PENALTYTIME"); // 运输车辆
|
||||
if (Tools.notEmpty(PENALTYTIME))
|
||||
pd.put("PENALTYTIME", PENALTYTIME.trim());
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = violationRegistrationService.listForViolationRegistration(page);
|
||||
|
|
@ -89,19 +84,21 @@ public class TrafficSecurityViolationRegistrationController extends BaseControll
|
|||
return map;
|
||||
}
|
||||
|
||||
/**删除
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
@RequestMapping(value = "/delete")
|
||||
@ResponseBody
|
||||
public Object delete() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
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("DELETORNAME", Jurisdiction.getName());//删除人姓名
|
||||
pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间
|
||||
violationRegistrationService.delete(pd);
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -110,10 +107,11 @@ public class TrafficSecurityViolationRegistrationController extends BaseControll
|
|||
|
||||
/**
|
||||
* 查看详情
|
||||
*
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/goEdit")
|
||||
@RequestMapping(value = "/goEdit")
|
||||
@ResponseBody
|
||||
public Object goEdit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
|
|
@ -128,7 +126,7 @@ public class TrafficSecurityViolationRegistrationController extends BaseControll
|
|||
//修改
|
||||
@RequestMapping(value = "/edit")
|
||||
@ResponseBody
|
||||
public Object edit(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception {
|
||||
public Object edit(@RequestParam(value = "FFILE", required = false) MultipartFile file) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
|
|
@ -138,20 +136,20 @@ public class TrafficSecurityViolationRegistrationController extends BaseControll
|
|||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
|
||||
String ffile = DateUtil.getDays();
|
||||
if (file != null && StringUtils.isNotBlank(pd.getString("OPERATORNAME"))){
|
||||
if (file != null && StringUtils.isNotBlank(pd.getString("OPERATORNAME"))) {
|
||||
pd.put("COMPLETIONSTATUS", "1");
|
||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".") + 1).toLowerCase();
|
||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName)) {
|
||||
errInfo = "fail";
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "文件格式不正确!");
|
||||
return map;
|
||||
}
|
||||
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
String fileName = file.getOriginalFilename();
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile);
|
||||
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName);
|
||||
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
|
||||
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
|
||||
pd.put("ATTACHMENT_NAME", pd.getString("CREATORNAME"));
|
||||
pd.put("CONFIRM_MESSAGE_TIME", DateUtil.date2Str(new Date()));
|
||||
}
|
||||
|
||||
violationRegistrationService.edit(pd);
|
||||
|
|
|
|||
|
|
@ -1,13 +1,16 @@
|
|||
package com.zcloud.controller.comprehensive;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTOutputVisitor;
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.comprehensive.TrafficDrivingCommitmentService;
|
||||
import com.zcloud.service.comprehensive.TrafficDrivingTypeService;
|
||||
import com.zcloud.service.comprehensive.TrafficSecurityWaybillRegistrationService;
|
||||
import com.zcloud.service.comprehensive.*;
|
||||
import com.zcloud.service.system.UsersService;
|
||||
import com.zcloud.util.*;
|
||||
import org.apache.commons.lang.ObjectUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jose4j.lang.StringUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
|
@ -16,10 +19,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/waybillregistration")
|
||||
|
|
@ -32,6 +33,16 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
|
|||
@Autowired
|
||||
private TrafficDrivingTypeService trafficDrivingTypeService;
|
||||
|
||||
@Autowired
|
||||
private TrafficSecurityCustomerManagementService trafficSecurityCustomerManagementService;
|
||||
|
||||
@Autowired
|
||||
private TrafficDrivingSignService trafficDrivingSignService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private UsersService usersService;
|
||||
|
||||
@RequestMapping(value = "/listForSecurityWaybillre")
|
||||
@ResponseBody
|
||||
public Object listForSecurityWaybillRegistra(Page page) throws Exception {
|
||||
|
|
@ -39,52 +50,39 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
String TITLE = pd.getString("TITLE"); // 关键词检索条件
|
||||
if (Tools.notEmpty(TITLE))
|
||||
pd.put("TITLE", TITLE.trim());
|
||||
|
||||
String REPLYSTATUS = pd.getString("REPLYSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(REPLYSTATUS))
|
||||
pd.put("REPLYSTATUS", REPLYSTATUS.trim());
|
||||
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = trafficSecurityWaybillRegistrationService.listForSecurityWaybill(page);
|
||||
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/forSecurityPerson")
|
||||
@ResponseBody
|
||||
public Object forSecurityPerson() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("TRANSPORTATIONCOMPANY", Jurisdiction.getCORPINFO_ID());
|
||||
pd = trafficSecurityWaybillRegistrationService.forSecurityPerson(pd);
|
||||
pd.put("PRACTITIONER", Jurisdiction.getName());
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
/**
|
||||
* 查看详情
|
||||
*
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/getDetail")
|
||||
@RequestMapping(value = "/getDetail")
|
||||
@ResponseBody
|
||||
public Object goEdit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
List<PageData> commitmentList = trafficDrivingCommitmentService.getDrivingCommitment(pd);
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
List<PageData> varList = trafficDrivingCommitmentService.getDrivingCommitment(pd);
|
||||
List<PageData> list = trafficDrivingSignService.findWaybillRegistrationId(pd);
|
||||
for (PageData pageData : varList) {
|
||||
for (PageData data : list) {
|
||||
if(StringUtils.equals(pageData.getString("DRIVINGCOMMITMENT_ID"), data.getString("DRIVINGTYPE_ID"))) {
|
||||
pageData.put("STATUS", data.getString("STATUS"));
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
pd = trafficDrivingTypeService.infoCategory(pd); //根据ID读取
|
||||
pd = trafficDrivingTypeService.infoCategory(pd); //根据ID读取
|
||||
// if(pd.getString("OPERATOR"))
|
||||
// pd.put("a", "119.60436762");
|
||||
// pd.put("b", "39.94546157");
|
||||
|
|
@ -98,7 +96,7 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
|
|||
map.put("result", errInfo);
|
||||
map.put("msg", "数据获取失败");
|
||||
}
|
||||
map.put("commitmentList", commitmentList);
|
||||
map.put("commitmentList", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
|
@ -115,7 +113,7 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
|
|||
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 创建人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); // 创建人姓名
|
||||
pd.put("TRANSPORTATIONCOMPANY", Jurisdiction.getCORPINFO_ID()); // 运输企业
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 运输企业
|
||||
pd.put("WAYBILLREGISTRATION_ID", waybillregistrationId); // 主键
|
||||
pd.put("CREATETIME", DateUtil.date2Str(new Date())); // 添加时间
|
||||
pd.put("ISDELETE", "0");
|
||||
|
|
@ -124,7 +122,7 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
|
|||
if (shippingDate != null && shippingDate.after(new Date())) {
|
||||
pd.put("WAYBILLSTATUS", "1");
|
||||
} else {
|
||||
pd.put("WAYBILLSTATUS", "0");
|
||||
pd.put("WAYBILLSTATUS", "3");
|
||||
}
|
||||
|
||||
trafficSecurityWaybillRegistrationService.save(pd);
|
||||
|
|
@ -136,50 +134,145 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
|
|||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
@RequestMapping(value = "/delete")
|
||||
@ResponseBody
|
||||
public Object delete() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
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("DELETORNAME", Jurisdiction.getName());//删除人姓名
|
||||
pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
trafficSecurityWaybillRegistrationService.delete(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/deleteAll")
|
||||
@RequestMapping(value = "/deleteAll")
|
||||
@ResponseBody
|
||||
public Object deleteAll() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object deleteAll() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
String err="";
|
||||
String err = "";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String DATA_IDS = pd.getString("DATA_IDS");
|
||||
if(Tools.notEmpty(DATA_IDS)){
|
||||
if (Tools.notEmpty(DATA_IDS)) {
|
||||
String ArrayDATA_IDS[] = DATA_IDS.split(",");
|
||||
for (String id : ArrayDATA_IDS) {
|
||||
pd.put("WAYBILLREGISTRATION_ID", id);
|
||||
pd.put("DELETORNAME", Jurisdiction.getUsername());//删除人
|
||||
pd.put("DELETORNAME", Jurisdiction.getName());//删除人
|
||||
pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
trafficSecurityWaybillRegistrationService.delete(pd);
|
||||
}
|
||||
errInfo = "success";
|
||||
}else{
|
||||
} else {
|
||||
errInfo = "error";
|
||||
}
|
||||
map.put("result", errInfo);//返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
//详情
|
||||
@RequestMapping(value = "/goEdit")
|
||||
@ResponseBody
|
||||
public Object getSecurityWaybillRegistrationInfo() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pd = trafficSecurityWaybillRegistrationService.findById(pd);//根据ID读
|
||||
pd.put("ENTRUST_PERSON", pd.getString("CLIENTCONTACTPERSON"));
|
||||
pd.put("CONFIRM_PERSON", pd.getString("CONFIRMINGPERSON"));
|
||||
List<String> dispatchers = Arrays.stream(pd.getString("DISPATCHER").split(",")).collect(Collectors.toList());
|
||||
List<PageData> names = new ArrayList<>();
|
||||
dispatchers.forEach(data -> {
|
||||
PageData user = new PageData();
|
||||
user.put("USER_ID", data.trim());
|
||||
PageData userInfo = null;
|
||||
try {
|
||||
userInfo = usersService.findById(user);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
names.add(userInfo);
|
||||
});
|
||||
List<PageData> deptList = usersService.listUserbyDep(pd);
|
||||
pd.put("deptList", deptList);
|
||||
pd.put("names", names);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/getPrincipalContactList")
|
||||
@ResponseBody
|
||||
public Object getPrincipalContactList() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
List<PageData> principalContactList = trafficSecurityCustomerManagementService.getPrincipalContactList(pd);
|
||||
map.put("pd", principalContactList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
//修改
|
||||
@RequestMapping(value = "/edit")
|
||||
@ResponseBody
|
||||
public Object edit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); // 修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); // 修改人姓名
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
PageData pd2 = new PageData();
|
||||
// 修改委托方手机号
|
||||
if(!StringUtils.isEmpty(pd.getString("ENTRUST_PERSON"))) {
|
||||
pd2.put("CONTACT_ID",pd.getString("ENTRUST_PERSON"));
|
||||
PageData client = trafficSecurityCustomerManagementService.findContactByContactId(pd2);
|
||||
if(!ObjectUtil.isEmpty(client)) {
|
||||
if(!StringUtils.equals(client.getString("CONTACTPHONE"), pd.getString("CLIENTCONTACTPHONE"))) {
|
||||
client.put("CONTACTPHONE",pd.getString("CLIENTCONTACTPHONE"));
|
||||
trafficSecurityCustomerManagementService.editContactInfo(client);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 修改确认方手机号
|
||||
if(!StringUtils.isEmpty(pd.getString("CONFIRM_PERSON"))) {
|
||||
pd2.put("CONTACT_ID", pd.getString("CONFIRM_PERSON"));
|
||||
PageData confirmed = trafficSecurityCustomerManagementService.findContactByContactId(pd2);
|
||||
if(!ObjectUtil.isEmpty(confirmed)) {
|
||||
if(!StringUtils.equals(confirmed.getString("CONTACTPHONE"), pd.getString("CONFIRMINGPHONE"))) {
|
||||
confirmed.put("CONTACTPHONE",pd.getString("CONFIRMINGPHONE"));
|
||||
trafficSecurityCustomerManagementService.editContactInfo(confirmed);
|
||||
}
|
||||
}
|
||||
}
|
||||
trafficSecurityWaybillRegistrationService.edit(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("pd", pd);
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,6 +62,9 @@ public class CorpInfoController extends BaseController {
|
|||
private ListManagerService listManagerService;
|
||||
@Autowired
|
||||
private HiddenService hiddenService;
|
||||
// @Autowired
|
||||
// private StudyTaskService studyTaskService;
|
||||
|
||||
@Autowired
|
||||
private Smb smb;
|
||||
|
||||
|
|
@ -631,4 +634,43 @@ public class CorpInfoController extends BaseController {
|
|||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**根据企业ID获取数据
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/getDiagnosis")
|
||||
@ResponseBody
|
||||
@LogAnno(menuType= "双重预控",menuServer= "持续改进",instructionsOperate = "企业报告",instructionsType = "公司详情")
|
||||
|
||||
public Object getDiagnosis() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID",Jurisdiction.getCORPINFO_ID());
|
||||
PageData cpd = corpinfoService.findById(pd); //根据ID读取
|
||||
pd.put("CORPCREATTIME",cpd.getString("CREATTIME").substring(0,7));
|
||||
PageData riskpd = riskPointService.getDiagnosis(pd);
|
||||
List<PageData> lists = listManagerService.listAllForDiagnosis(pd);
|
||||
List<PageData> thismonth = listManagerService.thisMonthListmanager(pd);
|
||||
List<PageData> hdlist = hiddenService.listAllForDiagnosis(pd);
|
||||
// PageData studypd = studyTaskService.getDiagnosis(pd);
|
||||
List<RiskpointLogsDto> riskLog = riskPointService.getLogDiagnosis(pd);
|
||||
|
||||
map.put("cpd", cpd);
|
||||
map.put("monthlist",thismonth);
|
||||
map.put("riskpd", riskpd);
|
||||
map.put("lists", lists);
|
||||
map.put("hdlist", hdlist);
|
||||
// map.put("studypd", studypd);
|
||||
map.put("riskLog",riskLog);
|
||||
if(pd!=null) {
|
||||
errInfo = "success";
|
||||
}else {
|
||||
errInfo = "faild";
|
||||
}
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -148,14 +148,13 @@ public class AppEightWorkController extends BaseController {
|
|||
ReturnMap returnMap = new ReturnMap();
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
JSONObject body = PLSUtil.getRyRegionList(pd.getString("CORPINFO_ID"),"",1,99999,0);
|
||||
|
||||
if (body != null) {
|
||||
List<JSONObject> list = body.getJSONArray("rows").toJavaList(JSONObject.class);
|
||||
returnMap.put("varList", list);
|
||||
returnMap.put("page", page);
|
||||
return returnMap;
|
||||
}
|
||||
// JSONObject body = PLSUtil.getRyRegionList(pd.getString("CORPINFO_ID"),"",1,99999,0);
|
||||
// if (body != null) {
|
||||
// List<JSONObject> list = body.getJSONArray("rows").toJavaList(JSONObject.class);
|
||||
// returnMap.put("varList", list);
|
||||
// returnMap.put("page", page);
|
||||
// return returnMap;
|
||||
// }
|
||||
return ReturnMap.error("查询失败");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,12 +4,8 @@ import com.zcloud.controller.base.BaseController;
|
|||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.enterpriseSafetyProduction.EnterpriseSafetyProductionService;
|
||||
import com.zcloud.service.freighttrailer.FreightTrailerService;
|
||||
import com.zcloud.service.operatingvehicles.OperatingVehiclesService;
|
||||
import com.zcloud.service.scrapManage.ScrapManageService;
|
||||
import com.zcloud.util.DateUtil;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import com.zcloud.util.Smb;
|
||||
import com.zcloud.util.Tools;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
|
@ -28,83 +24,86 @@ public class EnterpriseSafetyProductionController extends BaseController {
|
|||
@Autowired
|
||||
private EnterpriseSafetyProductionService enterpriseSafetyProductionService;
|
||||
|
||||
@Autowired
|
||||
private Smb smb;
|
||||
|
||||
/**新增
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/add")
|
||||
@RequestMapping(value = "/add")
|
||||
@ResponseBody
|
||||
public Object add() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object add() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("SAFETYPRODUCTION_ID", this.get32UUID());
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
enterpriseSafetyProductionService.save(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**删除
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
@RequestMapping(value = "/delete")
|
||||
@ResponseBody
|
||||
public Object delete() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
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());
|
||||
pd.put("DELETORNAME", Jurisdiction.getUsername());
|
||||
pd.put("DELETORNAME", Jurisdiction.getName());
|
||||
pd.put("DELETTIME", DateUtil.date2Str(new Date()));
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
enterpriseSafetyProductionService.delete(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
/**修改
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/edit")
|
||||
@RequestMapping(value = "/edit")
|
||||
@ResponseBody
|
||||
public Object edit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object edit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); // 修改人名字
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
enterpriseSafetyProductionService.edit(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
/**去修改页面获取数据
|
||||
|
||||
/**
|
||||
* 去修改页面获取数据
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/goEdit")
|
||||
@RequestMapping(value = "/goEdit")
|
||||
@ResponseBody
|
||||
public Object goEdit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object goEdit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
|
@ -115,17 +114,18 @@ public class EnterpriseSafetyProductionController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value="/list")
|
||||
@RequestMapping(value = "/list")
|
||||
@ResponseBody
|
||||
public Object list(Page page) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object list(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = enterpriseSafetyProductionService.list(page); //列出MajorDangerSource列表
|
||||
List<PageData> varList = enterpriseSafetyProductionService.list(page); //列出MajorDangerSource列表
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
|
|
|
|||
|
|
@ -48,11 +48,8 @@ public class EquipmentFacilityController extends BaseController {
|
|||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
equipmentFacilityService.save(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -71,7 +68,7 @@ public class EquipmentFacilityController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("DELETOR", Jurisdiction.getUSER_ID());
|
||||
pd.put("DELETORNAME", Jurisdiction.getUsername());
|
||||
pd.put("DELETORNAME", Jurisdiction.getName());
|
||||
pd.put("DELETTIME", DateUtil.date2Str(new Date()));
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
equipmentFacilityService.delete(pd);
|
||||
|
|
@ -91,11 +88,8 @@ public class EquipmentFacilityController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); // 修改人名字
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
equipmentFacilityService.edit(pd);
|
||||
map.put("pd", pd);
|
||||
|
|
@ -133,6 +127,7 @@ public class EquipmentFacilityController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = equipmentFacilityService.list(page); //列出MajorDangerSource列表
|
||||
map.put("varList", varList);
|
||||
|
|
|
|||
|
|
@ -27,93 +27,96 @@ public class FirefightingEquipmentFacilityController extends BaseController {
|
|||
@Autowired
|
||||
private FirefightingEquipmentFacilityService firefightingEquipmentFacilityService;
|
||||
|
||||
@Autowired
|
||||
private Smb smb;
|
||||
|
||||
@Autowired
|
||||
private ImgFilesService imgfilesService;
|
||||
|
||||
/**新增
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/add")
|
||||
@RequestMapping(value = "/add")
|
||||
@ResponseBody
|
||||
public Object add() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object add() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("FIREFIGHTINGFACILITY_ID", this.get32UUID());
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
firefightingEquipmentFacilityService.save(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**删除
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
@RequestMapping(value = "/delete")
|
||||
@ResponseBody
|
||||
public Object delete() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
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());
|
||||
pd.put("DELETORNAME", Jurisdiction.getUsername());
|
||||
pd.put("DELETORNAME", Jurisdiction.getName());
|
||||
pd.put("DELETTIME", DateUtil.date2Str(new Date()));
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
firefightingEquipmentFacilityService.delete(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
/**修改
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/edit")
|
||||
@RequestMapping(value = "/edit")
|
||||
@ResponseBody
|
||||
public Object edit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object edit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); // 修改人名字
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
firefightingEquipmentFacilityService.edit(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
/**去修改页面获取数据
|
||||
|
||||
/**
|
||||
* 去修改页面获取数据
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/goEdit")
|
||||
@RequestMapping(value = "/goEdit")
|
||||
@ResponseBody
|
||||
public Object goEdit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object goEdit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pd = firefightingEquipmentFacilityService.findById(pd);
|
||||
pd.put("FOREIGN_KEY", pd.getString("FIREFIGHTINGFACILITY_ID"));
|
||||
pd.put("TYPE",120);
|
||||
pd.put("TYPE", 120);
|
||||
List<PageData> firefightingequipmentImg = imgfilesService.listAll(pd); //设备设施
|
||||
map.put("firefightingequipmentImg", firefightingequipmentImg);
|
||||
map.put("pd", pd);
|
||||
|
|
@ -121,17 +124,18 @@ public class FirefightingEquipmentFacilityController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value="/list")
|
||||
@RequestMapping(value = "/list")
|
||||
@ResponseBody
|
||||
public Object list(Page page) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object list(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = firefightingEquipmentFacilityService.list(page); //列出MajorDangerSource列表
|
||||
List<PageData> varList = firefightingEquipmentFacilityService.list(page); //列出MajorDangerSource列表
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package com.zcloud.controller.freighttrailer;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
|
@ -13,7 +16,9 @@ import com.zcloud.service.system.ImgFilesService;
|
|||
import com.zcloud.service.taxationManage.TaxationManageService;
|
||||
import com.zcloud.util.*;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang.ObjectUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.util.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
|
@ -26,6 +31,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 企业信息管理-货运挂车
|
||||
|
|
@ -71,7 +77,7 @@ public class FreighttTrailerController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
pd.put("FREIGHTTRAILER_ID", this.get32UUID()); //主键
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); //添加人
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
|
|
@ -98,6 +104,7 @@ public class FreighttTrailerController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
if(Tools.notEmpty(pd.getString("FREIGHTTRAILER_ID"))) {
|
||||
PageData findPageData = freightTrailerService.findById(pd);
|
||||
PageData scrapAddData = new PageData();
|
||||
|
|
@ -109,7 +116,7 @@ public class FreighttTrailerController extends BaseController {
|
|||
scrapAddData.put("VEHICLEOWNER", findPageData.get("CAR_OWNERS"));
|
||||
scrapAddData.put("CONTACT_NUMBER", findPageData.get("CONTACT_PHONE"));
|
||||
scrapAddData.put("SCRAP_DATE", DateUtil.date2Str(new Date()));
|
||||
scrapAddData.put("REGISTRANT", Jurisdiction.getUsername());
|
||||
scrapAddData.put("REGISTRANT", Jurisdiction.getName());
|
||||
scrapAddData.put("CREATTIME", DateUtil.date2Str(new Date()));
|
||||
scrapAddData.put("OPERATTIME", DateUtil.date2Str(new Date()));
|
||||
scrapAddData.put("VEHICLEOWNER_NUMBER", findPageData.get("CAR_OWNERS_TEL"));
|
||||
|
|
@ -124,8 +131,9 @@ public class FreighttTrailerController extends BaseController {
|
|||
scrapManageService.save(scrapAddData);
|
||||
}
|
||||
pd.put("DELETEOR", Jurisdiction.getUSER_ID()); //删除人id
|
||||
pd.put("DELETEORNAME", Jurisdiction.getUsername()); //删除人
|
||||
pd.put("DELETEORNAME", Jurisdiction.getName()); //删除人
|
||||
pd.put("DELETTIME", DateUtil.date2Str(new Date())); //删除时间
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
freightTrailerService.delete(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
|
|
@ -147,24 +155,52 @@ public class FreighttTrailerController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
PageData freightTrailer = freightTrailerService.findById(pd);
|
||||
List<PageData> taxationList = taxationManageService.taxationList(pd.getString("CORPINFO_ID")); // 更新车船税数据
|
||||
List<PageData> assignedList = assignedManageService.assignedList(pd.getString("CORPINFO_ID")); // 更新过户数据
|
||||
for (PageData taxation : taxationList) {
|
||||
if(taxation.get("PLATE_NUMBER").equals(freightTrailer.get("PLATE_NUMBER"))) {
|
||||
taxation.put("PLATE_NUMBER", pd.get("PLATE_NUMBER"));
|
||||
taxationManageService.edit(taxation);
|
||||
}
|
||||
if(StringUtils.equals(freightTrailer.getString("ISSCRAP"), "1")) {
|
||||
pd.put("ISSCRAP", "1");
|
||||
} else{
|
||||
pd.put("ISSCRAP", "0");
|
||||
}
|
||||
for (PageData assigned : assignedList) {
|
||||
if(assigned.get("RAW_PLATE_NUMBER").equals(freightTrailer.get("PLATE_NUMBER"))) {
|
||||
assigned.put("RAW_PLATE_NUMBER", pd.get("PLATE_NUMBER"));
|
||||
assigned.put("RAW_OWNERS", pd.get("CAR_OWNERS"));
|
||||
assignedManageService.edit(assigned);
|
||||
}
|
||||
if (StringUtils.equals(freightTrailer.getString("ISASSIGNED"), "1")) {
|
||||
pd.put("ISASSIGNED", "1");
|
||||
}else{
|
||||
pd.put("ISASSIGNED", "0");
|
||||
}
|
||||
PageData trailerInfo = taxationManageService.findByTrailerId(pd);
|
||||
if(!Tools.isEmpty(trailerInfo)) {
|
||||
BeanUtil.copyProperties(pd,trailerInfo);
|
||||
trailerInfo.put("FRAMES_NUMBER", pd.getString("VIN"));
|
||||
trailerInfo.put("VEHICLE_TYPE", pd.getString("TRAILER_TYPE"));
|
||||
trailerInfo.put("VEHICLEOWNER", pd.getString("CAR_OWNERS"));
|
||||
trailerInfo.put("CONTACT_NUMBER", pd.getString("CONTACT_PHONE"));
|
||||
trailerInfo.put("FIRSTSHOW_DATE", pd.getString("INITIAL_REGISTRATION_DATE"));
|
||||
taxationManageService.edit(trailerInfo);
|
||||
}
|
||||
// 挂车 处理 更新 过户信息
|
||||
PageData vehicleInfo = new PageData();
|
||||
vehicleInfo.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
vehicleInfo.put("ID", pd.getString("FREIGHTTRAILER_ID"));
|
||||
PageData trailerAssignedInfo = assignedManageService.findByRawVehicleId(vehicleInfo);
|
||||
if (!Tools.isEmpty(trailerAssignedInfo)) {
|
||||
BeanUtil.copyProperties(pd,trailerAssignedInfo);
|
||||
trailerAssignedInfo.put("FRAMES_NUMBER", pd.getString("VIN"));
|
||||
trailerAssignedInfo.put("RAW_CONTACT_NUMBER", pd.getString("CONTACT_PHONE"));
|
||||
trailerAssignedInfo.put("RAW_OPERATION_CERTIFICATE", pd.getString("OPER_CERTIFICATE_NUM"));
|
||||
assignedManageService.edit(trailerAssignedInfo);
|
||||
}
|
||||
PageData data = scrapManageService.findByScrapVehicleId(vehicleInfo);
|
||||
if(!ObjectUtil.isEmpty(data)) {
|
||||
BeanUtil.copyProperties(pd,data);
|
||||
data.put("FRAMES_NUMBER", pd.getString("VIN"));
|
||||
data.put("VEHICLEOWNER", pd.getString("CAR_OWNERS"));
|
||||
data.put("VEHICLEOWNER_NUMBER", pd.getString("CAR_OWNERS_TEL"));
|
||||
data.put("FIRSTSHOW_DATE", pd.getString("INITIAL_REGISTRATION_DATE"));
|
||||
data.put("BRAND", pd.getString("TRAILER_BRAND"));
|
||||
data.put("VEHICLE_MODEL", pd.getString("TRAILER_MODEL"));
|
||||
scrapManageService.edit(data);
|
||||
}
|
||||
freightTrailerService.edit(pd);
|
||||
map.put("pd", pd);
|
||||
|
|
@ -323,9 +359,9 @@ public class FreighttTrailerController extends BaseController {
|
|||
riskunit.put("NOTES", lpd.get("var19"));
|
||||
riskunit.put("FREIGHTTRAILER_ID", this.get32UUID());
|
||||
riskunit.put("ISDELETE", "0");
|
||||
riskunit.put("CREATOR", Jurisdiction.getUsername());
|
||||
riskunit.put("CREATOR", Jurisdiction.getName());
|
||||
riskunit.put("CREATTIME", DateUtil.date2Str(new Date()));
|
||||
riskunit.put("OPERATOR", Jurisdiction.getUsername());
|
||||
riskunit.put("OPERATOR", Jurisdiction.getName());
|
||||
riskunit.put("OPERATTIME", DateUtil.date2Str(new Date()));
|
||||
riskunit.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
riskunitList.add(riskunit);
|
||||
|
|
@ -383,6 +419,7 @@ public class FreighttTrailerController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pd = freightTrailerService.findById(pd); //根据ID读取
|
||||
|
||||
pd.put("FOREIGN_KEY", pd.getString("FREIGHTTRAILER_ID"));
|
||||
|
|
@ -539,13 +576,22 @@ public class FreighttTrailerController extends BaseController {
|
|||
List<PageData> operatingList = operatingVehiclesService.operationVehicleList(pd.getString("CORPINFO_ID"));
|
||||
page.setPd(pd);
|
||||
List<PageData> insAnnually = inspectAnnuallyService.annuallyList(page);
|
||||
for (int i = 0; i < insAnnually.size(); i++) {
|
||||
for (int j = 0; j < operatingList.size(); j++) {
|
||||
if(operatingList.get(j).get("OPERATING_ID").equals(insAnnually.get(i).get("VEHICLE"))) {
|
||||
operatingList.remove(j);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 获取所有的营运车辆
|
||||
List<PageData> operatings = insAnnually.stream().filter(data -> StringUtils.equals("1",data.getString("VEHICLE_MODEL")))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 过滤掉年检车辆中已经存在的营运车辆
|
||||
List<PageData> varList = new ArrayList<>();
|
||||
if(!CollectionUtils.isEmpty(operatings)) {
|
||||
varList = operatingList.stream().parallel().filter(operating -> operatings.stream()
|
||||
.noneMatch(ins -> Objects.equals(operating.getString("OPERATING_ID"), ins.getString("VEHICLE"))))
|
||||
.collect(Collectors.toList());
|
||||
}else{
|
||||
varList = operatingList;
|
||||
}
|
||||
|
||||
if(pd.containsKey("ID")){
|
||||
pd.put("OPERATING_ID", pd.getString("ID"));
|
||||
pd.put("FOREIGN_KEY", pd.getString("OPERATING_ID"));
|
||||
|
|
@ -553,10 +599,10 @@ public class FreighttTrailerController extends BaseController {
|
|||
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
|
||||
map.put("drivingLicenseImgs", drivingLicenseImgs);
|
||||
}
|
||||
operatingList.forEach(operating -> {
|
||||
varList.forEach(operating -> {
|
||||
operating.put("ID", operating.getString("OPERATING_ID"));
|
||||
});
|
||||
map.put("list", operatingList);
|
||||
map.put("list", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
|
@ -565,13 +611,28 @@ public class FreighttTrailerController extends BaseController {
|
|||
List<PageData> freightList = freightTrailerService.trailerList(pd.getString("CORPINFO_ID"));
|
||||
page.setPd(pd);
|
||||
List<PageData> insAnnually = inspectAnnuallyService.annuallyList(page);
|
||||
for (int i = 0; i < insAnnually.size(); i++) {
|
||||
|
||||
// 获取所有的货运挂车
|
||||
List<PageData> freights = insAnnually.stream().filter(data -> "2".equals(data.getString("VEHICLE_MODEL")))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 过滤掉年检列表中的所有货运挂车信息
|
||||
List<PageData> varList = new ArrayList<>();
|
||||
if(!CollectionUtils.isEmpty(freights)) {
|
||||
varList = freightList.stream().parallel().filter(freight -> freights.stream()
|
||||
.noneMatch(ins -> freight.getString("FREIGHTTRAILER_ID").equals(ins.getString("VEHICLE"))))
|
||||
.collect(Collectors.toList());
|
||||
}else{
|
||||
varList = freightList;
|
||||
}
|
||||
|
||||
/*for (int i = 0; i < insAnnually.size(); i++) {
|
||||
for (int j = 0; j < freightList.size(); j++) {
|
||||
if(freightList.get(j).get("FREIGHTTRAILER_ID").equals(insAnnually.get(i).get("VEHICLE"))) {
|
||||
freightList.remove(j);
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
if(pd.containsKey("ID")){
|
||||
pd.put("FREIGHTTRAILER_ID", pd.getString("ID"));
|
||||
pd.put("FOREIGN_KEY", pd.getString("FREIGHTTRAILER_ID"));
|
||||
|
|
@ -579,10 +640,10 @@ public class FreighttTrailerController extends BaseController {
|
|||
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
|
||||
map.put("drivingLicenseImgs", drivingLicenseImgs);
|
||||
}
|
||||
freightList.forEach(freight -> {
|
||||
varList.forEach(freight -> {
|
||||
freight.put("ID", freight.getString("FREIGHTTRAILER_ID"));
|
||||
});
|
||||
map.put("list", freightList);
|
||||
map.put("list", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package com.zcloud.controller.inspectAnnually;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.alibaba.excel.util.DateUtils;
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
|
@ -13,13 +15,19 @@ import com.zcloud.util.Jurisdiction;
|
|||
import com.zcloud.util.ObjectExcelView;
|
||||
import com.zcloud.util.Tools;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.util.CollectionUtils;
|
||||
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.ResponseBody;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.xml.crypto.Data;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* 年检管理
|
||||
|
|
@ -57,12 +65,19 @@ public class InspectAnnuallyController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
pd.put("INSPECTANNUALLY_ID", this.get32UUID()); //主键
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); //添加人
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
pd.put("ARCHIVES_TYPE", "正常"); //档案状态
|
||||
|
||||
pd.put("ARCHIVES_TYPE", "0"); //档案状态
|
||||
pd.put("VEHICLE", pd.get("PLATE_NUMBER"));
|
||||
if(DateUtil.compareDate(pd.getString("DUE_DATE"),DateUtil.getDay()) && DateUtil.compareDate(DateUtil.getDay(),pd.getString("REMINDER_DATE"))) {
|
||||
pd.put("REVERT", 2);
|
||||
} else if (DateUtil.compareDate(DateUtil.getDay(),pd.getString("DUE_DATE"))) {
|
||||
pd.put("REVERT", 0);
|
||||
} else if (DateUtil.compareDate(pd.getString("DUE_DATE"),DateUtil.getDay())) {
|
||||
pd.put("REVERT", 1);
|
||||
}
|
||||
inspectAnnuallyService.save(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -85,7 +100,7 @@ public class InspectAnnuallyController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("DELETEOR", Jurisdiction.getUSER_ID()); //删除人id
|
||||
pd.put("DELETEORNAME", Jurisdiction.getUsername()); //删除人
|
||||
pd.put("DELETEORNAME", Jurisdiction.getName()); //删除人
|
||||
pd.put("DELETTIME", DateUtil.date2Str(new Date())); //删除时间
|
||||
inspectAnnuallyService.delete(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
|
|
@ -108,8 +123,15 @@ public class InspectAnnuallyController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
if(DateUtil.compareDate(pd.getString("DUE_DATE"),DateUtil.getDay()) && DateUtil.compareDate(DateUtil.getDay(),pd.getString("REMINDER_DATE"))) {
|
||||
pd.put("REVERT", 2);
|
||||
} else if (DateUtil.compareDate(DateUtil.getDay(),pd.getString("DUE_DATE"))) {
|
||||
pd.put("REVERT", 0);
|
||||
} else if (DateUtil.compareDate(pd.getString("DUE_DATE"),DateUtil.getDay())) {
|
||||
pd.put("REVERT", 1);
|
||||
}
|
||||
inspectAnnuallyService.edit(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -132,7 +154,7 @@ public class InspectAnnuallyController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
inspectAnnuallyService.edit2(pd);
|
||||
map.put("pd", pd);
|
||||
|
|
@ -157,13 +179,57 @@ public class InspectAnnuallyController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = inspectAnnuallyService.list(page); //列出Question列表
|
||||
List<PageData> varList = inspectAnnuallyService.list(page); //列出年检列表
|
||||
varList.stream().anyMatch(data -> {
|
||||
if ("1".equals(data.getString("OPEAR_ISSCRAP")) || "1".equals(data.getString("FREIGHT_ISSCRAP"))) {
|
||||
data.put("ARCHIVES_TYPE", "2");
|
||||
} else if ("1".equals(data.getString("OPEAR_ISASSIGNED")) || "1".equals(data.getString("FREIGHT_ISASSIGNED"))) {
|
||||
data.put("ARCHIVES_TYPE", "1");
|
||||
}
|
||||
return false;
|
||||
});
|
||||
varList.forEach(data -> {
|
||||
Date dueDate = DateUtil.fomatDate(data.getString("DUE_DATE"));
|
||||
Date reminderDate = DateUtil.fomatDate(data.getString("REMINDER_DATE"));
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String toDay = sdf.format(new Date());
|
||||
Date date = null;
|
||||
try {
|
||||
date = sdf.parse(toDay);
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
// 已到期
|
||||
if(dueDate.before(date)) {
|
||||
data.put("REVERT", "0");
|
||||
try {
|
||||
inspectAnnuallyService.edit(data);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
// 即将到期
|
||||
} else if ((dueDate.after(date) || dueDate.equals(date)) && (reminderDate.before(date) || reminderDate.equals(date))) {
|
||||
data.put("REVERT", "2");
|
||||
try {
|
||||
inspectAnnuallyService.edit(data);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
// 未到期
|
||||
}else{
|
||||
data.put("REVERT", "1");
|
||||
try {
|
||||
inspectAnnuallyService.edit(data);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 去修改页面获取数据
|
||||
*
|
||||
|
|
@ -180,26 +246,24 @@ public class InspectAnnuallyController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd = inspectAnnuallyService.findById(pd); //根据ID读取
|
||||
|
||||
if("1".equals(pd.getString("VEHICLE_MODEL"))) {
|
||||
PageData opearting = new PageData();
|
||||
opearting.put("OPERATING_ID", pd.get("VEHICLE"));
|
||||
opearting.put("CORPINFO_ID", pd.get("CORPINFO_ID"));
|
||||
PageData pageData = operatingVehiclesService.findById(opearting);
|
||||
PageData vehicle = new PageData();
|
||||
if ("1".equals(pd.getString("VEHICLE_MODEL"))) {
|
||||
vehicle.put("OPERATING_ID", pd.get("VEHICLE"));
|
||||
vehicle.put("CORPINFO_ID", pd.get("CORPINFO_ID"));
|
||||
PageData pageData = operatingVehiclesService.findById(vehicle);
|
||||
pd.put("VEHICLE_BRAND", pageData.get("VEHICLE_BRAND"));
|
||||
pd.put("VEHICLE_TYPE", pageData.get("VEHICLE_MODEL"));
|
||||
pd.put("PLATE_NUMBER", pageData.get("PLATE_NUMBER"));
|
||||
}else{
|
||||
PageData freight = new PageData();
|
||||
freight.put("FREIGHTTRAILER_ID", pd.get("VEHICLE"));
|
||||
freight.put("CORPINFO_ID", pd.get("CORPINFO_ID"));
|
||||
PageData pageData = freightTrailerService.findById(freight);
|
||||
} else {
|
||||
vehicle.put("FREIGHTTRAILER_ID", pd.get("VEHICLE"));
|
||||
vehicle.put("CORPINFO_ID", pd.get("CORPINFO_ID"));
|
||||
PageData pageData = freightTrailerService.findById(vehicle);
|
||||
pd.put("VEHICLE_BRAND", pageData.get("TRAILER_BRAND"));
|
||||
pd.put("VEHICLE_TYPE", pageData.get("TRAILER_MODEL"));
|
||||
}
|
||||
|
||||
pd.put("FOREIGN_KEY", pd.getString("INSPECTANNUALLY_ID"));
|
||||
pd.put("TYPE",124);
|
||||
pd.put("TYPE", 124);
|
||||
List<PageData> inspectinfoImgs = imgfilesService.listAll(pd);//年检资料图片
|
||||
|
||||
map.put("pd", pd);
|
||||
|
|
@ -228,68 +292,71 @@ public class InspectAnnuallyController extends BaseController {
|
|||
}
|
||||
|
||||
|
||||
/**导出到excel
|
||||
/**
|
||||
* 导出到excel
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/excel")
|
||||
@RequestMapping(value = "/excel")
|
||||
// // @RequiresPermissions("toExcel")
|
||||
public ModelAndView exportExcel() throws Exception{
|
||||
public ModelAndView exportExcel() throws Exception {
|
||||
ModelAndView mv = new ModelAndView();
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String DATA_IDS = pd.getString("DATA_IDS");
|
||||
if(Tools.notEmpty(DATA_IDS)){
|
||||
if (Tools.notEmpty(DATA_IDS)) {
|
||||
String[] ArrayDATA_IDS = DATA_IDS.split(",");
|
||||
pd.put("ArrayDATA_IDS",ArrayDATA_IDS);
|
||||
pd.put("ArrayDATA_IDS", ArrayDATA_IDS);
|
||||
}
|
||||
Map<String,Object> dataMap = new HashMap<String,Object>();
|
||||
Map<String, Object> dataMap = new HashMap<String, Object>();
|
||||
List<String> titles = new ArrayList<String>();
|
||||
titles.add("年检车辆"); //1
|
||||
titles.add("车架号"); //2
|
||||
//titles.add("车身编号"); //3
|
||||
titles.add("车辆类型"); //4
|
||||
titles.add("运营证号"); //5
|
||||
titles.add("归属部门"); //6
|
||||
titles.add("车主"); //7
|
||||
titles.add("车主电话"); //8
|
||||
titles.add("初登日期"); //9
|
||||
titles.add("发证日期"); //10
|
||||
titles.add("到期日期"); //11
|
||||
titles.add("车辆品牌"); //12
|
||||
titles.add("车辆型号"); //13
|
||||
titles.add("核定总质量"); //14
|
||||
titles.add("核定载质量"); //15
|
||||
//titles.add("容积"); //16
|
||||
titles.add("自编号"); //1
|
||||
titles.add("年检车辆"); //2
|
||||
titles.add("车辆品牌"); //3
|
||||
titles.add("年检车型"); //4
|
||||
titles.add("车主业户"); //5
|
||||
titles.add("联系电话"); //6
|
||||
titles.add("登记人"); //7
|
||||
titles.add("办理日期"); //8
|
||||
titles.add("年检周期"); //9
|
||||
titles.add("到期日期"); //10
|
||||
titles.add("年检费用"); //11
|
||||
titles.add("实收费用"); //12
|
||||
titles.add("年检地址"); //13
|
||||
titles.add("提醒天数"); //14
|
||||
titles.add("提醒日期"); //15
|
||||
titles.add("年检资料"); //16
|
||||
titles.add("备注"); //17
|
||||
dataMap.put("titles", titles);
|
||||
List<PageData> varOList = inspectAnnuallyService.listOut(pd);
|
||||
List<PageData> varList = new ArrayList<PageData>();
|
||||
for(int i=0;i<varOList.size();i++){
|
||||
for (int i = 0; i < varOList.size(); i++) {
|
||||
PageData vpd = new PageData();
|
||||
vpd.put("var1", varOList.get(i).getString("VEHICLE"));//1
|
||||
vpd.put("var2", varOList.get(i).getString("FRAMES_NUMBER"));//2
|
||||
//vpd.put("var3", varOList.get(i).getString("VEHICLE_BODY_NUMBER"));//3
|
||||
vpd.put("var4", varOList.get(i).getString("VEHICLE_TYPE"));//4
|
||||
vpd.put("var5", varOList.get(i).getString("OPERATING_CERTIFICATE"));//5
|
||||
vpd.put("var6", varOList.get(i).getString("BELONGING_DEPARTMENT"));//6
|
||||
vpd.put("var7", varOList.get(i).getString("VEHICLEOWNER"));//7
|
||||
vpd.put("var8", varOList.get(i).getString("VEHICLEOWNER_NUMBER"));//8
|
||||
vpd.put("var9", varOList.get(i).getString("FIRSTSHOW_DATE"));//9
|
||||
vpd.put("var10", varOList.get(i).getString("CERTIFICATE_DATE"));//10
|
||||
vpd.put("var11", varOList.get(i).getString("EXPIRE_DATE"));//11
|
||||
vpd.put("var12", varOList.get(i).getString("VEHICLE_BRAND"));//12
|
||||
vpd.put("var13", varOList.get(i).getString("VEHICLE_MODEL"));//13
|
||||
vpd.put("var14", varOList.get(i).getString("VOUCH_TOTALMASS"));//14
|
||||
vpd.put("var15", varOList.get(i).getString("VOUCH_PAYLOAD"));//15
|
||||
//vpd.put("var16", varOList.get(i).getString("VOLUME"));//16
|
||||
vpd.put("var1", varOList.get(i).getString("NUM"));//1
|
||||
vpd.put("var2", varOList.get(i).getString("VEHICLE"));//2
|
||||
vpd.put("var3", varOList.get(i).getString("VEHICLE_BRAND"));//3
|
||||
vpd.put("var4", varOList.get(i).getString("VEHICLE_MODEL"));//4
|
||||
vpd.put("var5", varOList.get(i).getString("CAR_OWNERS"));//5
|
||||
vpd.put("var6", varOList.get(i).getString("TELEPHONE"));//6
|
||||
vpd.put("var7", varOList.get(i).getString("REGISTRANT"));//7
|
||||
vpd.put("var8", varOList.get(i).getString("PROCESSING_DATE"));//8
|
||||
vpd.put("var9", varOList.get(i).getString("ANNUAL_INSPECTION_CYCLE"));//9
|
||||
vpd.put("var10", varOList.get(i).getString("DUE_DATE"));//10
|
||||
vpd.put("var11", varOList.get(i).getString("INSPECTFEES"));//11
|
||||
vpd.put("var12", varOList.get(i).getString("ACTUAL_COLLECTION"));//12
|
||||
vpd.put("var13", varOList.get(i).getString("ADDRESS"));//13
|
||||
vpd.put("var14", varOList.get(i).getString("REMINDER_DAYS"));//14
|
||||
vpd.put("var15", varOList.get(i).getString("REMINDER_DATE"));//15
|
||||
vpd.put("var16", varOList.get(i).getString("INSPECTINFO"));//16
|
||||
vpd.put("var17", varOList.get(i).getString("NOTES"));//17
|
||||
varList.add(vpd);
|
||||
}
|
||||
dataMap.put("varList", varList);
|
||||
ObjectExcelView erv = new ObjectExcelView();
|
||||
mv = new ModelAndView(erv,dataMap);
|
||||
mv = new ModelAndView(erv, dataMap);
|
||||
return mv;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package com.zcloud.controller.insure;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTOutputVisitor;
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
|
@ -12,15 +14,17 @@ import com.zcloud.service.system.ImgFilesService;
|
|||
import com.zcloud.util.DateUtil;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.util.CollectionUtils;
|
||||
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.ResponseBody;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* 保险管理
|
||||
|
|
@ -31,6 +35,7 @@ public class InsureController extends BaseController {
|
|||
|
||||
@Autowired
|
||||
private InsureService insureService;
|
||||
|
||||
@Autowired
|
||||
private ImgFilesService imgfilesService;
|
||||
|
||||
|
|
@ -47,7 +52,6 @@ public class InsureController extends BaseController {
|
|||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/add")
|
||||
// @RequiresPermissions( value = {"question:add" , "courseware:add"}, logical = Logical.OR)
|
||||
@ResponseBody
|
||||
@LogAnno(menuType = "机务档案", menuServer = "保险管理", instructionsOperate = "保险管理", instructionsType = "新增")
|
||||
public Object add() throws Exception {
|
||||
|
|
@ -57,15 +61,23 @@ public class InsureController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
pd.put("INSURE_ID", this.get32UUID()); //主键
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); //添加人
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
|
||||
pd.put("VEHICLE", pd.getString("PLATE_NUMBER"));
|
||||
if (DateUtil.compareDate(pd.getString("DUE_DATE"), DateUtil.getDay()) && DateUtil.compareDate(DateUtil.getDay(), pd.getString("REMINDER_DATE"))) {
|
||||
pd.put("REVERT", 2);
|
||||
} else if (DateUtil.compareDate(DateUtil.getDay(), pd.getString("DUE_DATE"))) {
|
||||
pd.put("REVERT", 0);
|
||||
} else if (DateUtil.compareDate(pd.getString("DUE_DATE"), DateUtil.getDay())) {
|
||||
pd.put("REVERT", 1);
|
||||
}
|
||||
insureService.save(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -84,7 +96,7 @@ public class InsureController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("DELETEOR", Jurisdiction.getUSER_ID()); //删除人id
|
||||
pd.put("DELETEORNAME", Jurisdiction.getUsername()); //删除人
|
||||
pd.put("DELETEORNAME", Jurisdiction.getName()); //删除人
|
||||
pd.put("DELETTIME", DateUtil.date2Str(new Date())); //删除时间
|
||||
insureService.delete(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
|
|
@ -107,8 +119,15 @@ public class InsureController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
if (DateUtil.compareDate(pd.getString("DUE_DATE"), DateUtil.getDay()) && DateUtil.compareDate(DateUtil.getDay(), pd.getString("REMINDER_DATE"))) {
|
||||
pd.put("REVERT", 2);
|
||||
} else if (DateUtil.compareDate(DateUtil.getDay(), pd.getString("DUE_DATE"))) {
|
||||
pd.put("REVERT", 0);
|
||||
} else if (DateUtil.compareDate(pd.getString("DUE_DATE"), DateUtil.getDay())) {
|
||||
pd.put("REVERT", 1);
|
||||
}
|
||||
insureService.edit(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -131,7 +150,7 @@ public class InsureController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
insureService.edit2(pd);
|
||||
map.put("pd", pd);
|
||||
|
|
@ -157,6 +176,54 @@ public class InsureController extends BaseController {
|
|||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = insureService.list(page); //列出Question列表
|
||||
// 到期状态
|
||||
varList.forEach(data -> {
|
||||
Date dueDate = DateUtil.fomatDate(data.getString("DUE_DATE"));
|
||||
Date reminderDate = DateUtil.fomatDate(data.getString("REMINDER_DATE"));
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String toDay = sdf.format(new Date());
|
||||
Date date = null;
|
||||
try {
|
||||
date = sdf.parse(toDay);
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
// 已到期
|
||||
if(dueDate.before(date)) {
|
||||
data.put("REVERT", "0");
|
||||
try {
|
||||
insureService.edit(data);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
// 即将到期
|
||||
} else if ((dueDate.after(date) || dueDate.equals(date)) && (reminderDate.before(date) || reminderDate.equals(date))) {
|
||||
data.put("REVERT", "2");
|
||||
try {
|
||||
insureService.edit(data);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
// 未到期
|
||||
}else{
|
||||
data.put("REVERT", "1");
|
||||
try {
|
||||
insureService.edit(data);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
/*varList.stream().forEach(data -> {
|
||||
if (DateUtil.compareDate(data.getString("DUE_DATE"), DateUtil.getDay()) && DateUtil.compareDate(DateUtil.getDay(), data.getString("REMINDER_DATE"))) {
|
||||
data.put("DUE_DATE_TYPE", 2);
|
||||
} else if (DateUtil.compareDate(DateUtil.getDay(), data.getString("DUE_DATE"))) {
|
||||
data.put("DUE_DATE_TYPE", 0);
|
||||
} else if (DateUtil.compareDate(data.getString("DUE_DATE"), DateUtil.getDay())) {
|
||||
data.put("DUE_DATE_TYPE", 1);
|
||||
}
|
||||
});*/
|
||||
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -179,11 +246,23 @@ public class InsureController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd = insureService.findById(pd); //根据ID读取
|
||||
|
||||
if ("1".equals(pd.getString("VEHICLE_MODEL"))) {
|
||||
PageData operation = new PageData();
|
||||
operation.put("OPERATING_ID", pd.getString("VEHICLE"));
|
||||
operation.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
PageData operationInfo = operatingVehiclesService.findById(operation);
|
||||
pd.put("PLATE_NUMBER", operationInfo.getString("PLATE_NUMBER"));
|
||||
} else {
|
||||
PageData trailer = new PageData();
|
||||
trailer.put("FREIGHTTRAILER_ID", pd.getString("VEHICLE"));
|
||||
trailer.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
PageData operationInfo = freightTrailerService.findById(trailer);
|
||||
pd.put("PLATE_NUMBER", operationInfo.getString("PLATE_NUMBER"));
|
||||
}
|
||||
pd.put("FOREIGN_KEY", pd.getString("INSURE_ID"));
|
||||
pd.put("TYPE",125);
|
||||
pd.put("TYPE", 125);
|
||||
List<PageData> insureinfoImgs = imgfilesService.listAll(pd);//保险资料图片
|
||||
pd.put("TYPE",129);
|
||||
pd.put("TYPE", 129);
|
||||
List<PageData> attachmentUploadImgs = imgfilesService.listAll(pd);//保险附件上传
|
||||
|
||||
map.put("pd", pd);
|
||||
|
|
@ -200,64 +279,73 @@ public class InsureController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID",Jurisdiction.getCORPINFO_ID());
|
||||
if(!StringUtils.isEmpty(pd.getString("TRAFFIC_TYPE")) && pd.getString("TRAFFIC_TYPE").equals("1")) {
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
if (!StringUtils.isEmpty(pd.getString("TRAFFIC_TYPE")) && pd.getString("TRAFFIC_TYPE").equals("1")) {
|
||||
// 营运车辆
|
||||
List<PageData> operatingList = operatingVehiclesService.operationVehicleList(pd.getString("CORPINFO_ID"));
|
||||
page.setPd(pd);
|
||||
List<PageData> insAnnually = insureService.list(page);
|
||||
for (int i = 0; i < insAnnually.size(); i++) {
|
||||
for (int j = 0; j < operatingList.size(); j++) {
|
||||
if(operatingList.get(j).get("OPERATING_ID").equals(insAnnually.get(i).get("VEHICLE"))) {
|
||||
operatingList.remove(j);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(pd.containsKey("ID")){
|
||||
List<String> id = new ArrayList<>();
|
||||
// 获取保险列表中所有的营运车辆
|
||||
insAnnually.stream().filter(data -> StringUtils.equals(data.getString("VEHICLE_MODEL"), "1")).collect(Collectors.toList())
|
||||
.stream().parallel().collect(Collectors.groupingBy(data -> data.getString("VEHICLE"))).forEach((key, value) -> {
|
||||
if (value.size() == 3) {
|
||||
id.add(key);
|
||||
}
|
||||
});
|
||||
|
||||
List<PageData> varList = operatingList.stream().filter(operating -> id.stream()
|
||||
.noneMatch(data -> StringUtils.equals(operating.getString("OPERATING_ID"), data))).collect(Collectors.toList());
|
||||
|
||||
if (pd.containsKey("ID")) {
|
||||
pd.put("OPERATING_ID", pd.getString("ID"));
|
||||
pd.put("FOREIGN_KEY", pd.getString("OPERATING_ID"));
|
||||
pd.put("TYPE",121);
|
||||
pd.put("TYPE", 121);
|
||||
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
|
||||
map.put("drivingLicenseImgs", drivingLicenseImgs);
|
||||
}
|
||||
operatingList.forEach(operating -> {
|
||||
varList.forEach(operating -> {
|
||||
operating.put("ID", operating.getString("OPERATING_ID"));
|
||||
});
|
||||
map.put("list", operatingList);
|
||||
map.put("list", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
if("2".equals(pd.getString("TRAFFIC_TYPE"))) {
|
||||
if ("2".equals(pd.getString("TRAFFIC_TYPE"))) {
|
||||
// 货运挂车
|
||||
List<PageData> freightList = freightTrailerService.trailerList(pd.getString("CORPINFO_ID"));
|
||||
page.setPd(pd);
|
||||
List<PageData> insAnnually = insureService.list(page);
|
||||
for (int i = 0; i < insAnnually.size(); i++) {
|
||||
for (int j = 0; j < freightList.size(); j++) {
|
||||
if(freightList.get(j).get("FREIGHTTRAILER_ID").equals(insAnnually.get(i).get("VEHICLE"))) {
|
||||
freightList.remove(j);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(pd.containsKey("ID")){
|
||||
List<PageData> insureList = insureService.list(page);
|
||||
List<String> id = new ArrayList<>();
|
||||
// 获取保险列表中所有挂车信息
|
||||
insureList.stream().filter(data -> StringUtils.equals(data.getString("VEHICLE_MODEL"), "2")).collect(Collectors.toList())
|
||||
.stream().collect(Collectors.groupingBy(data -> data.getString("VEHICLE"))).forEach((key, value) -> {
|
||||
if (value.size() == 3) {
|
||||
id.add(key);
|
||||
}
|
||||
});
|
||||
List<PageData> varList = freightList.stream().filter(freight -> id.stream()
|
||||
.noneMatch(data -> StringUtils.equals(freight.getString("FREIGHTTRAILER_ID"), data))).collect(Collectors.toList());
|
||||
|
||||
if (pd.containsKey("ID")) {
|
||||
pd.put("FREIGHTTRAILER_ID", pd.getString("ID"));
|
||||
pd.put("FOREIGN_KEY", pd.getString("FREIGHTTRAILER_ID"));
|
||||
pd.put("TYPE",121);
|
||||
pd.put("TYPE", 121);
|
||||
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
|
||||
map.put("drivingLicenseImgs", drivingLicenseImgs);
|
||||
}
|
||||
freightList.forEach(freight -> {
|
||||
varList.forEach(freight -> {
|
||||
freight.put("ID", freight.getString("FREIGHTTRAILER_ID"));
|
||||
});
|
||||
map.put("list", freightList);
|
||||
map.put("list", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
List<PageData> resData = freightTrailerService.vehicleList(pd);
|
||||
if(pd.containsKey("ID")){
|
||||
if (pd.containsKey("ID")) {
|
||||
pd.put("FOREIGN_KEY", pd.getString("ID"));
|
||||
pd.put("TYPE",121);
|
||||
pd.put("TYPE", 121);
|
||||
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
|
||||
map.put("drivingLicenseImgs", drivingLicenseImgs);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class LabourEntrenchThingController extends BaseController {
|
|||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
labourEntrenchThingService.save(pd);
|
||||
map.put("pd", pd);
|
||||
|
|
@ -64,7 +64,7 @@ public class LabourEntrenchThingController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("DELETOR", Jurisdiction.getUSER_ID());
|
||||
pd.put("DELETORNAME", Jurisdiction.getUsername());
|
||||
pd.put("DELETORNAME", Jurisdiction.getName());
|
||||
pd.put("DELETTIME", DateUtil.date2Str(new Date()));
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
labourEntrenchThingService.delete(pd);
|
||||
|
|
@ -85,7 +85,7 @@ public class LabourEntrenchThingController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); // 修改人名字
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
labourEntrenchThingService.edit(pd);
|
||||
map.put("pd", pd);
|
||||
|
|
@ -119,6 +119,7 @@ public class LabourEntrenchThingController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = labourEntrenchThingService.list(page); //列出MajorDangerSource列表
|
||||
map.put("varList", varList);
|
||||
|
|
|
|||
|
|
@ -48,11 +48,8 @@ public class MaintainController extends BaseController {
|
|||
pd.put("MAINTAIN_ID", this.get32UUID());
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
maintainService.save(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -71,7 +68,7 @@ public class MaintainController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("DELETOR", Jurisdiction.getUSER_ID());
|
||||
pd.put("DELETORNAME", Jurisdiction.getUsername());
|
||||
pd.put("DELETORNAME", Jurisdiction.getName());
|
||||
pd.put("DELETTIME", DateUtil.date2Str(new Date()));
|
||||
maintainService.delete(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
|
|
@ -90,11 +87,8 @@ public class MaintainController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); // 修改人名字
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
maintainService.edit(pd);
|
||||
map.put("pd", pd);
|
||||
|
|
|
|||
|
|
@ -11,15 +11,16 @@ import com.zcloud.service.system.ImgFilesService;
|
|||
import com.zcloud.util.DateUtil;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.util.CollectionUtils;
|
||||
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.ResponseBody;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 维保管理
|
||||
|
|
@ -56,12 +57,19 @@ public class MaintenanceController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
pd.put("MAINTENANCE_ID", this.get32UUID()); //主键
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); //添加人
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
pd.put("ARCHIVES_TYPE", "正常"); //档案状态
|
||||
|
||||
pd.put("ARCHIVES_TYPE", "0"); //档案状态
|
||||
pd.put("VEHICLE", pd.get("PLATE_NUMBER")); //档案状态
|
||||
if(DateUtil.compareDate(pd.getString("DUE_DATE"),DateUtil.getDay()) && DateUtil.compareDate(DateUtil.getDay(),pd.getString("REMINDER_DATE"))) {
|
||||
pd.put("REVERT", 2);
|
||||
} else if (DateUtil.compareDate(DateUtil.getDay(),pd.getString("DUE_DATE"))) {
|
||||
pd.put("REVERT", 0);
|
||||
} else if (DateUtil.compareDate(pd.getString("DUE_DATE"),DateUtil.getDay())) {
|
||||
pd.put("REVERT", 1);
|
||||
}
|
||||
maintenanceService.save(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -84,7 +92,7 @@ public class MaintenanceController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("DELETEOR", Jurisdiction.getUSER_ID()); //删除人id
|
||||
pd.put("DELETEORNAME", Jurisdiction.getUsername()); //删除人
|
||||
pd.put("DELETEORNAME", Jurisdiction.getName()); //删除人
|
||||
pd.put("DELETTIME", DateUtil.date2Str(new Date())); //删除时间
|
||||
maintenanceService.delete(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
|
|
@ -107,8 +115,15 @@ public class MaintenanceController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
if(DateUtil.compareDate(pd.getString("DUE_DATE"),DateUtil.getDay()) && DateUtil.compareDate(DateUtil.getDay(),pd.getString("REMINDER_DATE"))) {
|
||||
pd.put("REVERT", 2);
|
||||
} else if (DateUtil.compareDate(DateUtil.getDay(),pd.getString("DUE_DATE"))) {
|
||||
pd.put("REVERT", 0);
|
||||
} else if (DateUtil.compareDate(pd.getString("DUE_DATE"),DateUtil.getDay())) {
|
||||
pd.put("REVERT", 1);
|
||||
}
|
||||
maintenanceService.edit(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -131,7 +146,7 @@ public class MaintenanceController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
maintenanceService.edit2(pd);
|
||||
map.put("pd", pd);
|
||||
|
|
@ -157,6 +172,55 @@ public class MaintenanceController extends BaseController {
|
|||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = maintenanceService.list(page); //列出Question列表
|
||||
varList.stream().anyMatch(data -> {
|
||||
if ("1".equals(data.getString("OPEAR_ISSCRAP")) || "1".equals(data.getString("FREIGHT_ISSCRAP"))) {
|
||||
data.put("ARCHIVES_TYPE", "2");
|
||||
} else if ("1".equals(data.getString("OPEAR_ISASSIGNED")) || "1".equals(data.getString("FREIGHT_ISASSIGNED"))) {
|
||||
data.put("ARCHIVES_TYPE", "1");
|
||||
} else {
|
||||
data.put("ARCHIVES_TYPE", "0");
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
varList.forEach(data -> {
|
||||
Date dueDate = DateUtil.fomatDate(data.getString("DUE_DATE"));
|
||||
Date reminderDate = DateUtil.fomatDate(data.getString("REMINDER_DATE"));
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String toDay = sdf.format(new Date());
|
||||
Date date = null;
|
||||
try {
|
||||
date = sdf.parse(toDay);
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
// 已到期
|
||||
if(dueDate.before(date)) {
|
||||
data.put("REVERT", "0");
|
||||
try {
|
||||
maintenanceService.edit(data);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
// 即将到期
|
||||
} else if ((dueDate.after(date) || dueDate.equals(date)) && (reminderDate.before(date) || reminderDate.equals(date))) {
|
||||
data.put("REVERT", "2");
|
||||
try {
|
||||
maintenanceService.edit(data);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
// 未到期
|
||||
}else{
|
||||
data.put("REVERT", "1");
|
||||
try {
|
||||
maintenanceService.edit(data);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -181,7 +245,7 @@ public class MaintenanceController extends BaseController {
|
|||
pd = maintenanceService.findById(pd); //根据ID读取
|
||||
|
||||
pd.put("FOREIGN_KEY", pd.getString("MAINTENANCE_ID"));
|
||||
pd.put("TYPE",127);
|
||||
pd.put("TYPE", 127);
|
||||
List<PageData> maintenanceinfoImgs = imgfilesService.listAll(pd);//维保资料图片
|
||||
map.put("pd", pd);
|
||||
map.put("maintenanceinfoImgs", maintenanceinfoImgs);
|
||||
|
|
@ -196,64 +260,72 @@ public class MaintenanceController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID",Jurisdiction.getCORPINFO_ID());
|
||||
if(!StringUtils.isEmpty(pd.getString("TRAFFIC_TYPE")) && pd.getString("TRAFFIC_TYPE").equals("1")) {
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
if (!StringUtils.isEmpty(pd.getString("TRAFFIC_TYPE")) && pd.getString("TRAFFIC_TYPE").equals("1")) {
|
||||
// 营运车辆
|
||||
List<PageData> operatingList = operatingVehiclesService.operationVehicleList(pd.getString("CORPINFO_ID"));
|
||||
page.setPd(pd);
|
||||
List<PageData> insAnnually = maintenanceService.list(page);
|
||||
for (int i = 0; i < insAnnually.size(); i++) {
|
||||
for (int j = 0; j < operatingList.size(); j++) {
|
||||
if(operatingList.get(j).get("OPERATING_ID").equals(insAnnually.get(i).get("VEHICLE"))) {
|
||||
operatingList.remove(j);
|
||||
}
|
||||
}
|
||||
List<PageData> maintenanceList = maintenanceService.list(page);
|
||||
|
||||
List<PageData> varList = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(maintenanceList)) {
|
||||
varList = operatingList.stream().parallel()
|
||||
.filter(operating -> maintenanceList.stream()
|
||||
.noneMatch(maintenance -> StringUtils.equals(operating.getString("OPERATING_ID"), maintenance.getString("VEHICLE"))))
|
||||
.collect(Collectors.toList());
|
||||
} else {
|
||||
varList = operatingList;
|
||||
}
|
||||
if(pd.containsKey("ID")){
|
||||
|
||||
if (pd.containsKey("ID")) {
|
||||
pd.put("OPERATING_ID", pd.getString("ID"));
|
||||
pd.put("FOREIGN_KEY", pd.getString("OPERATING_ID"));
|
||||
pd.put("TYPE",121);
|
||||
pd.put("TYPE", 121);
|
||||
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
|
||||
map.put("drivingLicenseImgs", drivingLicenseImgs);
|
||||
}
|
||||
operatingList.forEach(operating -> {
|
||||
varList.forEach(operating -> {
|
||||
operating.put("ID", operating.getString("OPERATING_ID"));
|
||||
});
|
||||
map.put("list", operatingList);
|
||||
map.put("list", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
if("2".equals(pd.getString("TRAFFIC_TYPE"))) {
|
||||
if ("2".equals(pd.getString("TRAFFIC_TYPE"))) {
|
||||
// 货运挂车
|
||||
List<PageData> freightList = freightTrailerService.trailerList(pd.getString("CORPINFO_ID"));
|
||||
page.setPd(pd);
|
||||
List<PageData> insAnnually = maintenanceService.list(page);
|
||||
for (int i = 0; i < insAnnually.size(); i++) {
|
||||
for (int j = 0; j < freightList.size(); j++) {
|
||||
if(freightList.get(j).get("FREIGHTTRAILER_ID").equals(insAnnually.get(i).get("VEHICLE"))) {
|
||||
freightList.remove(j);
|
||||
}
|
||||
}
|
||||
List<PageData> maintenanceList = maintenanceService.list(page);
|
||||
|
||||
List<PageData> varList = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(maintenanceList)) {
|
||||
varList = freightList.stream().parallel()
|
||||
.filter(freight -> freightList.stream()
|
||||
.noneMatch(maintenance -> StringUtils.equals(freight.getString("FREIGHTTRAILER_ID"), maintenance.getString("VEHICLE"))))
|
||||
.collect(Collectors.toList());
|
||||
} else {
|
||||
varList = freightList;
|
||||
}
|
||||
if(pd.containsKey("ID")){
|
||||
|
||||
if (pd.containsKey("ID")) {
|
||||
pd.put("FREIGHTTRAILER_ID", pd.getString("ID"));
|
||||
pd.put("FOREIGN_KEY", pd.getString("FREIGHTTRAILER_ID"));
|
||||
pd.put("TYPE",121);
|
||||
pd.put("TYPE", 121);
|
||||
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
|
||||
map.put("drivingLicenseImgs", drivingLicenseImgs);
|
||||
}
|
||||
freightList.forEach(freight -> {
|
||||
varList.forEach(freight -> {
|
||||
freight.put("ID", freight.getString("FREIGHTTRAILER_ID"));
|
||||
});
|
||||
map.put("list", freightList);
|
||||
map.put("list", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
List<PageData> resData = freightTrailerService.vehicleList(pd);
|
||||
if(pd.containsKey("ID")){
|
||||
if (pd.containsKey("ID")) {
|
||||
pd.put("FOREIGN_KEY", pd.getString("ID"));
|
||||
pd.put("TYPE",121);
|
||||
pd.put("TYPE", 121);
|
||||
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
|
||||
map.put("drivingLicenseImgs", drivingLicenseImgs);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.zcloud.controller.operatingvehicles;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
|
@ -11,8 +12,13 @@ import com.zcloud.service.system.DepartmentService;
|
|||
import com.zcloud.service.system.ImgFilesService;
|
||||
import com.zcloud.util.*;
|
||||
import net.sf.json.JSONArray;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
|
@ -20,7 +26,9 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/operatingvehicles")
|
||||
|
|
@ -29,40 +37,36 @@ public class OperatingVehiclesController extends BaseController {
|
|||
@Autowired
|
||||
private OperatingVehiclesService operatingVehiclesService;
|
||||
|
||||
@Autowired
|
||||
private Smb smb;
|
||||
|
||||
@Autowired
|
||||
private ImgFilesService imgfilesService;
|
||||
|
||||
@Autowired
|
||||
private ScrapManageService scrapManageService;
|
||||
|
||||
@Autowired
|
||||
private AssignedManageService assignedManageService;
|
||||
|
||||
@Autowired
|
||||
private DepartmentService departmentService;
|
||||
|
||||
/**新增
|
||||
@Autowired
|
||||
private AssignedManageService assignedManageService;
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/add")
|
||||
@RequestMapping(value = "/add")
|
||||
@ResponseBody
|
||||
public Object add() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object add() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("OPERATING_ID", this.get32UUID()); //运营车辆主键
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
pd.put("OPERATING_ID", this.get32UUID()); //运营车辆主键
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pd.put("NETWORK_STATUS", "未入网");
|
||||
pd.put("ISSCRAP", "0");
|
||||
|
|
@ -72,86 +76,99 @@ public class OperatingVehiclesController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
|
||||
/**删除
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
@RequestMapping(value = "/delete")
|
||||
@ResponseBody
|
||||
public Object delete() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
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("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
if(Tools.notEmpty(pd.getString("OPERATING_ID"))) {
|
||||
if (Tools.notEmpty(pd.getString("OPERATING_ID"))) {
|
||||
PageData findPageData = operatingVehiclesService.findById(pd);
|
||||
findPageData.remove("REMARK");
|
||||
PageData scrapAddData = new PageData();
|
||||
scrapAddData.put("SCRAP_ID",this.get32UUID());
|
||||
BeanUtil.copyProperties(findPageData,scrapAddData);
|
||||
scrapAddData.put("SCRAP_ID", this.get32UUID());
|
||||
scrapAddData.put("RECORD_NUMBER", findPageData.get("GOODSSELFNUMBER"));
|
||||
scrapAddData.put("FRAMES_NUMBER", findPageData.get("FRAMES_NUMBER"));
|
||||
scrapAddData.put("PLATE_NUMBER", findPageData.get("PLATE_NUMBER"));
|
||||
scrapAddData.put("SCRAP_VEHICLEMODEL", "运输车辆");
|
||||
scrapAddData.put("VEHICLEOWNER", findPageData.get("VEHICLEOWNER"));
|
||||
scrapAddData.put("CONTACT_NUMBER", findPageData.get("CONTACT_NUMBER"));
|
||||
scrapAddData.put("SCRAP_DATE", DateUtil.date2Str(new Date()));
|
||||
scrapAddData.put("REGISTRANT", Jurisdiction.getUsername());
|
||||
scrapAddData.put("CREATTIME", DateUtil.date2Str(new Date()));
|
||||
scrapAddData.put("OPERATTIME", DateUtil.date2Str(new Date()));
|
||||
scrapAddData.put("VEHICLEOWNER_NUMBER", findPageData.get("VEHICLEOWNER_NUMBER"));
|
||||
scrapAddData.put("FIRSTSHOW_DATE", findPageData.get("FIRSTSHOW_DATE"));
|
||||
scrapAddData.put("REGISTRANT", Jurisdiction.getName());
|
||||
scrapAddData.put("CREATTIME", DateUtil.date2Str(new Date()));
|
||||
scrapAddData.put("OPERATTIME", DateUtil.date2Str(new Date()));
|
||||
scrapAddData.put("BRAND", findPageData.get("VEHICLE_BRAND"));
|
||||
scrapAddData.put("VEHICLE_MODEL", findPageData.get("VEHICLE_MODEL"));
|
||||
scrapAddData.put("TRANSACTION_DATE", DateUtil.date2Str(new Date()));
|
||||
scrapAddData.put("CORPINFO_ID", findPageData.get("CORPINFO_ID"));
|
||||
scrapAddData.put("SCRAP_VEHICLE", findPageData.get("PLATE_NUMBER"));
|
||||
scrapAddData.put("ISDELETE", "0");
|
||||
scrapManageService.save(scrapAddData);
|
||||
}
|
||||
pd.put("DELETOR", Jurisdiction.getUSER_ID());
|
||||
pd.put("DELETORNAME", Jurisdiction.getUsername());
|
||||
pd.put("DELETORNAME", Jurisdiction.getName());
|
||||
pd.put("DELETTIME", DateUtil.date2Str(new Date()));
|
||||
operatingVehiclesService.delete(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
/**修改
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/edit")
|
||||
@RequestMapping(value = "/edit")
|
||||
@ResponseBody
|
||||
public Object edit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object edit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getCORPINFO_ID());
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername());
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName());
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date()));
|
||||
PageData operation = operatingVehiclesService.findById(pd);
|
||||
List<PageData> assignedList = assignedManageService.assignedList(pd.getString("CORPINFO_ID"));
|
||||
for (PageData assigned : assignedList) {
|
||||
if(operation.get("PLATE_NUMBER").equals(assigned.get("RAW_PLATE_NUMBER"))) {
|
||||
assigned.put("RAW_PLATE_NUMBER", pd.get("PLATE_NUMBER"));
|
||||
assigned.put("RAW_OWNERS", pd.get("VEHICLEOWNER"));
|
||||
assignedManageService.edit(assigned);
|
||||
}
|
||||
}
|
||||
operatingVehiclesService.edit(pd);
|
||||
PageData pageData = new PageData();
|
||||
pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pageData.put("ID", pd.getString("OPERATING_ID"));
|
||||
PageData vehicleAssignedInfo = assignedManageService.findByRawVehicleId(pageData);
|
||||
if (!Tools.isEmpty(vehicleAssignedInfo)) {
|
||||
BeanUtil.copyProperties(pd, vehicleAssignedInfo);
|
||||
vehicleAssignedInfo.put("POWER_TYPE", pd.getString("FUEL_TYPE"));
|
||||
vehicleAssignedInfo.put("RAW_OWNERS", pd.getString("VEHICLEOWNER"));
|
||||
vehicleAssignedInfo.put("RAW_CONTACT_NUMBER", pd.getString("CONTACT_NUMBER"));
|
||||
vehicleAssignedInfo.put("RAW_OPERATION_CERTIFICATE", pd.getString("OPERATING_CERTIFICATE"));
|
||||
assignedManageService.edit(vehicleAssignedInfo);
|
||||
}
|
||||
PageData pd2 = scrapManageService.findByScrapVehicleId(pageData);
|
||||
if(!ObjectUtils.isEmpty(pd2)) {
|
||||
BeanUtil.copyProperties(pd,pd2);
|
||||
pd2.put("VEHICLE_MODEL", pd.getString("VEHICLE_MODEL"));
|
||||
pd2.put("VEHICLEOWNER_NUMBER", pd.getString("CONTACT_NUMBER"));
|
||||
pd2.put("BRAND", pd.getString("VEHICLE_BRAND"));
|
||||
scrapManageService.edit(pd2);
|
||||
}
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
/**去修改页面获取数据
|
||||
|
||||
|
||||
/**
|
||||
* 去修改页面获取数据
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/goEdit")
|
||||
@RequestMapping(value = "/goEdit")
|
||||
@ResponseBody
|
||||
public Object goEdit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object goEdit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
|
@ -159,11 +176,11 @@ public class OperatingVehiclesController extends BaseController {
|
|||
pd = operatingVehiclesService.findById(pd);
|
||||
|
||||
pd.put("FOREIGN_KEY", pd.getString("OPERATING_ID"));
|
||||
pd.put("TYPE",130);
|
||||
pd.put("TYPE", 130);
|
||||
List<PageData> headstockphoto = imgfilesService.listAll(pd);//车头照片
|
||||
pd.put("TYPE",121);
|
||||
pd.put("TYPE", 121);
|
||||
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
|
||||
pd.put("TYPE",132);
|
||||
pd.put("TYPE", 122);
|
||||
List<PageData> operatingcertificatephoto = imgfilesService.listAll(pd);//运营证照片
|
||||
|
||||
List<PageData> zdepartmentPdList = new ArrayList<PageData>();
|
||||
|
|
@ -191,9 +208,7 @@ public class OperatingVehiclesController extends BaseController {
|
|||
}
|
||||
|
||||
@RequestMapping(value = "/list")
|
||||
// @RequiresPermissions( value = {"question:list" , "courseware:list"}, logical = Logical.OR)
|
||||
@ResponseBody
|
||||
@LogAnno(menuType = "基础信息管理", menuServer = "货运挂车", instructionsOperate = "货运挂车", instructionsType = "列表")
|
||||
public Object list(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
|
|
@ -223,18 +238,18 @@ public class OperatingVehiclesController extends BaseController {
|
|||
@RequestMapping(value = "/findById")
|
||||
@ResponseBody
|
||||
public Object findById() throws Exception {
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID",Jurisdiction.getCORPINFO_ID());
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
|
||||
pd.put("FOREIGN_KEY", pd.getString("OPERATING_ID"));
|
||||
pd.put("TYPE",130);
|
||||
pd.put("TYPE", 130);
|
||||
List<PageData> headstockphoto = imgfilesService.listAll(pd);//车头照片
|
||||
pd.put("TYPE",131);
|
||||
pd.put("TYPE", 121);
|
||||
List<PageData> drivinglicensephoto = imgfilesService.listAll(pd);//行驶证照片
|
||||
pd.put("TYPE",132);
|
||||
pd.put("TYPE", 132);
|
||||
List<PageData> operatingcertificatephoto = imgfilesService.listAll(pd);//运营证照片
|
||||
map.put("pd", pd);
|
||||
map.put("headstockphoto", headstockphoto);
|
||||
|
|
@ -249,11 +264,11 @@ public class OperatingVehiclesController extends BaseController {
|
|||
@RequestMapping(value = "/setOperationsScrapStatus")
|
||||
@ResponseBody
|
||||
public Object setOperationsScrapStatus() throws Exception {
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID",Jurisdiction.getCORPINFO_ID());
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
operatingVehiclesService.setScrapStatus(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -272,10 +287,10 @@ public class OperatingVehiclesController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value="/findByPlateNumber")
|
||||
@RequestMapping(value = "/findByPlateNumber")
|
||||
@ResponseBody
|
||||
public Object findByPlateNumber() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object findByPlateNumber() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
|
@ -288,69 +303,217 @@ public class OperatingVehiclesController extends BaseController {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**导出到excel
|
||||
/**
|
||||
* 导出到excel
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/excel")
|
||||
@RequestMapping(value = "/excel")
|
||||
// // @RequiresPermissions("toExcel")
|
||||
public ModelAndView exportExcel() throws Exception{
|
||||
public ModelAndView exportExcel() throws Exception {
|
||||
ModelAndView mv = new ModelAndView();
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String DATA_IDS = pd.getString("DATA_IDS");
|
||||
if(Tools.notEmpty(DATA_IDS)){
|
||||
if (Tools.notEmpty(DATA_IDS)) {
|
||||
String[] ArrayDATA_IDS = DATA_IDS.split(",");
|
||||
pd.put("ArrayDATA_IDS",ArrayDATA_IDS);
|
||||
pd.put("ArrayDATA_IDS", ArrayDATA_IDS);
|
||||
}
|
||||
Map<String,Object> dataMap = new HashMap<String,Object>();
|
||||
Map<String, Object> dataMap = new HashMap<String, Object>();
|
||||
List<String> titles = new ArrayList<String>();
|
||||
titles.add("车牌号"); //1
|
||||
titles.add("车架号"); //2
|
||||
//titles.add("车身编号"); //3
|
||||
titles.add("车辆类型"); //4
|
||||
titles.add("运营证号"); //5
|
||||
titles.add("归属部门"); //6
|
||||
titles.add("车主"); //7
|
||||
titles.add("车主电话"); //8
|
||||
titles.add("初登日期"); //9
|
||||
titles.add("发证日期"); //10
|
||||
titles.add("到期日期"); //11
|
||||
titles.add("车辆品牌"); //12
|
||||
titles.add("车辆型号"); //13
|
||||
titles.add("核定总质量"); //14
|
||||
titles.add("核定载质量"); //15
|
||||
//titles.add("容积"); //16
|
||||
titles.add("车牌号"); //1
|
||||
titles.add("车架号"); //2
|
||||
titles.add("车辆类型"); //3
|
||||
titles.add("运营证号"); //4
|
||||
titles.add("归属部门"); //5
|
||||
titles.add("车主"); //6
|
||||
titles.add("车主电话"); //7
|
||||
titles.add("初登日期"); //8
|
||||
titles.add("发证日期"); //9
|
||||
titles.add("到期日期"); //10
|
||||
titles.add("车辆品牌"); //11
|
||||
titles.add("车辆型号"); //12
|
||||
titles.add("核定总质量"); //13
|
||||
titles.add("核定载质量"); //14
|
||||
dataMap.put("titles", titles);
|
||||
List<PageData> varOList = operatingVehiclesService.listOut(pd);
|
||||
List<PageData> varList = new ArrayList<PageData>();
|
||||
for(int i=0;i<varOList.size();i++){
|
||||
for (int i = 0; i < varOList.size(); i++) {
|
||||
PageData vpd = new PageData();
|
||||
vpd.put("var1", varOList.get(i).getString("PLATE_NUMBER"));//1
|
||||
vpd.put("var2", varOList.get(i).getString("FRAMES_NUMBER"));//2
|
||||
//vpd.put("var3", varOList.get(i).getString("VEHICLE_BODY_NUMBER"));//3
|
||||
vpd.put("var4", varOList.get(i).getString("VEHICLE_TYPE"));//4
|
||||
vpd.put("var5", varOList.get(i).getString("OPERATING_CERTIFICATE"));//5
|
||||
vpd.put("var6", varOList.get(i).getString("BELONGING_DEPARTMENT"));//6
|
||||
vpd.put("var7", varOList.get(i).getString("VEHICLEOWNER"));//7
|
||||
vpd.put("var8", varOList.get(i).getString("VEHICLEOWNER_NUMBER"));//8
|
||||
vpd.put("var9", varOList.get(i).getString("FIRSTSHOW_DATE"));//9
|
||||
vpd.put("var10", varOList.get(i).getString("CERTIFICATE_DATE"));//10
|
||||
vpd.put("var11", varOList.get(i).getString("EXPIRE_DATE"));//11
|
||||
vpd.put("var12", varOList.get(i).getString("VEHICLE_BRAND"));//12
|
||||
vpd.put("var13", varOList.get(i).getString("VEHICLE_MODEL"));//13
|
||||
vpd.put("var14", varOList.get(i).getString("VOUCH_TOTALMASS"));//14
|
||||
vpd.put("var15", varOList.get(i).getString("VOUCH_PAYLOAD"));//15
|
||||
//vpd.put("var16", varOList.get(i).getString("VOLUME"));//16
|
||||
vpd.put("var3", varOList.get(i).getString("VEHICLE_TYPE"));//3
|
||||
vpd.put("var4", varOList.get(i).getString("OPERATING_CERTIFICATE"));//4
|
||||
vpd.put("var5", varOList.get(i).getString("BELONGING_DEPARTMENT"));//5
|
||||
vpd.put("var6", varOList.get(i).getString("VEHICLEOWNER"));//6
|
||||
vpd.put("var7", varOList.get(i).getString("VEHICLEOWNER_NUMBER"));//7
|
||||
vpd.put("var8", varOList.get(i).getString("FIRSTSHOW_DATE"));//8
|
||||
vpd.put("var9", varOList.get(i).getString("CERTIFICATE_DATE"));//9
|
||||
vpd.put("var10", varOList.get(i).getString("EXPIRE_DATE"));//10
|
||||
vpd.put("var11", varOList.get(i).getString("VEHICLE_BRAND"));//11
|
||||
vpd.put("var12", varOList.get(i).getString("VEHICLE_MODEL"));//12
|
||||
vpd.put("var13", varOList.get(i).getString("VOUCH_TOTALMASS"));//13
|
||||
vpd.put("var14", varOList.get(i).getString("VOUCH_PAYLOAD"));//14
|
||||
varList.add(vpd);
|
||||
}
|
||||
dataMap.put("varList", varList);
|
||||
ObjectExcelView erv = new ObjectExcelView();
|
||||
mv = new ModelAndView(erv,dataMap);
|
||||
mv = new ModelAndView(erv, dataMap);
|
||||
return mv;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/readExcel")
|
||||
@SuppressWarnings("unchecked")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
@LogAnno(menuType = "双重预防", menuServer = "风险管控", instructionsOperate = "风险点(单元)", instructionsType = "上传附件")
|
||||
public Object readExcel(@RequestParam(value = "FFILE", required = false) MultipartFile file) throws Exception {
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
String errInfo = "success";
|
||||
StringBuffer errorStr = new StringBuffer();
|
||||
if (null != file && !file.isEmpty()) {
|
||||
File tempFile = new File(file.getOriginalFilename()); //新建file
|
||||
FileUtils.copyInputStreamToFile(file.getInputStream(), tempFile); //将MultipartFile复制到File
|
||||
List<PageData> listPd = (List) ObjectExcelRead.readExcel(tempFile, 1, 0, 0); // 执行读EXCEL操作,读出的数据导入List
|
||||
// 2:从第3行开始;0:从第A列开始;0:第0个sheet
|
||||
/**
|
||||
* var0 :风险点(单元) var1 :所属部门
|
||||
*/
|
||||
|
||||
try {
|
||||
if (listPd.size() < 1) {
|
||||
map.put("result", "error"); // 返回结果
|
||||
map.put("resultStr", "Excel数据为空,请检查数据后,重新上传!");
|
||||
FileUtils.deleteQuietly(tempFile);//删除临时文件
|
||||
return map;
|
||||
}
|
||||
List<PageData> riskunitList = new ArrayList<>();
|
||||
PageData pd = new PageData();
|
||||
pd.put("ISDELETE", "0");
|
||||
pd.put("BELONGING_DEPT", Jurisdiction.getCORPINFO_ID());
|
||||
List<PageData> riskunitListAll = operatingVehiclesService.listAll(pd);
|
||||
Map<String, Object> riskunitMapAll = new HashMap<>();
|
||||
for (PageData pageData : riskunitListAll) {
|
||||
// 使用车牌号作为键
|
||||
String plateNumberKey = Tools.excelHandle(pageData.getString("PLATE_NUMBER"));
|
||||
riskunitMapAll.put(plateNumberKey, pageData);
|
||||
}
|
||||
List<String> header = new ArrayList<>();
|
||||
header.add("自编号");
|
||||
header.add("车牌号");
|
||||
header.add("车架号");
|
||||
/*header.add("车身编号");*/
|
||||
header.add("车辆类型");
|
||||
header.add("运营证号");
|
||||
header.add("归属部门");
|
||||
header.add("车主");
|
||||
header.add("车主电话");
|
||||
header.add("联系人");
|
||||
header.add("联系电话");
|
||||
header.add("初登日期");
|
||||
header.add("发证日期");
|
||||
header.add("到期日期");
|
||||
header.add("车辆品牌");
|
||||
header.add("车辆型号");
|
||||
header.add("核定总质量");
|
||||
header.add("核定载质量");
|
||||
/*header.add("容积");*/
|
||||
header.add("备注");
|
||||
Map<String, Object> hasRiskUnit = new HashMap<>();
|
||||
int succeeNum = 1;
|
||||
for (PageData lpd : listPd) {
|
||||
succeeNum++;
|
||||
convertExcelDate(lpd, "var10"); // 初登日期 FIRSTSHOW_DATE
|
||||
convertExcelDate(lpd, "var11"); // 发证日期 CERTIFICATE_DATE
|
||||
convertExcelDate(lpd, "var12"); // 到期日期 EXPIRE_DATE
|
||||
System.out.println(lpd.get("var10") + "--" + lpd.get("var11") + "--" + lpd.get("var12"));
|
||||
for (int i = 0; i < header.size(); i++) {
|
||||
if (!lpd.containsKey("var" + i)) {
|
||||
errorStr.append("<p>第" + succeeNum + "行的\"" + header.get(i) + "\"无数据</p>");
|
||||
continue;
|
||||
}
|
||||
if (Tools.isEmpty(lpd.get("var" + i))) {
|
||||
errorStr.append("<p>第" + succeeNum + "行的\"" + header.get(i) + "\"无数据</p>");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
String plateNumberVar = Tools.isEmpty(lpd.get("var1")) ? "" : Tools.excelHandle(lpd.get("var1"));
|
||||
|
||||
if (riskunitMapAll.containsKey(plateNumberVar)) {
|
||||
errorStr.append("<p>第" + succeeNum + "行:" + "车牌号为\"" + plateNumberVar + "\"的记录已存在,请检查!" + "</p>");
|
||||
continue;
|
||||
}
|
||||
if (hasRiskUnit.containsKey(plateNumberVar)) {
|
||||
errorStr.append("<p>第" + succeeNum + "行:" + "车牌号重复,请重新检查内容!" + "</p>");
|
||||
continue;
|
||||
}
|
||||
hasRiskUnit.put(plateNumberVar, "1");
|
||||
PageData riskunit = new PageData();
|
||||
riskunit.put("GOODSSELFNUMBER", lpd.get("var0"));
|
||||
riskunit.put("PLATE_NUMBER", lpd.get("var1"));
|
||||
riskunit.put("FRAMES_NUMBER", lpd.get("var2"));
|
||||
riskunit.put("VEHICLE_TYPE", lpd.get("var3"));
|
||||
riskunit.put("OPERATING_CERTIFICATE", lpd.get("var4"));
|
||||
riskunit.put("BELONGING_DEPARTMENT", lpd.get("var5"));
|
||||
riskunit.put("VEHICLEOWNER", lpd.get("var6"));
|
||||
riskunit.put("VEHICLEOWNER_NUMBER", lpd.get("var7"));
|
||||
riskunit.put("CONTACT", lpd.get("var8"));
|
||||
riskunit.put("CONTACT_NUMBER", lpd.get("var9"));
|
||||
riskunit.put("FIRSTSHOW_DATE", lpd.get("var10"));
|
||||
riskunit.put("CERTIFICATE_DATE", lpd.get("var11"));
|
||||
riskunit.put("EXPIRE_DATE", lpd.get("var12"));
|
||||
riskunit.put("VEHICLE_BRAND", lpd.get("var13"));
|
||||
riskunit.put("VEHICLE_MODEL", lpd.get("var14"));
|
||||
riskunit.put("VOUCH_TOTALMASS", lpd.get("var15"));
|
||||
riskunit.put("VOUCH_PAYLOAD", lpd.get("var16"));
|
||||
riskunit.put("REMARK", lpd.get("var18"));
|
||||
riskunit.put("OPERATING_ID", this.get32UUID());
|
||||
riskunit.put("ISDELETE", "0");
|
||||
riskunit.put("CREATOR", Jurisdiction.getName());
|
||||
riskunit.put("CREATTIME", DateUtil.date2Str(new Date()));
|
||||
riskunit.put("OPERATOR", Jurisdiction.getName());
|
||||
riskunit.put("OPERATTIME", DateUtil.date2Str(new Date()));
|
||||
riskunit.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
riskunitList.add(riskunit);
|
||||
}
|
||||
if (Tools.isEmpty(errorStr.toString())) {
|
||||
for (PageData riskunit : riskunitList) {
|
||||
operatingVehiclesService.save(riskunit);
|
||||
}
|
||||
errorStr.append("成功导入" + riskunitList.size() + "条数据!");
|
||||
} else {
|
||||
errInfo = "error";
|
||||
}
|
||||
|
||||
FileUtils.deleteQuietly(tempFile);//删除临时文件
|
||||
} catch (Exception e) {
|
||||
map.put("result", "fail"); // 返回结果
|
||||
map.put("resultStr", errorStr.toString());
|
||||
FileUtils.deleteQuietly(tempFile);//删除临时文件
|
||||
return map;
|
||||
}
|
||||
}
|
||||
map.put("result", "success");//返回结果
|
||||
map.put("resultType", errInfo);//返回message类型
|
||||
map.put("isExcel", "1");//返回类型
|
||||
map.put("resultStr", errorStr.toString());
|
||||
return map;
|
||||
}
|
||||
|
||||
private void convertExcelDate(PageData lpd, String field) {
|
||||
Object excelDateObj = lpd.get(field);
|
||||
if (excelDateObj != null) {
|
||||
// 尝试将对象转换为Double,因为Excel中的日期是以Double类型的数字存储的
|
||||
double excelDate = Double.parseDouble(excelDateObj.toString());
|
||||
// 使用Apache POI的DateUtil获取Java日期对象
|
||||
Date javaDate = org.apache.poi.ss.usermodel.DateUtil.getJavaDate(excelDate);
|
||||
// 使用您的DateUtil工具类进行日期格式化
|
||||
String formattedDate = DateUtil.date2Str(javaDate, "yyyy-MM-dd");
|
||||
// 更新lpd对象中的日期字段
|
||||
lpd.put(field, formattedDate);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,15 +11,16 @@ import com.zcloud.service.system.ImgFilesService;
|
|||
import com.zcloud.util.DateUtil;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.util.CollectionUtils;
|
||||
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.ResponseBody;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 营运管理
|
||||
|
|
@ -56,11 +57,19 @@ public class OperationsController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
pd.put("OPERATIONS_ID", this.get32UUID()); //主键
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); //添加人
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
pd.put("ARCHIVES_TYPE", "正常"); //档案状态
|
||||
pd.put("ARCHIVES_TYPE", "0"); //档案状态
|
||||
pd.put("VEHICLE", pd.get("PLATE_NUMBER"));
|
||||
if(DateUtil.compareDate(pd.getString("DUE_DATE"),DateUtil.getDay()) && DateUtil.compareDate(DateUtil.getDay(),pd.getString("REMINDER_DATE"))) {
|
||||
pd.put("REVERT", 2);
|
||||
} else if (DateUtil.compareDate(DateUtil.getDay(),pd.getString("DUE_DATE"))) {
|
||||
pd.put("REVERT", 0);
|
||||
} else if (DateUtil.compareDate(pd.getString("DUE_DATE"),DateUtil.getDay())) {
|
||||
pd.put("REVERT", 1);
|
||||
}
|
||||
operationsService.save(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -83,7 +92,7 @@ public class OperationsController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("DELETEOR", Jurisdiction.getUSER_ID()); //删除人id
|
||||
pd.put("DELETEORNAME", Jurisdiction.getUsername()); //删除人
|
||||
pd.put("DELETEORNAME", Jurisdiction.getName()); //删除人
|
||||
pd.put("DELETTIME", DateUtil.date2Str(new Date())); //删除时间
|
||||
operationsService.delete(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
|
|
@ -106,8 +115,15 @@ public class OperationsController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
if(DateUtil.compareDate(pd.getString("DUE_DATE"),DateUtil.getDay()) && DateUtil.compareDate(DateUtil.getDay(),pd.getString("REMINDER_DATE"))) {
|
||||
pd.put("REVERT", 2);
|
||||
} else if (DateUtil.compareDate(DateUtil.getDay(),pd.getString("DUE_DATE"))) {
|
||||
pd.put("REVERT", 0);
|
||||
} else if (DateUtil.compareDate(pd.getString("DUE_DATE"),DateUtil.getDay())) {
|
||||
pd.put("REVERT", 1);
|
||||
}
|
||||
operationsService.edit(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -130,7 +146,7 @@ public class OperationsController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
operationsService.edit2(pd);
|
||||
map.put("pd", pd);
|
||||
|
|
@ -156,6 +172,54 @@ public class OperationsController extends BaseController {
|
|||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = operationsService.list(page); //列出Question列表
|
||||
|
||||
varList.stream().anyMatch(data -> {
|
||||
if ("1".equals(data.getString("OPEAR_ISSCRAP")) || "1".equals(data.getString("FREIGHT_ISSCRAP"))) {
|
||||
data.put("ARCHIVES_TYPE", "2");
|
||||
} else if ("1".equals(data.getString("OPEAR_ISASSIGNED")) || "1".equals(data.getString("FREIGHT_ISASSIGNED"))) {
|
||||
data.put("ARCHIVES_TYPE", "1");
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
varList.forEach(data -> {
|
||||
Date dueDate = DateUtil.fomatDate(data.getString("DUE_DATE"));
|
||||
Date reminderDate = DateUtil.fomatDate(data.getString("REMINDER_DATE"));
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String toDay = sdf.format(new Date());
|
||||
Date date = null;
|
||||
try {
|
||||
date = sdf.parse(toDay);
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
// 已到期
|
||||
if(dueDate.before(date)) {
|
||||
data.put("REVERT", "0");
|
||||
try {
|
||||
operationsService.edit(data);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
// 即将到期
|
||||
} else if ((dueDate.after(date) || dueDate.equals(date)) && (reminderDate.before(date) || reminderDate.equals(date))) {
|
||||
data.put("REVERT", "2");
|
||||
try {
|
||||
operationsService.edit(data);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
// 未到期
|
||||
}else{
|
||||
data.put("REVERT", "1");
|
||||
try {
|
||||
operationsService.edit(data);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -182,13 +246,15 @@ public class OperationsController extends BaseController {
|
|||
pd2.put("CORPINFO_ID", pd.get("CORPINFO_ID")); //企业ID
|
||||
page.setPd(pd2);
|
||||
List<PageData> operationList = operationsService.list(page);
|
||||
for (int i = 0; i < operationList.size(); i++) {
|
||||
if(pd.get("OPERATIONS_ID").equals(operationList.get(i).get("OPERATIONS_ID"))) {
|
||||
pd.put("CYCLE_NAME",operationList.get(i).get("CYCLE_NAME"));
|
||||
if (!CollectionUtils.isEmpty(operationList)) {
|
||||
for (int i = 0; i < operationList.size(); i++) {
|
||||
if (pd.get("OPERATIONS_ID").equals(operationList.get(i).get("OPERATIONS_ID"))) {
|
||||
pd.put("CYCLE_NAME", operationList.get(i).get("CYCLE_NAME"));
|
||||
}
|
||||
}
|
||||
}
|
||||
pd.put("FOREIGN_KEY", pd.getString("OPERATIONS_ID"));
|
||||
pd.put("TYPE",126);
|
||||
pd.put("FOREIGN_KEY", pd.getString("VEHICLE"));
|
||||
pd.put("TYPE", 122);
|
||||
List<PageData> operationsinfoImgs = imgfilesService.listAll(pd);//营运证资料图片
|
||||
map.put("pd", pd);
|
||||
map.put("operationsinfoImgs", operationsinfoImgs);
|
||||
|
|
@ -203,66 +269,88 @@ public class OperationsController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID",Jurisdiction.getCORPINFO_ID());
|
||||
if(!StringUtils.isEmpty(pd.getString("TRAFFIC_TYPE")) && pd.getString("TRAFFIC_TYPE").equals("1")) {
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
if (!StringUtils.isEmpty(pd.getString("TRAFFIC_TYPE")) && pd.getString("TRAFFIC_TYPE").equals("1")) {
|
||||
// 营运车辆
|
||||
List<PageData> operatingList = operatingVehiclesService.operationVehicleList(pd.getString("CORPINFO_ID"));
|
||||
page.setPd(pd);
|
||||
List<PageData> insAnnually = operationsService.list(page);
|
||||
for (int i = 0; i < insAnnually.size(); i++) {
|
||||
for (int j = 0; j < operatingList.size(); j++) {
|
||||
if(operatingList.get(j).get("OPERATING_ID").equals(insAnnually.get(i).get("VEHICLE"))) {
|
||||
operatingList.remove(j);
|
||||
}
|
||||
}
|
||||
List<PageData> operationsList = operationsService.list(page);
|
||||
|
||||
// 获取营运车辆列表中所有的运营车辆
|
||||
List<PageData> operations = operationsList.stream()
|
||||
.filter(data -> StringUtils.equals(data.getString("VEHICLE_MODEL"), "1"))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 过滤掉营运管理列表中所有营运车辆信息
|
||||
List<PageData> varList = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(operations)) {
|
||||
varList = operatingList.stream().parallel()
|
||||
.filter(operating -> operations.stream()
|
||||
.noneMatch(operation -> StringUtils.equals(operating.getString("OPERATING_ID"), operation.getString("VEHICLE"))))
|
||||
.collect(Collectors.toList());
|
||||
} else {
|
||||
varList = operatingList;
|
||||
}
|
||||
if(pd.containsKey("ID")){
|
||||
|
||||
if (pd.containsKey("ID")) {
|
||||
pd.put("OPERATING_ID", pd.getString("ID"));
|
||||
pd.put("FOREIGN_KEY", pd.getString("OPERATING_ID"));
|
||||
pd.put("TYPE",121);
|
||||
pd.put("TYPE", 121);
|
||||
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
|
||||
map.put("drivingLicenseImgs", drivingLicenseImgs);
|
||||
}
|
||||
operatingList.forEach(operating -> {
|
||||
varList.forEach(operating -> {
|
||||
operating.put("ID", operating.getString("OPERATING_ID"));
|
||||
});
|
||||
map.put("list", operatingList);
|
||||
map.put("list", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
if("2".equals(pd.getString("TRAFFIC_TYPE"))) {
|
||||
if ("2".equals(pd.getString("TRAFFIC_TYPE"))) {
|
||||
// 货运挂车
|
||||
List<PageData> freightList = freightTrailerService.trailerList(pd.getString("CORPINFO_ID"));
|
||||
page.setPd(pd);
|
||||
List<PageData> insAnnually = operationsService.list(page);
|
||||
for (int i = 0; i < insAnnually.size(); i++) {
|
||||
for (int j = 0; j < freightList.size(); j++) {
|
||||
if(freightList.get(j).get("FREIGHTTRAILER_ID").equals(insAnnually.get(i).get("VEHICLE"))) {
|
||||
freightList.remove(j);
|
||||
}
|
||||
}
|
||||
List<PageData> operationsList = operationsService.list(page);
|
||||
|
||||
// 获取营运管理列表中所有的货运挂车
|
||||
List<PageData> operations = operationsList.stream()
|
||||
.filter(data -> StringUtils.equals(data.getString("VEHICLE_MODEL"), "2"))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
List<PageData> varList = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(operations)) {
|
||||
varList = freightList.stream().parallel()
|
||||
.filter(freight -> operations.stream()
|
||||
.noneMatch(operation -> StringUtils.equals(freight.getString("FREIGHTTRAILER_ID"), operation.getString("VEHICLE"))))
|
||||
.collect(Collectors.toList());
|
||||
} else {
|
||||
varList = freightList;
|
||||
}
|
||||
if(pd.containsKey("ID")){
|
||||
|
||||
if (pd.containsKey("ID")) {
|
||||
pd.put("FREIGHTTRAILER_ID", pd.getString("ID"));
|
||||
pd.put("FOREIGN_KEY", pd.getString("FREIGHTTRAILER_ID"));
|
||||
pd.put("TYPE",121);
|
||||
pd.put("TYPE", 121);
|
||||
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
|
||||
map.put("drivingLicenseImgs", drivingLicenseImgs);
|
||||
}
|
||||
freightList.forEach(freight -> {
|
||||
varList.forEach(freight -> {
|
||||
freight.put("ID", freight.getString("FREIGHTTRAILER_ID"));
|
||||
});
|
||||
map.put("list", freightList);
|
||||
map.put("list", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
List<PageData> resData = freightTrailerService.vehicleList(pd);
|
||||
if(pd.containsKey("ID")){
|
||||
if (pd.containsKey("ID")) {
|
||||
pd.put("FOREIGN_KEY", pd.getString("ID"));
|
||||
pd.put("TYPE",121);
|
||||
pd.put("TYPE", 121);
|
||||
List<PageData> drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片
|
||||
pd.put("TYPE", 122);
|
||||
List<PageData> operatingcertificateImgs = imgfilesService.listAll(pd);//营运证照片
|
||||
map.put("drivingLicenseImgs", drivingLicenseImgs);
|
||||
map.put("operatingcertificateImgs", operatingcertificateImgs);
|
||||
}
|
||||
map.put("list", resData);
|
||||
map.put("result", errInfo);
|
||||
|
|
|
|||
|
|
@ -30,11 +30,6 @@ public class ReportedIncidentController extends BaseController {
|
|||
|
||||
@Autowired
|
||||
private ReportedIncidentService reportedIncidentService;
|
||||
@Autowired
|
||||
private ImgFilesService imgfilesService;
|
||||
|
||||
@Autowired
|
||||
private ScrapManageService scrapManageService;
|
||||
|
||||
/**
|
||||
* 新增
|
||||
|
|
@ -51,7 +46,7 @@ public class ReportedIncidentController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
pd.put("REPORTEDINCIDENT_ID", this.get32UUID()); //主键
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); //添加人
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
|
|
@ -78,7 +73,7 @@ public class ReportedIncidentController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("DELETEOR", Jurisdiction.getUSER_ID()); //删除人id
|
||||
pd.put("DELETEORNAME", Jurisdiction.getUsername()); //删除人
|
||||
pd.put("DELETEORNAME", Jurisdiction.getName()); //删除人
|
||||
pd.put("DELETTIME", DateUtil.date2Str(new Date())); //删除时间
|
||||
reportedIncidentService.delete(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
|
|
@ -101,7 +96,7 @@ public class ReportedIncidentController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
reportedIncidentService.edit(pd);
|
||||
map.put("pd", pd);
|
||||
|
|
@ -139,10 +134,10 @@ public class ReportedIncidentController extends BaseController {
|
|||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/goEdit")
|
||||
@RequestMapping(value = "/goEdit")
|
||||
@ResponseBody
|
||||
public Object goEdit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object goEdit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public class SafetyInvestmentPlanController extends BaseController {
|
|||
}
|
||||
|
||||
/**删除
|
||||
* @param out
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import com.zcloud.util.DateUtil;
|
|||
import com.zcloud.util.Jurisdiction;
|
||||
import com.zcloud.util.ObjectExcelView;
|
||||
import com.zcloud.util.Tools;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
|
@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 说明:安全投入使用
|
||||
|
|
@ -45,9 +46,9 @@ public class SafetyInvestmentUseController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("SAFETYINVESTMENTUSE_ID", this.get32UUID()); //主键
|
||||
pd.put("CREATOR", Jurisdiction.getUsername()); //添加人
|
||||
pd.put("CREATOR", Jurisdiction.getName()); //添加人
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||
pd.put("OPERATOR", Jurisdiction.getName()); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
pd.put("ISDELETE", "0"); //是否删除 1-是 0-否
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
|
|
@ -57,7 +58,7 @@ public class SafetyInvestmentUseController extends BaseController {
|
|||
}
|
||||
|
||||
/**删除
|
||||
* @param out
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
|
|
@ -69,6 +70,7 @@ public class SafetyInvestmentUseController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
safetyinvestmentuseService.delete(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
|
|
@ -87,6 +89,7 @@ public class SafetyInvestmentUseController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
safetyinvestmentuseService.edit(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
|
|
@ -108,6 +111,7 @@ public class SafetyInvestmentUseController extends BaseController {
|
|||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
page.setPd(pd);
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
List<PageData> varList = safetyinvestmentuseService.list(page); //列出SafetyInvestmentUse列表
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
|
|
@ -116,7 +120,7 @@ public class SafetyInvestmentUseController extends BaseController {
|
|||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/listAll")
|
||||
|
|
@ -128,8 +132,27 @@ public class SafetyInvestmentUseController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
List<PageData> varList = safetyinvestmentuseService.listAll(pd); //列出SafetyInvestmentUse列表
|
||||
List<PageData> varList = safetyinvestmentuseService.listAll(pd); //列出SafetyInvestmentUse列表
|
||||
|
||||
// 计算预提额合计
|
||||
Double drawingsTotal = varList.stream().
|
||||
filter(data -> StringUtils.equals(data.getString("USE_TYPE"), "1"))
|
||||
.mapToDouble(data -> Double.valueOf(data.getString("AMOUNT"))).sum();
|
||||
|
||||
// 计算所有支出项目合计
|
||||
List<PageData> allOutlayTotalList = new ArrayList<>();
|
||||
varList.stream().filter(data -> StringUtils.equals(data.getString("USE_TYPE"), "2"))
|
||||
.collect(Collectors.groupingBy(data -> data.getString("TYPE"))).forEach((key, value) -> {
|
||||
PageData pageData = new PageData();
|
||||
double total = value.stream().mapToDouble(data -> Double.valueOf(data.getString("AMOUNT"))).sum();
|
||||
pageData.put("type", key);
|
||||
pageData.put("total", total);
|
||||
allOutlayTotalList.add(pageData);
|
||||
});
|
||||
|
||||
map.put("varList", varList);
|
||||
map.put("drawingsTotal", drawingsTotal);
|
||||
map.put("allOutlayTotalList", allOutlayTotalList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
|
@ -174,7 +197,7 @@ public class SafetyInvestmentUseController extends BaseController {
|
|||
}else{
|
||||
errInfo = "error";
|
||||
}
|
||||
map.put("result", errInfo); //返回结果
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ import com.zcloud.service.freighttrailer.FreightTrailerService;
|
|||
import com.zcloud.service.operatingvehicles.OperatingVehiclesService;
|
||||
import com.zcloud.service.scrapManage.ScrapManageService;
|
||||
import com.zcloud.util.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.util.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
|
@ -17,10 +19,8 @@ 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;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/scrapmanage")
|
||||
|
|
@ -53,8 +53,9 @@ public class ScrapManageController extends BaseController {
|
|||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("ISSCRAP", "1");
|
||||
freightTrailerService.editScrapStatus(pd);
|
||||
scrapManageService.save(pd);
|
||||
map.put("pd", pd);
|
||||
|
|
@ -74,7 +75,7 @@ public class ScrapManageController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("DELETOR", Jurisdiction.getUSER_ID());
|
||||
pd.put("DELETORNAME", Jurisdiction.getUsername());
|
||||
pd.put("DELETORNAME", Jurisdiction.getName());
|
||||
pd.put("DELETTIME", DateUtil.date2Str(new Date()));
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
PageData pageData = scrapManageService.findById(pd);
|
||||
|
|
@ -83,8 +84,10 @@ public class ScrapManageController extends BaseController {
|
|||
pd2.put("PLATE_NUMBER", pageData.get("PLATE_NUMBER"));
|
||||
pd2.put("CORPINFO_ID", pageData.get("CORPINFO_ID"));
|
||||
PageData scrapVehicle = operatingVehiclesService.findByfindByPlateNumber(pd2);
|
||||
scrapVehicle.put("ISSCRAP", "0");
|
||||
operatingVehiclesService.edit(scrapVehicle);
|
||||
if(!ObjectUtils.isEmpty(scrapVehicle)) {
|
||||
scrapVehicle.put("ISSCRAP", "0");
|
||||
operatingVehiclesService.edit(scrapVehicle);
|
||||
}
|
||||
}else{
|
||||
PageData pd2 = new PageData();
|
||||
pd2.put("PLATE_NUMBER", pageData.get("PLATE_NUMBER"));
|
||||
|
|
@ -111,10 +114,10 @@ public class ScrapManageController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); // 修改人名字
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
scrapManageService.edit(pd);
|
||||
map.put("pd", pd);
|
||||
|
|
@ -148,6 +151,7 @@ public class ScrapManageController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = scrapManageService.list(page); //列出MajorDangerSource列表
|
||||
map.put("varList", varList);
|
||||
|
|
@ -180,54 +184,54 @@ public class ScrapManageController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/getscrapoperationvehiclelist")
|
||||
|
||||
@RequestMapping(value = "/getScrapOperationVehicleList")
|
||||
@ResponseBody
|
||||
public Object getScrapOperationVehicleList() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
String corpId = Jurisdiction.getCORPINFO_ID();
|
||||
List<PageData> operationList = operatingVehiclesService.operationVehicleList(corpId); //列出Question列表
|
||||
PageData pd = new PageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
List<PageData> operationList = operatingVehiclesService.getScrapPulldownVehicleList(pd); //列出Question列表
|
||||
List<PageData> scrapList = scrapManageService.scrapListAll(corpId);
|
||||
for (int i = 0; i < scrapList.size(); i++) {
|
||||
for (int j = 0; j < operationList.size(); j++) {
|
||||
if(scrapList.get(i).get("PLATE_NUMBER").equals(operationList.get(j).get("PLATE_NUMBER"))) {
|
||||
operationList.remove(j);
|
||||
}
|
||||
}
|
||||
|
||||
List<PageData> varList = new ArrayList<>();
|
||||
if(!CollectionUtils.isEmpty(scrapList)) {
|
||||
varList = operationList.stream().parallel()
|
||||
.filter(operating -> scrapList.stream()
|
||||
.noneMatch(scrap -> StringUtils.equals(operating.getString("PLATE_NUMBER"), scrap.getString("PLATE_NUMBER"))))
|
||||
.collect(Collectors.toList());
|
||||
}else {
|
||||
varList = operationList;
|
||||
}
|
||||
map.put("varList", operationList);
|
||||
varList.forEach(data -> {
|
||||
data.put("ID",data.getString("OPERATING_ID"));
|
||||
});
|
||||
map.put("varList", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/*@RequestMapping(value = "/getscrapfreighttrailerlist")
|
||||
@RequestMapping(value = "/getScrapFreightTrailerList")
|
||||
@ResponseBody
|
||||
public Object getScrapFreightTrailerList() throws Exception {
|
||||
public Object getAssignedFreightTrailerList() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
String corpId = Jurisdiction.getCORPINFO_ID();
|
||||
List<PageData> freightList = freightTrailerService.trailerList(corpId);
|
||||
List<PageData> freightList = freightTrailerService.getScrapPulldownVehicleList(corpId);
|
||||
List<PageData> scrapList = scrapManageService.scrapListAll(corpId);
|
||||
for (int i = 0; i < scrapList.size(); i++) {
|
||||
for (int j = 0; j < freightList.size(); j++) {
|
||||
if(scrapList.get(i).get("PLATE_NUMBER").equals(freightList.get(j).get("PLATE_NUMBER"))) {
|
||||
freightList.remove(j);
|
||||
}
|
||||
}
|
||||
}
|
||||
map.put("varList", freightList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}*/
|
||||
|
||||
@RequestMapping(value = "/getscrapfreighttrailerlist")
|
||||
@ResponseBody
|
||||
public Object getScrapFreightTrailerList() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
String corpId = Jurisdiction.getCORPINFO_ID();
|
||||
List<PageData> freightList = freightTrailerService.trailerList(corpId);
|
||||
map.put("varList", freightList);
|
||||
List<PageData> varList = new ArrayList<>();
|
||||
if(!CollectionUtils.isEmpty(scrapList)) {
|
||||
varList = freightList.stream().parallel()
|
||||
.filter(freight -> scrapList.stream()
|
||||
.noneMatch(scrap -> StringUtils.equals(freight.getString("PLATE_NUMBER"), scrap.getString("PLATE_NUMBER"))))
|
||||
.collect(Collectors.toList());
|
||||
}else{
|
||||
varList = freightList;
|
||||
}
|
||||
map.put("varList", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,15 +115,15 @@ public class DepartmentController extends BaseController {
|
|||
errInfo = "havelist";
|
||||
map.put("msg", "该部门有清单,请先删除清单"); //返回结果
|
||||
}else{
|
||||
PageData dept = new PageData();
|
||||
dept.put("DEPARTMENT_ID",DEPARTMENT_ID);
|
||||
PageData byId = departmentService.findById(dept);
|
||||
JSONObject body = PLSUtil.GeneralDelete("/deploy/dept/", byId.getString("deptId"),Jurisdiction.getCORPINFO_ID());
|
||||
if (body != null) {
|
||||
if (!"200".equals(body.getString("code"))) {
|
||||
return ReturnMap.error(body.getString("msg"));
|
||||
}
|
||||
}
|
||||
// PageData dept = new PageData();
|
||||
// dept.put("DEPARTMENT_ID",DEPARTMENT_ID);
|
||||
// PageData byId = departmentService.findById(dept);
|
||||
// JSONObject body = PLSUtil.GeneralDelete("/deploy/dept/", byId.getString("deptId"),Jurisdiction.getCORPINFO_ID());
|
||||
// if (body != null) {
|
||||
// if (!"200".equals(body.getString("code"))) {
|
||||
// return ReturnMap.error(body.getString("msg"));
|
||||
// }
|
||||
// }
|
||||
departmentService.delete(pd); //执行删除
|
||||
}
|
||||
map.put("result", errInfo); //返回结果
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ public class UsersController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
//page.setPd(pd);
|
||||
List<PageData> userList = usersService.userSelectPersonTypelist(pd);//列出用户列表
|
||||
map.put("userList", userList);
|
||||
|
|
@ -827,11 +827,11 @@ public class UsersController extends BaseController {
|
|||
String errInfo = "success";
|
||||
pd = this.getPageData();
|
||||
FHLOG.save(Jurisdiction.getUsername(), "删除用户ID:" + pd.getString("USER_ID")); //记录日志
|
||||
if (!PLSUtil.removeUser(pd)) {
|
||||
map.put("result", "errInfo"); //返回结果
|
||||
map.put("msg", "删除失败,请联系管理员"); //返回结果
|
||||
return map;
|
||||
}
|
||||
// if (!PLSUtil.removeUser(pd)) {
|
||||
// map.put("result", "errInfo"); //返回结果
|
||||
// map.put("msg", "删除失败,请联系管理员"); //返回结果
|
||||
// return map;
|
||||
// }
|
||||
usersService.deleteUser(pd); //删除用户
|
||||
ueditorService.delete(pd); //删除副文本关联数据
|
||||
|
||||
|
|
@ -1662,7 +1662,7 @@ public class UsersController extends BaseController {
|
|||
}
|
||||
}
|
||||
// 进行定位卡号同步校验
|
||||
for (PageData pageData : editUserList) {
|
||||
/*for (PageData pageData : editUserList) {
|
||||
String msg = usersService.changeOrUpdUserCardNo(pageData);
|
||||
if (!msg.equals(Const.CAN_CHENG_USER)) {
|
||||
errorStr.append("第" + number + "行,");
|
||||
|
|
@ -1677,15 +1677,15 @@ public class UsersController extends BaseController {
|
|||
errorStr.append("第" + number + "行,");
|
||||
errorStr.append("人员定位系统用户添加失败,请联系管理员。" + "\n");
|
||||
}
|
||||
}
|
||||
}*/
|
||||
if (Tools.isEmpty(errorStr.toString())) {
|
||||
for (PageData pageData : addUserList) {
|
||||
usersService.saveUser(pageData);
|
||||
}
|
||||
for (PageData pageData : editUserList) {
|
||||
if (PLSUtil.editUser(pageData)) {
|
||||
// if (PLSUtil.editUser(pageData)) {
|
||||
usersService.editUser(pageData);
|
||||
}
|
||||
// }
|
||||
}
|
||||
errorStr.append("成功导入" + addUserList.size() + "条数据!");
|
||||
errorStr.append("成功修改" + editUserList.size() + "条数据!");
|
||||
|
|
@ -2778,6 +2778,17 @@ public class UsersController extends BaseController {
|
|||
pd.put("AUTHENTICATION", "0");
|
||||
userInfoService.delete(pd);
|
||||
userInfoService.save(pd);
|
||||
|
||||
PageData pdd = new PageData();
|
||||
pdd.put("USER_ID", pd.getString("USER_ID"));
|
||||
userInfoService.delUserInfoPersonnelType(pdd);
|
||||
String[] PERSONNEL_TYPES = pd.getString("PERSONNEL_TYPE").split(",");
|
||||
for (String str : PERSONNEL_TYPES) {
|
||||
pdd.put("ID", Warden.get32UUID());
|
||||
pdd.put("PERSONNEL_TYPE", str);
|
||||
userInfoService.addUserInfoPersonnelType(pdd);
|
||||
}
|
||||
|
||||
// 如果修改了部门/岗位,将该用户所有清单都删除
|
||||
if (pd.get("OPERATIONTYPE") != null && pd.get("OPERATIONTYPE").toString() != null && Tools.notEmpty(pd.get("OPERATIONTYPE").toString())) {
|
||||
List<PageData> listIds = listManagerService.listListByUser(pd);
|
||||
|
|
@ -2984,4 +2995,335 @@ public class UsersController extends BaseController {
|
|||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping("/getTrafficPenaltyUserList")
|
||||
@ResponseBody
|
||||
public Object getTrafficPenaltyUserList(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
/*检索条件*/
|
||||
String ROLE_ID = pd.getString("ROLE_ID"); //角色ID
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
String DEPARTMENT_ID = pd.getString("DEPARTMENT_ID"); //关键词检索条件
|
||||
if (Tools.notEmpty(DEPARTMENT_ID)) pd.put("DEPARTMENT_ID", DEPARTMENT_ID.trim());
|
||||
String STARTTIME = pd.getString("STARTTIME"); //开始时间
|
||||
String ENDTIME = pd.getString("ENDTIME"); //结束时间
|
||||
if (Tools.notEmpty(STARTTIME)) pd.put("STARTTIME", STARTTIME + " 00:00:00");
|
||||
if (Tools.notEmpty(ENDTIME)) pd.put("ENDTIME", ENDTIME + " 00:00:00");
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
page.setPd(pd);
|
||||
Object practitionerPage = this.getPractitionerPage(page);//列出用户列表
|
||||
map.put("userList", practitionerPage);
|
||||
map.put("page", page);
|
||||
map.put("pd", pd);
|
||||
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员列表(select)
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping("/getPractitionerSelectList")
|
||||
@ResponseBody
|
||||
@LogAnno(menuType = "综合管理", menuServer = "特种设备", instructionsOperate = "设备管理", instructionsType = "用户列表")
|
||||
public Object getPractitionerSelectList() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
List<PageData> userList = usersService.getPractitionerSelectList(pd);//列出用户列表
|
||||
map.put("userList", userList);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 从EXCEL导入到数据库
|
||||
*
|
||||
* @param file
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/readExcel4")
|
||||
// // @RequiresPermissions("fromExcel")
|
||||
@SuppressWarnings("unchecked")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
@LogAnno(menuType = "双重预防", menuServer = "企业管理", instructionsOperate = "用户管理", instructionsType = "从EXCEL导入到数据库")
|
||||
public Object readExcel4(@RequestParam(value = "FFILE", required = false) MultipartFile file) throws Exception {
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
String errInfo = "success";
|
||||
StringBuffer errorStr = new StringBuffer();
|
||||
|
||||
if (null != file && !file.isEmpty()) {
|
||||
File tempFile = new File(file.getOriginalFilename()); //新建file
|
||||
FileUtils.copyInputStreamToFile(file.getInputStream(), tempFile); //将MultipartFile复制到File
|
||||
List<PageData> listPd = (List) ObjectExcelRead.readExcel(tempFile, 1, 0, 0); //执行读EXCEL操作,读出的数据导入List 2:从第3行开始;0:从第A列开始;0:第0个sheet
|
||||
/**
|
||||
* var0 :部门
|
||||
* var1 :岗位
|
||||
* var2 :手机号
|
||||
* var3 :姓名
|
||||
* var4 :身份证号
|
||||
* var5 :人员类型
|
||||
*/
|
||||
|
||||
List<String> header = new ArrayList<String>();
|
||||
header.add("部门");
|
||||
header.add("岗位");
|
||||
header.add("手机号");
|
||||
header.add("姓名");
|
||||
header.add("身份证号");
|
||||
header.add("人员类型");
|
||||
|
||||
try {
|
||||
if (listPd.size() > 0 && listPd.size() <= 1000) {
|
||||
|
||||
/** 获取企业下的所有部门信息*/
|
||||
PageData departPd = new PageData();
|
||||
departPd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
List<PageData> userInfoMap = usersService.getUserCardNoAll(departPd);
|
||||
HashMap<String, String> userInfos = new HashMap<>();
|
||||
|
||||
for (PageData pageData : userInfoMap) {
|
||||
userInfos.put(pageData.getString("CARDNO"), pageData.getString("USERNAME"));
|
||||
}
|
||||
List<PageData> departList = departmentService.listAll(departPd);
|
||||
Map<String, Object> departMap = new HashMap<String, Object>();
|
||||
for (PageData pageData : departList) {
|
||||
departMap.put(Tools.excelHandle(pageData.getString("NAME")), pageData);
|
||||
}
|
||||
/** 获取所有岗位信息 */
|
||||
PageData postPd = new PageData();
|
||||
postPd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
List<PageData> postList = postService.listAll(postPd);
|
||||
Map<String, Map<String, Object>> postMap = new HashMap<>(); //部门id,岗位map
|
||||
for (PageData pageData : postList) {
|
||||
Map<String, Object> postValMap = new HashMap<>();
|
||||
String postDept = pageData.getString("DEPARTMENT_ID");
|
||||
if (postMap.containsKey(postDept)) {
|
||||
postValMap = postMap.get(postDept);
|
||||
}
|
||||
postValMap.put(Tools.excelHandle(pageData.getString("NAME")), pageData);
|
||||
postMap.put(postDept, postValMap);
|
||||
}
|
||||
/** 获取所有岗位信息结束 */
|
||||
|
||||
/** 获取所有用户信息 用于判断姓名是否重复 */
|
||||
PageData userPd = new PageData();
|
||||
userPd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
List<PageData> userList = usersService.findUserNameAll(userPd);
|
||||
List<PageData> userEList = usersService.findAllUser(userPd);
|
||||
Map<String, String> userMap = new HashMap<>();
|
||||
Map<String, Object> emailMap = new HashMap<>();
|
||||
for (PageData pageData : userList) {
|
||||
userMap.put(pageData.getString("USERNAME"), JSON.toJSONString(pageData));
|
||||
}
|
||||
for (PageData pageData : userEList) {
|
||||
emailMap.put(pageData.getString("USERNAME"), "");
|
||||
}
|
||||
PageData rolePd = new PageData();
|
||||
rolePd.put("ISMAIN", "0");
|
||||
rolePd.put("PARENT_ID", Jurisdiction.getVIPLEVEL());
|
||||
rolePd.put("ROLE_NAME", "个人账号");
|
||||
PageData role = roleService.findByPidAndMain(rolePd);
|
||||
if (Tools.isEmpty(role)) {
|
||||
errorStr.append("未找到默认角色信息!请联系管理员");
|
||||
map.put("result", errInfo); //返回结果
|
||||
map.put("msg", ""); //返回结果
|
||||
return map;
|
||||
}
|
||||
/**
|
||||
* 判断是否填写必填
|
||||
* 判断excel是有有重复数据
|
||||
* 判断数据库是否有重复数据
|
||||
* 导入 Page
|
||||
*
|
||||
* 企业分级账号
|
||||
*/
|
||||
Map<String, Object> hasUserNameChongfu = new HashMap<>();//判断重复数据
|
||||
|
||||
Map<String, Object> emailChongfu = new HashMap<>();//判断重复数据
|
||||
Integer number = 0;//行数,用于提示用户
|
||||
List<PageData> addUserList = new ArrayList<>();
|
||||
List<PageData> editUserList = new ArrayList<>();
|
||||
for (PageData lpd : listPd) {
|
||||
number++;
|
||||
for (int i = 0; i < 6; i++) {
|
||||
if (Tools.isEmpty(lpd.get("var" + i))) {
|
||||
errorStr.append("第" + number + "行的\"" + header.get(i) + "\"无数据;\n");
|
||||
}
|
||||
}
|
||||
|
||||
String dept = Tools.isEmpty(lpd.get("var0")) ? "" : Tools.excelHandle(lpd.get("var0"));//部门
|
||||
String postName = Tools.isEmpty(lpd.get("var1")) ? "" : lpd.get("var1").toString();//岗位
|
||||
String userName = Tools.isEmpty(lpd.get("var2")) ? "" : lpd.get("var2").toString();//手机号
|
||||
Pattern patternPhone = Pattern.compile(RegexPatterns.PHONE_REGEX);
|
||||
Matcher matcher = patternPhone.matcher(lpd.getString("var2"));
|
||||
if (!matcher.matches()) {
|
||||
errorStr.append("第" + number + "行,");
|
||||
errorStr.append("手机号格式不正确,请重新确认数据;\n");
|
||||
continue;
|
||||
}
|
||||
String name = Tools.isEmpty(lpd.get("var3")) ? "" : lpd.get("var3").toString();//姓名
|
||||
String IDNumber = Tools.isEmpty(lpd.get("var4")) ? "" : lpd.get("var4").toString();//身份证号
|
||||
Pattern patternCard = Pattern.compile(RegexPatterns.USERID_CARD);
|
||||
Matcher matchercard = patternCard.matcher(lpd.getString("var4"));
|
||||
if (!matchercard.matches()) {
|
||||
errorStr.append("第" + number + "行,");
|
||||
errorStr.append("身份证号格式不正确,请重新确认数据;\n");
|
||||
continue;
|
||||
}
|
||||
String PERSONNEL_TYPE = Tools.isEmpty(lpd.get("var5")) ? "" : lpd.get("var5").toString();//人员类型
|
||||
PageData renyuanleixing = new PageData();
|
||||
if (!Tools.isEmpty(PERSONNEL_TYPE)) {//人员类型
|
||||
renyuanleixing = dictionariesService.findByName(PERSONNEL_TYPE, "0b62f92b0b624aab8e89a77304a64d5e");//人员类型
|
||||
if (null == renyuanleixing) {
|
||||
errorStr.append("第" + number + "行,");
|
||||
errorStr.append("未找到人员类型信息,请重新确认数据;\n");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
/** 部门信息 **/
|
||||
String departId = "";
|
||||
if (departMap.containsKey(dept)) {
|
||||
PageData depart = (PageData) departMap.get(dept);
|
||||
departId = depart.get("DEPARTMENT_ID").toString();
|
||||
} else {
|
||||
errorStr.append("第" + number + "行,部门信息错误,系统未找到该部门,请重新确认数据;\n");
|
||||
continue;
|
||||
}
|
||||
/** 部门信息 结束**/
|
||||
/** 岗位 **/
|
||||
Map<String, Object> postValMap = postMap.get(departId);//这个部门下的所有岗位信息
|
||||
String postId = "";
|
||||
if (postValMap != null) {
|
||||
PageData o = (PageData) postValMap.get(postName);
|
||||
if (o != null) {
|
||||
postId = o.getString("POST_ID");
|
||||
}
|
||||
}
|
||||
/** 岗位 结束**/
|
||||
|
||||
if (hasUserNameChongfu.containsKey(userName)) {
|
||||
errorStr.append("第" + number + "行,");
|
||||
errorStr.append("手机号重复,请重新确认数据;\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
hasUserNameChongfu.put(userName, name);
|
||||
|
||||
PageData user = new PageData();
|
||||
user.put("USER_ID", this.get32UUID());
|
||||
user.put("USERNAME", userName);
|
||||
user.put("USER_ID_CARD", IDNumber);
|
||||
user.put("PERSONNEL_TYPE", renyuanleixing.get("DICTIONARIES_ID"));
|
||||
user.put("PASSWORD", new SimpleHash("SHA-1", userName, "Aa@123456").toString());
|
||||
user.put("NAME", name);
|
||||
user.put("CARDNO", "");
|
||||
user.put("ROLE_ID", role.getString("ROLE_ID"));
|
||||
user.put("LAST_LOGIN", "");
|
||||
user.put("IP", "");
|
||||
user.put("STATUS", "0");
|
||||
user.put("BZ", "");
|
||||
user.put("SKIN", "pcoded-navbar navbar-image-3,navbar pcoded-header navbar-expand-lg navbar-light header-dark,");
|
||||
user.put("EMAIL", "");
|
||||
user.put("NUMBER", "");
|
||||
user.put("PHONE", "");
|
||||
user.put("ROLE_IDS", "");
|
||||
user.put("DEPARTMENT_ID", departId);
|
||||
user.put("POST_ID", postId);
|
||||
user.put("ISMAIN", "0");
|
||||
user.put("FUN_IDS", "");
|
||||
user.put("RIGHTS", "788664966448");
|
||||
user.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
user.put("ISSTUDENT", "0");// 在线学习情况
|
||||
user.put("DURATION", "-1");// 工作状态持
|
||||
|
||||
if (userMap.containsKey(userName)) {
|
||||
PageData useredit = JSON.parseObject(userMap.get(userName), PageData.class);
|
||||
useredit.put("NAME", name);
|
||||
useredit.put("CARDNO", "");
|
||||
useredit.put("USER_ID_CARD", IDNumber);
|
||||
useredit.put("PERSONNEL_TYPE", renyuanleixing.get("DICTIONARIES_ID"));
|
||||
useredit.put("ROLE_ID", role.getString("ROLE_ID"));
|
||||
useredit.put("LAST_LOGIN", "");
|
||||
useredit.put("IP", "");
|
||||
useredit.put("STATUS", "0");
|
||||
useredit.put("BZ", "");
|
||||
useredit.put("SKIN", "pcoded-navbar navbar-image-3,navbar pcoded-header navbar-expand-lg navbar-light header-dark,");
|
||||
useredit.put("EMAIL", "");
|
||||
useredit.put("NUMBER", "");
|
||||
useredit.put("PHONE", "");
|
||||
useredit.put("ROLE_IDS", "");
|
||||
useredit.put("DEPARTMENT_ID", departId);
|
||||
useredit.put("POST_ID", postId);
|
||||
useredit.put("ISMAIN", "0");
|
||||
useredit.put("FUN_IDS", "");
|
||||
useredit.put("RIGHTS", "788664966448");
|
||||
useredit.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
useredit.put("ISSTUDENT", "0");// 在线学习情况
|
||||
useredit.put("DURATION", "-1");// 工作状态持
|
||||
editUserList.add(useredit);
|
||||
} else {
|
||||
addUserList.add(user);
|
||||
}
|
||||
}
|
||||
|
||||
if (Tools.isEmpty(errorStr.toString())) {
|
||||
for (PageData pageData : addUserList) {
|
||||
usersService.saveUser(pageData);
|
||||
}
|
||||
for (PageData pageData : editUserList) {
|
||||
// if (PLSUtil.editUser(pageData)) {
|
||||
usersService.editUser(pageData);
|
||||
// }
|
||||
}
|
||||
errorStr.append("成功导入" + addUserList.size() + "条数据!");
|
||||
errorStr.append("成功修改" + editUserList.size() + "条数据!");
|
||||
} else {
|
||||
errInfo = "error";
|
||||
}
|
||||
FileUtils.deleteQuietly(tempFile);//删除临时文件
|
||||
} else {
|
||||
map.put("result", "error"); //返回结果
|
||||
if(listPd.size() > 1000){
|
||||
map.put("msg", "Excel数据大于1000条不支持上传,请检查数据后,重新上传!");
|
||||
} else {
|
||||
map.put("msg", "Excel数据为空,请检查数据后,重新上传!");
|
||||
}
|
||||
FileUtils.deleteQuietly(tempFile);//删除临时文件
|
||||
return map;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
map.put("result", "fail"); //返回结果
|
||||
map.put("msg", e.toString());
|
||||
e.printStackTrace();
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
map.put("result", errInfo); //返回结果
|
||||
map.put("msg", errorStr.toString()); //返回结果
|
||||
map.put("isExcel", "1"); //返回类型
|
||||
map.put("resultStr", errorStr.toString());
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.zcloud.controller.taxationManage;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.excel.util.DateUtils;
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
|
|
@ -10,14 +11,20 @@ import com.zcloud.service.freighttrailer.FreightTrailerService;
|
|||
import com.zcloud.service.system.DictionariesService;
|
||||
import com.zcloud.service.taxationManage.TaxationManageService;
|
||||
import com.zcloud.util.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.util.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
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.*;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/taxationmanage")
|
||||
|
|
@ -26,42 +33,38 @@ public class TaxationManageController extends BaseController {
|
|||
@Autowired
|
||||
private TaxationManageService taxationManageService;
|
||||
|
||||
@Autowired
|
||||
private Smb smb;
|
||||
|
||||
@Autowired
|
||||
private AssignedManageService assignedManageService;
|
||||
|
||||
@Autowired
|
||||
private FreightTrailerService freightTrailerService;
|
||||
|
||||
/**新增
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/add")
|
||||
@RequestMapping(value = "/add")
|
||||
@ResponseBody
|
||||
public Object add() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object add() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("TAXATION_ID", this.get32UUID()); //车船税主键
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
if("".equals(pd.getString("EXPIRE_STATUS"))) {
|
||||
pd.put("TAXATION_ID", this.get32UUID()); //车船税主键
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("ARCHIVES_TYPE", "0"); //档案状态
|
||||
if ("".equals(pd.getString("EXPIRE_STATUS"))) {
|
||||
String expireDate = pd.getString("EXPIRE_DATE");
|
||||
String ReminderData = pd.getString("REMINDER_DATA");
|
||||
String day = DateUtil.getDay();
|
||||
boolean flag = DateUtil.compareDate(expireDate, day);
|
||||
if(flag) {
|
||||
pd.put("EXPIRE_STATUS","1");
|
||||
}else{
|
||||
pd.put("EXPIRE_STATUS","0");
|
||||
if (DateUtil.compareDate(expireDate, day) && DateUtil.compareDate(day, ReminderData)) {
|
||||
pd.put("EXPIRE_STATUS", "2");
|
||||
} else if (DateUtil.compareDate(expireDate, day)) {
|
||||
pd.put("EXPIRE_STATUS", "1");
|
||||
} else if (DateUtil.compareDate(day, expireDate)) {
|
||||
pd.put("EXPIRE_STATUS", "0");
|
||||
}
|
||||
}
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
|
|
@ -71,64 +74,70 @@ public class TaxationManageController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
|
||||
/**删除
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
@RequestMapping(value = "/delete")
|
||||
@ResponseBody
|
||||
public Object delete() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
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());
|
||||
pd.put("DELETORNAME", Jurisdiction.getUsername());
|
||||
pd.put("DELETORNAME", Jurisdiction.getName());
|
||||
pd.put("DELETTIME", DateUtil.date2Str(new Date()));
|
||||
taxationManageService.delete(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
/**修改
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/edit")
|
||||
@RequestMapping(value = "/edit")
|
||||
@ResponseBody
|
||||
public Object edit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object edit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getName()); // 修改人名字
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
String expireDate = pd.getString("EXPIRE_DATE");
|
||||
String ReminderData = pd.getString("REMINDER_DATA");
|
||||
String day = DateUtil.getDay();
|
||||
boolean flag = DateUtil.compareDate(expireDate, day);
|
||||
if(flag) {
|
||||
pd.put("EXPIRE_STATUS","未到期");
|
||||
}else{
|
||||
pd.put("EXPIRE_STATUS","已到期");
|
||||
if (DateUtil.compareDate(expireDate, day) && DateUtil.compareDate(day, ReminderData)) {
|
||||
pd.put("EXPIRE_STATUS", "2");
|
||||
} else if (DateUtil.compareDate(expireDate, day)) {
|
||||
pd.put("EXPIRE_STATUS", "1");
|
||||
} else if (DateUtil.compareDate(day, expireDate)) {
|
||||
pd.put("EXPIRE_STATUS", "0");
|
||||
}
|
||||
taxationManageService.edit(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
/**去修改页面获取数据
|
||||
|
||||
/**
|
||||
* 去修改页面获取数据
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/goEdit")
|
||||
@RequestMapping(value = "/goEdit")
|
||||
@ResponseBody
|
||||
public Object goEdit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object goEdit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
|
@ -138,28 +147,27 @@ public class TaxationManageController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value="/list")
|
||||
@RequestMapping(value = "/list")
|
||||
@ResponseBody
|
||||
public Object list(Page page) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object list(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
page.setPd(pd);
|
||||
List<PageData> taxationList = taxationManageService.list(page); //列出MajorDangerSource列表
|
||||
List<PageData> assignedList = assignedManageService.assignedList(Jurisdiction.getCORPINFO_ID());
|
||||
List<PageData> varList = new ArrayList<>();
|
||||
for (int i = 0; i < taxationList.size(); i++) {
|
||||
for (int j = 0; j < assignedList.size(); j++) {
|
||||
if(taxationList.get(i).get("PLATE_NUMBER").equals(assignedList.get(j).get("RAW_PLATE_NUMBER"))) {
|
||||
taxationList.get(i).put("RECORD_STATUS","过户");
|
||||
taxationList.get(i).put("ASSIGNEDSTATUS","1");
|
||||
}
|
||||
List<PageData> varList = taxationManageService.list(page); //列出MajorDangerSource列表
|
||||
|
||||
varList.stream().anyMatch(data -> {
|
||||
if ("1".equals(data.getString("ISSCRAP"))) {
|
||||
data.put("ARCHIVES_TYPE", "1");
|
||||
} else if ("1".equals(data.getString("ISASSIGNED"))) {
|
||||
data.put("ARCHIVES_TYPE", "2");
|
||||
}
|
||||
varList.add(taxationList.get(i));
|
||||
}
|
||||
return false;
|
||||
});
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
|
|
@ -187,16 +195,22 @@ public class TaxationManageController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = freightTrailerService.list(page); // 列出所有挂车列表
|
||||
List<PageData> taxationList = taxationManageService.list(page); // 列出车船税列表
|
||||
for (int i = 0; i < taxationList.size(); i++) {
|
||||
for (int j = 0; j < varList.size(); j++) {
|
||||
if (taxationList.get(i).get("PLATE_NUMBER").equals(varList.get(j).get("PLATE_NUMBER")) || varList.get(j).get("ISSCRAP").equals("1")) {
|
||||
varList.remove(j);
|
||||
}
|
||||
}
|
||||
List<PageData> freightTrailerList = freightTrailerService.list(page); // 列出所有挂车列表
|
||||
List<PageData> taxationList = taxationManageService.taxationList(pd.getString("CORPINFO_ID")); // 列出车船税列表
|
||||
|
||||
List<PageData> varList = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(taxationList)) {
|
||||
varList = freightTrailerList.stream().parallel()
|
||||
.filter(freight -> taxationList.stream()
|
||||
.noneMatch(taxation -> StringUtils.equals(freight.getString("PLATE_NUMBER"), taxation.getString("PLATE_NUMBER"))))
|
||||
.collect(Collectors.toList());
|
||||
} else {
|
||||
varList = freightTrailerList;
|
||||
}
|
||||
map.put("varList", varList);
|
||||
|
||||
// 过滤掉车船税下拉列表中已报废的车辆信息
|
||||
List<PageData> choiceTrailerList = varList.stream().filter(data -> !"1".equals(data.get("ISSCRAP"))).collect(Collectors.toList());
|
||||
map.put("varList", choiceTrailerList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
|
|
|
|||
|
|
@ -37,4 +37,6 @@ public interface AssignedManageMapper {
|
|||
List<PageData> operationvehicleList(String corpId);
|
||||
|
||||
List<PageData> assignedList(String corpId);
|
||||
|
||||
PageData findByRawVehicleId(PageData pd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
package com.zcloud.mapper.datasource.comprehensive;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface TrafficCommitentItemMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
}
|
||||
|
|
@ -45,4 +45,6 @@ public interface TrafficDrivingSignMapper {
|
|||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
List<PageData> findWaybillRegistrationId(PageData pd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,4 +19,6 @@ public interface TrafficSafetyOccupationalHazardsMapper {
|
|||
List<PageData> datalistPageUser(Page page);
|
||||
|
||||
void delete(PageData pd);
|
||||
|
||||
List<PageData> getSafetyOccupationalHazardsEdit(PageData pd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,4 +17,6 @@ public interface TrafficSafetyProductionMapper {
|
|||
PageData findById(PageData pd);
|
||||
|
||||
void delete(PageData pd);
|
||||
|
||||
List<PageData> getSafetyProductionEdit(PageData pd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,4 +19,6 @@ public interface TrafficSafetyResponsibilityMapper {
|
|||
List<PageData> datalistPageUser(Page page);
|
||||
|
||||
void delete(PageData pd);
|
||||
|
||||
List<PageData> safetyCommitmentById(PageData pd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,4 +19,6 @@ public interface TrafficSecurityCommitmentMapper {
|
|||
List<PageData> datalistPageUser(Page page);
|
||||
|
||||
void delete(PageData pd);
|
||||
|
||||
List<PageData> safetyCommitmentById(PageData pd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,25 @@ package com.zcloud.mapper.datasource.comprehensive;
|
|||
import com.zcloud.entity.PageData;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface TrafficSecurityCustomerContactMapper {
|
||||
void saveContact(PageData contactPd);
|
||||
|
||||
List<PageData> findByCustomerManagementId(PageData pd);
|
||||
|
||||
void edit(PageData pd);
|
||||
|
||||
void deleteContact(PageData pd2);
|
||||
|
||||
PageData findByContactName(PageData pd);
|
||||
|
||||
PageData findByContactId(String pd);
|
||||
|
||||
void deleteContactById(PageData pd);
|
||||
|
||||
void editContactPhone(PageData pd);
|
||||
|
||||
PageData findContactByContactId(PageData pd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,4 +25,12 @@ public interface TrafficSecurityCustomerManagementMapper {
|
|||
|
||||
void delete(PageData pd);
|
||||
|
||||
List<PageData> getTrafficCustomerSelectList(PageData pd);
|
||||
|
||||
List<PageData> getPrincipalContactList(PageData pd);
|
||||
|
||||
PageData getTrafficCustomerSelectView(PageData pd);
|
||||
|
||||
void edit(PageData pd);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,4 +23,12 @@ public interface TrafficSecurityLocationManagementMapper {
|
|||
List<PageData> datalistPage(Page page);
|
||||
|
||||
void delete(PageData pd);
|
||||
|
||||
List<PageData> getTrafficLocationSelectList(PageData pd);
|
||||
|
||||
PageData getTrafficLocationInfo(PageData pd);
|
||||
|
||||
void edit(PageData pd);
|
||||
|
||||
PageData selAddrIdByName(PageData pd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,4 +37,8 @@ public interface TrafficSecurityNoticeMapper {
|
|||
List<PageData> getAllNotifications(PageData pd);
|
||||
|
||||
int getRedPoint(PageData pd);
|
||||
|
||||
void edit(PageData pd);
|
||||
|
||||
void issueSecurityNotice(PageData pd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,4 +16,6 @@ public interface TrafficSecurityReadDetailMapper {
|
|||
void edit(PageData pd);
|
||||
|
||||
void delete(PageData pd);
|
||||
PageData listByUserIdOrNoticeId(PageData pd);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@ public interface TrafficSecurityWaybillRegistrationMapper {
|
|||
|
||||
void editStatus(PageData pd);
|
||||
|
||||
PageData forSecurityPerson(PageData pd);
|
||||
|
||||
void delete(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
|
|
@ -29,4 +27,8 @@ public interface TrafficSecurityWaybillRegistrationMapper {
|
|||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
void edit(PageData pd);
|
||||
|
||||
List<PageData> getWaybillRegistrationInfo(PageData pd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,5 +82,15 @@ public interface FreightTrailerMapper {
|
|||
void editScrapStatus(PageData pd);
|
||||
|
||||
PageData findByPlateNumber(PageData pd2);
|
||||
|
||||
PageData vehicle(PageData pd);
|
||||
|
||||
List<PageData> getPulldownVehicleList(String corpId);
|
||||
|
||||
void setAssinedStatus(PageData freightTrailer);
|
||||
|
||||
List<PageData> getScrapPulldownVehicleList(String corpId);
|
||||
|
||||
void editInspectTreight(PageData pd);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,4 +43,14 @@ public interface OperatingVehiclesMapper {
|
|||
void setScrapStatus(PageData pd);
|
||||
|
||||
List<PageData> listOut(PageData pd);
|
||||
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
List<PageData> getPulldownVehicleList(PageData pd);
|
||||
|
||||
void setAssinedStatus(PageData operating);
|
||||
|
||||
List<PageData> getScrapPulldownVehicleList(PageData pd);
|
||||
|
||||
void editInspectVehicleowner(PageData pd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,4 +34,6 @@ public interface ScrapManageMapper{
|
|||
List<PageData> datalistPage(Page page);
|
||||
|
||||
List<PageData> scrapListAll(String corpId);
|
||||
|
||||
PageData findByScrapVehicleId(PageData pd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,5 +94,8 @@ public interface UserInfoMapper{
|
|||
* @throws Exception
|
||||
*/
|
||||
void editUserInfo(PageData pd);
|
||||
|
||||
void delUserInfoPersonnelType(PageData pd);
|
||||
void addUserInfoPersonnelType(PageData pd);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -272,8 +272,6 @@ public interface UsersMapper {
|
|||
|
||||
List<PageData> studentlist(PageData pd);
|
||||
|
||||
List<PageData> userSelectPersonTypelistPage(PageData pd);
|
||||
|
||||
/**从业人员列表 //userlistPage(Page page)
|
||||
* @param page
|
||||
* @return
|
||||
|
|
@ -297,4 +295,8 @@ public interface UsersMapper {
|
|||
List<PageData> userSelectPersonTypelist(PageData pd);
|
||||
|
||||
PageData getUserByUserId(PageData pd);
|
||||
|
||||
List<PageData> getPractitionerSelectList(PageData pd);
|
||||
|
||||
List<PageData> listUserByIds(String[] personIds);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,4 +35,6 @@ public interface TaxationManageMapper {
|
|||
List<PageData> datalistPage(Page page);
|
||||
|
||||
List<PageData> taxationList(String corpId);
|
||||
|
||||
PageData findByTrailerId(PageData pd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,4 +37,6 @@ public interface AssignedManageService {
|
|||
List<PageData> operationVehicleList(String corpId);
|
||||
|
||||
List<PageData> assignedList(String corpId);
|
||||
|
||||
PageData findByRawVehicleId(PageData pd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,4 +53,9 @@ public class AssignedManageServiceImpl implements AssignedManageService {
|
|||
public List<PageData> assignedList(String corpId) {
|
||||
return assignedManageMapper.assignedList(corpId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData findByRawVehicleId(PageData pd) {
|
||||
return assignedManageMapper.findByRawVehicleId(pd);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
package com.zcloud.service.comprehensive;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TrafficCommitentItemService {
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd, MultipartFile[] files)throws Exception;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -31,4 +31,6 @@ public interface TrafficDrivingSignService {
|
|||
void delete(PageData pd);
|
||||
|
||||
PageData findById(PageData pd) throws Exception;
|
||||
|
||||
List<PageData> findWaybillRegistrationId(PageData pd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,4 +31,5 @@ public interface TrafficDrivingTypeService {
|
|||
void delete(PageData pd);
|
||||
|
||||
PageData findById(PageData pd) throws Exception;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,4 +17,6 @@ public interface TrafficSafetyOccupationalHazardsService {
|
|||
List<PageData> listForSafetyOccupationalHazardsUser(Page page);
|
||||
|
||||
void delete(PageData pd);
|
||||
|
||||
List<PageData> getSafetyOccupationalHazardsEdit(PageData pd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,4 +15,6 @@ public interface TrafficSafetyProductionService {
|
|||
PageData findById(PageData pd);
|
||||
|
||||
void delete(PageData pd);
|
||||
|
||||
List<PageData> getSafetyProductionEdit(PageData pd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,4 +17,6 @@ public interface TrafficSafetyResponsibilityService {
|
|||
List<PageData> listForSafetyResponsibilityUser(Page page);
|
||||
|
||||
void delete(PageData pd);
|
||||
|
||||
List<PageData> safetyCommitmentById(PageData pd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,4 +17,6 @@ public interface TrafficSecurityCommitmentService {
|
|||
List<PageData> listForSecurityCommitmentUser(Page page);
|
||||
|
||||
void delete(PageData pd);
|
||||
|
||||
List<PageData> safetyCommitmentById(PageData pd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,4 +13,28 @@ public interface TrafficSecurityCustomerManagementService {
|
|||
void saveContact(PageData contactPd);
|
||||
|
||||
void delete(PageData pd);
|
||||
|
||||
List<PageData> getTrafficCustomerSelectList(PageData pd) throws Exception;
|
||||
|
||||
List<PageData> getPrincipalContactList(PageData pd);
|
||||
|
||||
PageData getTrafficCustomerSelectView(PageData pd);
|
||||
|
||||
List<PageData> findByCustomerManagementId(PageData pageData);
|
||||
|
||||
void edit(PageData pd);
|
||||
|
||||
void editContactInfo(PageData contact);
|
||||
|
||||
void deleteContact(PageData pd2);
|
||||
|
||||
void editUserInfo(PageData pd);
|
||||
|
||||
PageData findByContactName(PageData pd2);
|
||||
|
||||
PageData findByContactId(String pd);
|
||||
|
||||
void deleteContactById(PageData pd);
|
||||
|
||||
PageData findContactByContactId(PageData pd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,4 +11,12 @@ public interface TrafficSecurityLocationManagementService {
|
|||
List<PageData> listForSecurityLocationManagement(Page page);
|
||||
|
||||
void delete(PageData pd);
|
||||
|
||||
List<PageData> getTrafficLocationSelectList(PageData pd) throws Exception;
|
||||
|
||||
PageData getTrafficLocationInfo(PageData pd);
|
||||
|
||||
void edit(PageData pd);
|
||||
|
||||
PageData selAddrIdByName(PageData addrName);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,4 +22,8 @@ public interface TrafficSecurityNoticeService {
|
|||
List<PageData> getAllNotifications(PageData pd);
|
||||
|
||||
public int getRedPoint(PageData pd) throws Exception;
|
||||
|
||||
public void edit(PageData pd);
|
||||
|
||||
public void issueSecurityNotice(PageData pd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,4 +15,7 @@ public interface TrafficSecurityReadDetailService {
|
|||
void edit(PageData pd);
|
||||
|
||||
void delete(PageData pd);
|
||||
|
||||
PageData listByUserIdOrNoticeId(PageData pd);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,9 +10,11 @@ public interface TrafficSecurityWaybillRegistrationService {
|
|||
|
||||
void save(PageData pd);
|
||||
|
||||
PageData forSecurityPerson(PageData pd);
|
||||
|
||||
void delete(PageData pd);
|
||||
|
||||
PageData findById(PageData pd);
|
||||
|
||||
void edit(PageData pd);
|
||||
|
||||
List<PageData> getWaybillRegistrationInfo(PageData pd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,72 @@
|
|||
package com.zcloud.service.comprehensive.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.comprehensive.TrafficCommitentItemMapper;
|
||||
import com.zcloud.mapper.datasource.comprehensive.TrafficDrivingItemMapper;
|
||||
import com.zcloud.mapper.datasource.comprehensive.TrafficDrivingSignMapper;
|
||||
import com.zcloud.service.comprehensive.TrafficCommitentItemService;
|
||||
import com.zcloud.service.comprehensive.TrafficDrivingItemService;
|
||||
import com.zcloud.util.Const;
|
||||
import com.zcloud.util.DateUtil;
|
||||
import com.zcloud.util.Smb;
|
||||
import com.zcloud.util.UuidUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class TrafficCommitentItemServiceImpl implements TrafficCommitentItemService {
|
||||
|
||||
@Autowired
|
||||
private TrafficCommitentItemMapper trafficCommitentItemMapper;
|
||||
|
||||
@Autowired
|
||||
private TrafficDrivingSignMapper trafficDrivingSignMapper;
|
||||
|
||||
@Autowired
|
||||
private com.zcloud.mapper.datasource.comprehensive.TrafficSecurityWaybillRegistrationMapper TrafficSecurityWaybillRegistrationMapper;
|
||||
|
||||
@Autowired
|
||||
private Smb smb;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd, MultipartFile[] files)throws Exception{
|
||||
List<String> filePaths = new ArrayList<>();
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
//保存签名文件
|
||||
String ffile = DateUtil.getDays();
|
||||
String fileName = UuidUtil.get32UUID() + files[i].getOriginalFilename().substring(files[i].getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(files[i], fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
filePaths.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||
}
|
||||
pd.put("SIGN_TIME", pd.getString("SIGNTIME"));
|
||||
pd.put("SIGN_PATH", String.join(",",filePaths));
|
||||
trafficDrivingSignMapper.save(pd);
|
||||
TrafficSecurityWaybillRegistrationMapper.editStatus(pd);
|
||||
if (pd.get("checklist") != null && !pd.get("checklist").equals("")) { //安全措施确认步骤
|
||||
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.get("checklist").toString());
|
||||
for (JSONObject json : list) {
|
||||
PageData checklist = new PageData();
|
||||
checklist.put("DRIVING_SIGN_ID",pd.get("DRIVING_SIGN_ID"));
|
||||
checklist.put("DRIVINGTYPE_ID",json.get("DRIVINGCOMMITMENT_ID"));
|
||||
checklist.put("REMARK", json.get("REMARK"));
|
||||
checklist.put("STATUS", json.get("ISNORMAL"));
|
||||
checklist.put("OPERATTIME", json.get("OPERATTIME"));
|
||||
checklist.put("OPERATORNAME", json.get("OPERATORNAME"));
|
||||
checklist.put("OPERATOR", json.get("OPERATOR"));
|
||||
checklist.put("ISDELETE", json.get("ISDELETE"));
|
||||
checklist.put("COMMITMENT_ITEM_ID", UuidUtil.get32UUID());
|
||||
trafficCommitentItemMapper.save(checklist);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -62,4 +62,9 @@ public class TrafficDrivingSignServiceImpl implements TrafficDrivingSignService
|
|||
public PageData findById(PageData pd) {
|
||||
return trafficDrivingSignMapper.findById(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> findWaybillRegistrationId(PageData pd) {
|
||||
return trafficDrivingSignMapper.findWaybillRegistrationId(pd);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.zcloud.entity.PageData;
|
|||
import com.zcloud.mapper.datasource.comprehensive.TrafficDrivingSignMapper;
|
||||
import com.zcloud.mapper.datasource.comprehensive.TrafficDrivingTypeMapper;
|
||||
import com.zcloud.service.comprehensive.TrafficDrivingTypeService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
|
@ -12,6 +13,8 @@ import java.util.ArrayList;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
@Service
|
||||
public class TrafficDrivingTypeServiceImpl implements TrafficDrivingTypeService {
|
||||
|
|
@ -62,6 +65,8 @@ public class TrafficDrivingTypeServiceImpl implements TrafficDrivingTypeService
|
|||
public PageData findById(PageData pd) {
|
||||
return trafficDrivingTypeMapper.findById(pd);
|
||||
}
|
||||
|
||||
|
||||
@Autowired
|
||||
private TrafficDrivingSignMapper trafficDrivingSignMapper;
|
||||
|
||||
|
|
@ -74,6 +79,7 @@ public class TrafficDrivingTypeServiceImpl implements TrafficDrivingTypeService
|
|||
PageData cpd = TrafficSecurityWaybillRegistrationMapper.findById(pd); // 根据ID读取
|
||||
List<PageData> varOList = trafficDrivingTypeMapper.findListbyDetail(pd);
|
||||
List<PageData> vList = trafficDrivingTypeMapper.findCategory(pd);
|
||||
|
||||
List<PageData> varItemList = trafficDrivingTypeMapper.findListbyItem(pd);
|
||||
|
||||
List<PageData> pd1Children = new ArrayList<>();
|
||||
|
|
@ -95,7 +101,10 @@ public class TrafficDrivingTypeServiceImpl implements TrafficDrivingTypeService
|
|||
pd1.put("pd1Children",pd1Children);
|
||||
}
|
||||
|
||||
cpd.put("varList", vList);
|
||||
List<PageData> list1 = vList.stream().parallel().filter(data -> !StringUtils.equals(data.getString("CHECKTYPE_ID"), "status000")).collect(Collectors.toList());
|
||||
List<PageData> list2 = vList.stream().parallel().filter(data -> StringUtils.equals(data.getString("CHECKTYPE_ID"), "status000")).collect(Collectors.toList());
|
||||
cpd.put("varList", list1);
|
||||
cpd.put("varList2", list2);
|
||||
return cpd;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,4 +43,9 @@ public class TrafficSafetyOccupationalHazardsServiceImpl implements TrafficSafet
|
|||
public void delete(PageData pd) {
|
||||
occupationalHazardsMapper.delete(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getSafetyOccupationalHazardsEdit(PageData pd) {
|
||||
return occupationalHazardsMapper.getSafetyOccupationalHazardsEdit(pd);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,4 +37,9 @@ public class TrafficSafetyProductionServiceImpl implements TrafficSafetyProducti
|
|||
public void delete(PageData pd) {
|
||||
speedProductionMapper.delete(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getSafetyProductionEdit(PageData pd) {
|
||||
return speedProductionMapper.getSafetyProductionEdit(pd);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,4 +43,9 @@ public class TrafficSafetyResponsibilityServiceImpl implements TrafficSafetyResp
|
|||
public void delete(PageData pd) {
|
||||
responseMapper.delete(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> safetyCommitmentById(PageData pd) {
|
||||
return responseMapper.safetyCommitmentById(pd);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,4 +43,9 @@ public class TrafficSecurityCommitmentServiceImpl implements TrafficSecurityComm
|
|||
public void delete(PageData pd) {
|
||||
securityCommitmentMapper.delete(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> safetyCommitmentById(PageData pd) {
|
||||
return securityCommitmentMapper.safetyCommitmentById(pd);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,4 +35,64 @@ public class TrafficSecurityCustomerManagementServiceImpl implements TrafficSecu
|
|||
public void delete(PageData pd) {
|
||||
customerManagementMapper.delete(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getTrafficCustomerSelectList(PageData pd) throws Exception {
|
||||
return customerManagementMapper.getTrafficCustomerSelectList(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getPrincipalContactList(PageData pd) {
|
||||
return customerManagementMapper.getPrincipalContactList(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData getTrafficCustomerSelectView(PageData pd) {
|
||||
return customerManagementMapper.getTrafficCustomerSelectView(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> findByCustomerManagementId(PageData pageData) {
|
||||
return customerContactMapper.findByCustomerManagementId(pageData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(PageData pd) {
|
||||
customerManagementMapper.edit(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void editContactInfo(PageData pd) {
|
||||
customerContactMapper.edit(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteContact(PageData pd2) {
|
||||
customerContactMapper.deleteContact(pd2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void editUserInfo(PageData pd) {
|
||||
customerContactMapper.edit(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData findByContactName(PageData pd) {
|
||||
return customerContactMapper.findByContactName(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData findByContactId(String pd) {
|
||||
return customerContactMapper.findByContactId(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteContactById(PageData pd) {
|
||||
customerContactMapper.deleteContactById(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData findContactByContactId(PageData pd) {
|
||||
return customerContactMapper.findContactByContactId(pd);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,4 +27,25 @@ public class TrafficSecurityLocationManagementServiceImpl implements TrafficSecu
|
|||
public void delete(PageData pd) {
|
||||
locationManagementMapper.delete(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getTrafficLocationSelectList(PageData pd) throws Exception {
|
||||
return locationManagementMapper.getTrafficLocationSelectList(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData getTrafficLocationInfo(PageData pd) {
|
||||
return locationManagementMapper.getTrafficLocationInfo(pd);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void edit(PageData pd) {
|
||||
locationManagementMapper.edit(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData selAddrIdByName(PageData pd) {
|
||||
return locationManagementMapper.selAddrIdByName(pd);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import java.util.List;
|
|||
public class TrafficSecurityManagementAgreementServiceImpl implements TrafficSecurityManagementAgreementService {
|
||||
@Autowired
|
||||
private TrafficSecurityManagementAgreementMapper managementAgreementMapper;
|
||||
|
||||
@Override
|
||||
public void save(PageData pd) {
|
||||
managementAgreementMapper.save(pd);
|
||||
|
|
|
|||
|
|
@ -49,4 +49,13 @@ public class TrafficSecurityNoticeServiceImpl implements TrafficSecurityNoticeSe
|
|||
return securityNoticeMapper.getRedPoint(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(PageData pd) {
|
||||
securityNoticeMapper.edit(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void issueSecurityNotice(PageData pd) {
|
||||
securityNoticeMapper.issueSecurityNotice(pd);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,4 +38,10 @@ public class TrafficSecurityReadDetailImpl implements TrafficSecurityReadDetailS
|
|||
public void delete(PageData pd) {
|
||||
securityReadDetailMapper.delete(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData listByUserIdOrNoticeId(PageData pd) {
|
||||
return securityReadDetailMapper.listByUserIdOrNoticeId(pd);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,11 +24,6 @@ public class TrafficSecurityWaybillRegistrationServiceImpl implements TrafficSec
|
|||
TrafficSecurityWaybillRegistrationMapper.save(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData forSecurityPerson(PageData pd) {
|
||||
return TrafficSecurityWaybillRegistrationMapper.forSecurityPerson(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(PageData pd) {
|
||||
TrafficSecurityWaybillRegistrationMapper.delete(pd);
|
||||
|
|
@ -37,4 +32,14 @@ public class TrafficSecurityWaybillRegistrationServiceImpl implements TrafficSec
|
|||
public PageData findById(PageData pd) {
|
||||
return TrafficSecurityWaybillRegistrationMapper.findById(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(PageData pd) {
|
||||
TrafficSecurityWaybillRegistrationMapper.edit(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getWaybillRegistrationInfo(PageData pd) {
|
||||
return TrafficSecurityWaybillRegistrationMapper.getWaybillRegistrationInfo(pd);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,5 +82,15 @@ public interface FreightTrailerService {
|
|||
void editScrapStatus(PageData pd);
|
||||
|
||||
PageData findByPlateNumber(PageData pd2);
|
||||
|
||||
PageData vehicle(PageData pd);
|
||||
|
||||
List<PageData> getPulldownVehicleList(String corpId);
|
||||
|
||||
void setAssinedStatus(PageData freightTrailer);
|
||||
|
||||
List<PageData> getScrapPulldownVehicleList(String corpId);
|
||||
|
||||
void editInspectTreight(PageData data);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -122,5 +122,30 @@ public class FreightTrailerServiceImpl implements FreightTrailerService {
|
|||
public PageData findByPlateNumber(PageData pd2) {
|
||||
return freightTrailerMapper.findByPlateNumber(pd2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData vehicle(PageData pd) {
|
||||
return freightTrailerMapper.vehicle(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getPulldownVehicleList(String corpId) {
|
||||
return freightTrailerMapper.getPulldownVehicleList(corpId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAssinedStatus(PageData freightTrailer) {
|
||||
freightTrailerMapper.setAssinedStatus(freightTrailer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getScrapPulldownVehicleList(String corpId) {
|
||||
return freightTrailerMapper.getScrapPulldownVehicleList(corpId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void editInspectTreight(PageData pd) {
|
||||
freightTrailerMapper.editInspectTreight(pd);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,4 +43,14 @@ public interface OperatingVehiclesService {
|
|||
void setScrapStatus(PageData pd);
|
||||
|
||||
List<PageData> listOut(PageData pd);
|
||||
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
List<PageData> getPulldownVehicleList(PageData pd);
|
||||
|
||||
void setAssinedStatus(PageData operating);
|
||||
|
||||
List<PageData> getScrapPulldownVehicleList(PageData pd);
|
||||
|
||||
void editInspectVehicleowner(PageData operation);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,4 +66,29 @@ public class OperatingVehiclesServiceImpl implements OperatingVehiclesService {
|
|||
public List<PageData> listOut(PageData pd) {
|
||||
return operatingVehiclesMapper.listOut(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listAll(PageData pd) {
|
||||
return operatingVehiclesMapper.listAll(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getPulldownVehicleList(PageData pd) {
|
||||
return operatingVehiclesMapper.getPulldownVehicleList(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAssinedStatus(PageData operating) {
|
||||
operatingVehiclesMapper.setAssinedStatus(operating);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getScrapPulldownVehicleList(PageData pd) {
|
||||
return operatingVehiclesMapper.getScrapPulldownVehicleList(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void editInspectVehicleowner(PageData pd) {
|
||||
operatingVehiclesMapper.editInspectVehicleowner(pd);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,4 +34,6 @@ public interface ScrapManageService {
|
|||
public List<PageData> list(Page page);
|
||||
|
||||
List<PageData> scrapListAll(String corpId);
|
||||
|
||||
PageData findByScrapVehicleId(PageData pd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,4 +48,9 @@ public class ScrapManageServiceImpl implements ScrapManageService {
|
|||
public List<PageData> scrapListAll(String corpId) {
|
||||
return scrapManageMapper.scrapListAll(corpId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData findByScrapVehicleId(PageData pd) {
|
||||
return scrapManageMapper.findByScrapVehicleId(pd);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,6 +83,10 @@ public interface UserInfoService{
|
|||
void editAuthentication(PageData pd) throws Exception;
|
||||
|
||||
void editUserInfo(PageData user) throws Exception;
|
||||
|
||||
public void delUserInfoPersonnelType(PageData pd)throws Exception;
|
||||
|
||||
public void addUserInfoPersonnelType(PageData pd)throws Exception;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -318,7 +318,6 @@ public interface UsersService {
|
|||
|
||||
void setState(PageData request) throws Exception;
|
||||
|
||||
List<PageData> userSelectPersonTypelistPage(PageData pageData);
|
||||
|
||||
List<PageData> studentlist(PageData pd) throws Exception;
|
||||
|
||||
|
|
@ -370,4 +369,8 @@ public interface UsersService {
|
|||
List<PageData> userSelectPersonTypelist(PageData pd);
|
||||
|
||||
PageData getUserByUserId(PageData pd);
|
||||
|
||||
List<PageData> getPractitionerSelectList(PageData pd) throws Exception;
|
||||
|
||||
List<PageData> listUserByIds(String[] personIds);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,5 +149,13 @@ public class UserInfoServiceImpl implements UserInfoService {
|
|||
public void editUserInfo(PageData pd) throws Exception {
|
||||
userinfoMapper.editUserInfo(pd);
|
||||
}
|
||||
|
||||
public void delUserInfoPersonnelType(PageData pd)throws Exception{
|
||||
userinfoMapper.delUserInfoPersonnelType(pd);
|
||||
}
|
||||
|
||||
public void addUserInfoPersonnelType(PageData pd)throws Exception{
|
||||
userinfoMapper.addUserInfoPersonnelType(pd);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue