forked from integrated_whb/integrated_whb
BUG优化
parent
17e9aa562d
commit
8a5e062d2c
|
@ -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;
|
||||
|
@ -168,7 +171,7 @@ public class FreighttTrailerController extends BaseController {
|
|||
}
|
||||
PageData trailerInfo = taxationManageService.findByTrailerId(pd);
|
||||
if(!Tools.isEmpty(trailerInfo)) {
|
||||
trailerInfo.put("PLATE_NUMBER",pd.getString("PLATE_NUMBER"));
|
||||
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"));
|
||||
|
@ -176,22 +179,29 @@ public class FreighttTrailerController extends BaseController {
|
|||
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("VEHICLE_BRAND", pd.getString("TRAILER_BRAND"));
|
||||
trailerAssignedInfo.put("VEHICLE_MODEL", pd.getString("TRAILER_MODEL"));
|
||||
trailerAssignedInfo.put("PLATE_NUMBER", pd.getString("PLATE_NUMBER"));
|
||||
trailerAssignedInfo.put("RAW_OWNERS", pd.getString("CAR_OWNERS"));
|
||||
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);
|
||||
map.put("result", errInfo);
|
||||
|
@ -567,6 +577,7 @@ public class FreighttTrailerController extends BaseController {
|
|||
page.setPd(pd);
|
||||
List<PageData> insAnnually = inspectAnnuallyService.annuallyList(page);
|
||||
|
||||
|
||||
// 获取所有的营运车辆
|
||||
List<PageData> operatings = insAnnually.stream().filter(data -> StringUtils.equals("1",data.getString("VEHICLE_MODEL")))
|
||||
.collect(Collectors.toList());
|
||||
|
@ -580,13 +591,7 @@ public class FreighttTrailerController extends BaseController {
|
|||
}else{
|
||||
varList = operatingList;
|
||||
}
|
||||
/*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")){
|
||||
pd.put("OPERATING_ID", pd.getString("ID"));
|
||||
pd.put("FOREIGN_KEY", pd.getString("OPERATING_ID"));
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.zcloud.controller.inspectAnnually;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
@ -22,6 +23,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* 年检管理
|
||||
|
@ -160,21 +162,20 @@ public class InspectAnnuallyController extends BaseController {
|
|||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
page.setPd(pd);
|
||||
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.stream().anyMatch(InspectAnnuallyController::vehicleType);
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
private static boolean vehicleType (PageData 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 去修改页面获取数据
|
||||
|
@ -192,20 +193,19 @@ public class InspectAnnuallyController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd = inspectAnnuallyService.findById(pd); //根据ID读取
|
||||
|
||||
PageData vehicle = new PageData();
|
||||
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);
|
||||
pd.put("VEHICLE_BRAND", pageData.get("VEHICLE_BRAND"));
|
||||
vehicle.put("OPERATING_ID", pd.get("VEHICLE"));
|
||||
vehicle.put("CORPINFO_ID", pd.get("CORPINFO_ID"));
|
||||
PageData pageData = operatingVehiclesService.findById(vehicle);
|
||||
BeanUtil.copyProperties(pageData,pd);
|
||||
/*pd.put("VEHICLE_BRAND", pageData.get("VEHICLE_BRAND"));*/
|
||||
pd.put("VEHICLE_TYPE", pageData.get("VEHICLE_MODEL"));
|
||||
pd.put("PLATE_NUMBER", pageData.get("PLATE_NUMBER"));
|
||||
/*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);
|
||||
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"));
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.zcloud.controller.insure;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
@ -20,6 +21,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* 保险管理
|
||||
|
@ -64,6 +66,7 @@ public class InsureController extends BaseController {
|
|||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -224,6 +227,7 @@ public class InsureController extends BaseController {
|
|||
|
||||
// 过滤掉保险列表中所有的营运车辆
|
||||
List<PageData> varList = new ArrayList<>();
|
||||
|
||||
if (!CollectionUtils.isEmpty(insures)) {
|
||||
varList = operatingList.stream().parallel()
|
||||
.filter(operating -> insures.stream()
|
||||
|
|
|
@ -223,6 +223,7 @@ public class MaintenanceController extends BaseController {
|
|||
} else {
|
||||
varList = operatingList;
|
||||
}
|
||||
|
||||
if (pd.containsKey("ID")) {
|
||||
pd.put("OPERATING_ID", pd.getString("ID"));
|
||||
pd.put("FOREIGN_KEY", pd.getString("OPERATING_ID"));
|
||||
|
|
|
@ -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;
|
||||
|
@ -12,9 +13,11 @@ import com.zcloud.service.system.ImgFilesService;
|
|||
import com.zcloud.util.*;
|
||||
import net.sf.json.JSONArray;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
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;
|
||||
|
@ -32,9 +35,6 @@ public class OperatingVehiclesController extends BaseController {
|
|||
@Autowired
|
||||
private OperatingVehiclesService operatingVehiclesService;
|
||||
|
||||
@Autowired
|
||||
private Smb smb;
|
||||
|
||||
@Autowired
|
||||
private ImgFilesService imgfilesService;
|
||||
|
||||
|
@ -47,22 +47,24 @@ public class OperatingVehiclesController extends BaseController {
|
|||
@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.getName()); //添加人名字
|
||||
pd.put("CREATTIME", 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,38 +74,34 @@ 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.getName());
|
||||
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("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);
|
||||
|
@ -112,18 +110,20 @@ public class OperatingVehiclesController extends BaseController {
|
|||
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();
|
||||
|
@ -133,35 +133,40 @@ public class OperatingVehiclesController extends BaseController {
|
|||
operatingVehiclesService.edit(pd);
|
||||
PageData pageData = new PageData();
|
||||
pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pageData.put("ID",pd.getString("OPERATING_ID"));
|
||||
pageData.put("ID", pd.getString("OPERATING_ID"));
|
||||
PageData vehicleAssignedInfo = assignedManageService.findByRawVehicleId(pageData);
|
||||
if (!Tools.isEmpty(vehicleAssignedInfo)) {
|
||||
vehicleAssignedInfo.put("FRAMES_NUMBER", pd.getString("FRAMES_NUMBER"));
|
||||
vehicleAssignedInfo.put("VEHICLE_BRAND", pd.getString("VEHICLE_BRAND"));
|
||||
vehicleAssignedInfo.put("VEHICLE_MODEL", pd.getString("VEHICLE_MODEL"));
|
||||
vehicleAssignedInfo.put("ENGINE_NUMBER", pd.getString("ENGINE_NUMBER"));
|
||||
BeanUtil.copyProperties(pd, vehicleAssignedInfo);
|
||||
vehicleAssignedInfo.put("POWER_TYPE", pd.getString("FUEL_TYPE"));
|
||||
vehicleAssignedInfo.put("EMISSION_STANDARD", pd.getString("EMISSION_STANDARD"));
|
||||
vehicleAssignedInfo.put("PLATE_NUMBER", pd.getString("PLATE_NUMBER"));
|
||||
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();
|
||||
|
@ -169,11 +174,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",122);
|
||||
pd.put("TYPE", 122);
|
||||
List<PageData> operatingcertificatephoto = imgfilesService.listAll(pd);//运营证照片
|
||||
|
||||
List<PageData> zdepartmentPdList = new ArrayList<PageData>();
|
||||
|
@ -231,18 +236,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",121);
|
||||
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);
|
||||
|
@ -257,11 +262,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);
|
||||
|
@ -280,10 +285,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();
|
||||
|
@ -296,44 +301,43 @@ 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("车牌号"); //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
|
||||
|
@ -353,7 +357,7 @@ public class OperatingVehiclesController extends BaseController {
|
|||
}
|
||||
dataMap.put("varList", varList);
|
||||
ObjectExcelView erv = new ObjectExcelView();
|
||||
mv = new ModelAndView(erv,dataMap);
|
||||
mv = new ModelAndView(erv, dataMap);
|
||||
return mv;
|
||||
}
|
||||
|
||||
|
@ -361,7 +365,7 @@ public class OperatingVehiclesController extends BaseController {
|
|||
@SuppressWarnings("unchecked")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
@LogAnno(menuType= "双重预防",menuServer= "风险管控",instructionsOperate = "风险点(单元)",instructionsType = "上传附件")
|
||||
@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";
|
||||
|
@ -421,7 +425,7 @@ public class OperatingVehiclesController extends BaseController {
|
|||
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"));
|
||||
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>");
|
||||
|
@ -491,7 +495,7 @@ public class OperatingVehiclesController extends BaseController {
|
|||
}
|
||||
map.put("result", "success");//返回结果
|
||||
map.put("resultType", errInfo);//返回message类型
|
||||
map.put("isExcel","1");//返回类型
|
||||
map.put("isExcel", "1");//返回类型
|
||||
map.put("resultStr", errorStr.toString());
|
||||
return map;
|
||||
}
|
||||
|
|
|
@ -134,7 +134,6 @@ public class SafetyInvestmentUseController extends BaseController {
|
|||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
List<PageData> varList = safetyinvestmentuseService.listAll(pd); //列出SafetyInvestmentUse列表
|
||||
|
||||
|
||||
// 计算预提额合计
|
||||
Double drawingsTotal = varList.stream().
|
||||
filter(data -> StringUtils.equals(data.getString("USE_TYPE"), "1"))
|
||||
|
|
|
@ -84,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"));
|
||||
|
|
|
@ -34,4 +34,6 @@ public interface ScrapManageMapper{
|
|||
List<PageData> datalistPage(Page page);
|
||||
|
||||
List<PageData> scrapListAll(String corpId);
|
||||
|
||||
PageData findByScrapVehicleId(PageData 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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -198,7 +198,7 @@
|
|||
INNER JOIN v_traffic v1 on f.VEHICLE=v1.ID
|
||||
LEFT JOIN bus_traffic_operatingvehicle bto on bto.OPERATING_ID = f.VEHICLE
|
||||
LEFT JOIN bus_traffic_mechanical_freighttrailer btmf on btmf.FREIGHTTRAILER_ID = f.VEHICLE
|
||||
where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID} AND (bto.ISSCRAP = '0' OR btmf.ISSCRAP = '0')
|
||||
where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
<if test="pd.BASICINFO_LICENSE_PLATE != null and pd.BASICINFO_LICENSE_PLATE != ''">
|
||||
and f.BASICINFO_LICENSE_PLATE LIKE CONCAT(CONCAT('%', #{pd.BASICINFO_LICENSE_PLATE}),'%')
|
||||
</if>
|
||||
|
|
|
@ -184,7 +184,7 @@
|
|||
OPERATTIME = #{OPERATTIME},
|
||||
DELETOR = #{DELETOR},
|
||||
DELETORNAME = #{DELETORNAME},
|
||||
DELETTIME =#{DELETTIME}
|
||||
DELETTIME =#{DELETTIME},
|
||||
SCRAPFLAG =#{SCRAPFLAG}
|
||||
where
|
||||
SCRAP_ID = #{SCRAP_ID}
|
||||
|
@ -413,5 +413,14 @@
|
|||
where f.SCRAP_ID = '0'
|
||||
</select>
|
||||
|
||||
<select id="findByScrapVehicleId" parameterType="pd" resultType="pd">
|
||||
select
|
||||
*
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0' AND f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
AND f.SCRAP_VEHICLE = #{ID}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue