main
parent
b64db7a3c3
commit
4015a97bfb
@ -0,0 +1,15 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2022-07-28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/basicinfoTable")
|
||||
public class BasicinfoTableController {
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
import com.cxds.imageaudit.mapper.CardtpTextMapper;
|
||||
import com.cxds.imageaudit.pojo.entity.CardtpText;
|
||||
import com.cxds.imageaudit.resultR.R;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2022-07-13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/cardtpType")
|
||||
public class CardtpTextController {
|
||||
@Autowired
|
||||
private CardtpTextMapper cardtpTextMapper;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/07/07 09:30
|
||||
* @方法 cardtpTypeAll
|
||||
* @作用 查询卡全部类型
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/cardtpTypeAll")
|
||||
public R<List<CardtpText>> classNoTypeAll(){
|
||||
List<CardtpText> cardtpType = cardtpTextMapper.selectList(null);
|
||||
return R.SUCCESS(cardtpType);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
import com.cxds.imageaudit.mapper.ClassnoTextMapper;
|
||||
import com.cxds.imageaudit.pojo.entity.ClassnoText;
|
||||
import com.cxds.imageaudit.resultR.R;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2022-07-13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/classnoType")
|
||||
public class ClassnoTextController {
|
||||
|
||||
@Autowired
|
||||
private ClassnoTextMapper classnoTextMapper;
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/07/16 15:44
|
||||
* @方法 classNoTypeAll
|
||||
* @作用 查询收费班次全部类型
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/classnoTypeAll")
|
||||
public R<List<ClassnoText>> classNoTypeAll(){
|
||||
List<ClassnoText> classnoType = classnoTextMapper.selectList(null);
|
||||
//System.out.println("陈旭东:"+classnoType);
|
||||
return R.SUCCESS(classnoType);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,684 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cxds.imageaudit.mywebservices.CommonService;
|
||||
import com.cxds.imageaudit.mywebservices.CommonServiceSoap;
|
||||
import com.cxds.imageaudit.pojo.vo.*;
|
||||
import com.cxds.imageaudit.resultR.R;
|
||||
import com.cxds.imageaudit.utils.CommonUtils;
|
||||
import com.cxds.imageaudit.utils.ImageUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2023-01-31
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/common")
|
||||
public class CommonController {
|
||||
|
||||
@Autowired
|
||||
private ImageUtils imageUtils;
|
||||
|
||||
@Autowired
|
||||
private CommonUtils commonUtils;
|
||||
|
||||
@Value("${DBType}")
|
||||
public String dbType;
|
||||
|
||||
@Value("${RoadNO}")
|
||||
public String roadNO;
|
||||
|
||||
@Value("${UserStaNO}")
|
||||
public String userStaNO;
|
||||
|
||||
/**
|
||||
* @Author chenxudong
|
||||
* @Date 2022/08/31 14:57
|
||||
* @方法 gantryPassInport
|
||||
* @作用 根据passId获取详细信息
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getGantryPassInPortDataFromPassId")
|
||||
public R<GantryPassInPortJsonResultVO> getGantryPassInPortDataFromPassId(@RequestParam("columns") String columns,
|
||||
@RequestParam("passId") String passId,
|
||||
@RequestParam("listType") String listType
|
||||
){
|
||||
Map<String, Object> paramsMap = new HashMap<>();
|
||||
paramsMap.put("columns",columns);
|
||||
paramsMap.put("sqlWhere"," passId " + "= " + "'" + passId + "'");
|
||||
paramsMap.put("listType",listType);
|
||||
String gantryPassInportByPassIdBefore = imageUtils.toWebService("11", paramsMap);
|
||||
String gantryPassInportByPassId = gantryPassInportByPassIdBefore.replace("\"{","{").replace("}\"","}").replace("\\", "");
|
||||
GantryPassInPortJsonResultJavaNullVO gantryPassInPortJsonResultJavaNullTestVO = JSONObject.parseObject(gantryPassInportByPassId, GantryPassInPortJsonResultJavaNullVO.class);
|
||||
Object resultDataTest = gantryPassInPortJsonResultJavaNullTestVO.getResultData();
|
||||
GantryPassInPortJsonResultNullVO gantryPassInPortJsonResultNullTestVO = JSONObject.parseObject(resultDataTest.toString(), GantryPassInPortJsonResultNullVO.class);
|
||||
String code = gantryPassInPortJsonResultNullTestVO.getCode();
|
||||
if("1".equals(code)){
|
||||
//转化请求的 json 数据
|
||||
GantryPassInPortJsonResultJavaVO gantryPassInPortJsonResultJavaVO = JSONObject.parseObject(gantryPassInportByPassId, GantryPassInPortJsonResultJavaVO.class);
|
||||
GantryPassInPortJsonResultVO resultData = gantryPassInPortJsonResultJavaVO.getResultData();
|
||||
resultData.setTipMessage("获取到的数据不为空");
|
||||
List<GantryPassInPort> msg = resultData.getMsg();
|
||||
for(GantryPassInPort gantryPassInPort : msg){
|
||||
Long roadno = gantryPassInPort.getROADNO();
|
||||
if(roadno != null){
|
||||
String roadName = commonUtils.getRoadName(roadno);
|
||||
gantryPassInPort.setRoadName(roadName);
|
||||
}
|
||||
Long stano = gantryPassInPort.getSTANO();
|
||||
if(stano != null){
|
||||
String staName = commonUtils.getStaName(stano);
|
||||
gantryPassInPort.setStaName(staName);
|
||||
}
|
||||
Long kind = gantryPassInPort.getKIND();
|
||||
if(kind != null){
|
||||
String kindText = commonUtils.getKindText(kind);
|
||||
gantryPassInPort.setKindText(kindText);
|
||||
}
|
||||
Long type = gantryPassInPort.getTYPE();
|
||||
if(type != null){
|
||||
String typeText = commonUtils.getTypeText(type);
|
||||
gantryPassInPort.setTypeText(typeText);
|
||||
}
|
||||
Long flag = gantryPassInPort.getFLAG();
|
||||
if(flag != null){
|
||||
List<String> flagText = commonUtils.getFlagText(flag);
|
||||
gantryPassInPort.setFlagText(flagText);
|
||||
}
|
||||
Long classno = gantryPassInPort.getCLASSNO();
|
||||
if(classno != null){
|
||||
String classNOText = commonUtils.getClassNOText(classno);
|
||||
gantryPassInPort.setClassNOText(classNOText);
|
||||
}
|
||||
}
|
||||
return R.SUCCESS(resultData);
|
||||
}else{
|
||||
GantryPassInPortJsonResultVO gantryPassInPortJsonResultVO = new GantryPassInPortJsonResultVO();
|
||||
gantryPassInPortJsonResultVO.setCode(code);
|
||||
gantryPassInPortJsonResultVO.setTipMessage(gantryPassInPortJsonResultNullTestVO.getMsg().toString());
|
||||
gantryPassInPortJsonResultVO.setReturntime(gantryPassInPortJsonResultNullTestVO.getReturntime());
|
||||
gantryPassInPortJsonResultVO.setRespMsgSource(gantryPassInPortJsonResultNullTestVO.getRespMsgSource());
|
||||
return R.SUCCESS(gantryPassInPortJsonResultVO);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2023/01/31 15:40
|
||||
* @方法 getImgByListNO2
|
||||
* @作用 查询图像字节码
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/init")
|
||||
public R<InitVO> getInitMessage(){
|
||||
|
||||
InitVO initVO = new InitVO();
|
||||
initVO.setDBType(dbType);
|
||||
initVO.setRoadNO(roadNO);
|
||||
initVO.setUserStaNO(userStaNO);
|
||||
return R.SUCCESS(initVO);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author chenxudong
|
||||
* @Date 2022/08/31 14:57
|
||||
* @方法 gantryPassInport
|
||||
* @作用 根据passId获取详细信息
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getGantryPassOtherGantryPassDataFromPassId")
|
||||
public R<GantryPassOtherGantryPassJsonResultVO> getGantryPassOtherGantryPassDataFromPassId(@RequestParam("columns") String columns,
|
||||
@RequestParam("passId") String passId,
|
||||
@RequestParam("listType") String listType
|
||||
) {
|
||||
Map<String, Object> paramsMap = new HashMap<>();
|
||||
String columnsOK = "TRADEID,GANTRYID,TRANSTIME,PAYFEE,FEE,DISCOUNTFEE,TRANSFEE,FEESUMLOCALAFTER,OBUPAYFEESUMAFTER,MEDIATYPE,VEHICLEPLATE,VEHICLETYPE,IDENTIFYVEHICLETYPE," +
|
||||
"VEHICLECLASS,TAC,TRANSTYPE,PASSSTATE,ENTOLLLANEID,ENTOLLSTATIONHEX,ENTIME,ENLANETYPE,PASSID,ROADNO,STANO,OBUVEHICLEPLATE," +
|
||||
"OBUVEHICLETYPE,CPUVEHICLEPLATE,CPUVEHICLETYPE," +
|
||||
"(select VEHICLEPICID from (select VEHICLEPICID from GANTRY_MATCH_TABLE where TRADEID=t.TRADEID and SHOOTPOS in(1,2) order by SHOOTPOS) where rownum=1) VEHICLEPICID,AXLECOUNT," +
|
||||
"TOLLINTERVALID,PAYFEEGROUP,FEEGROUP,DISCOUNTFEEGROUP,SPECIALTYPE,TRADERESULT,FEECALCRESULT," +
|
||||
"(SELECT ROADNAME FROM ROAD_TABLE WHERE ROADNO = t.ROADNO) ROADNAME," +
|
||||
"(SELECT STANAME FROM NAME_TABLE WHERE ROADNO = t.ROADNO AND STANO = t.STANO) STANAME," +
|
||||
"(SELECT NAME FROM BASICINFO_TABLE WHERE HEX=t.ENTOLLSTATIONHEX) ENTOLLSTATIONNAME," +
|
||||
"(SELECT TEXT FROM mediatype_text WHERE VALUE=t.MEDIATYPE) MEDIATYPETEXT," +
|
||||
"(SELECT TEXT FROM TYPE_TEXT WHERE VALUE=t.VEHICLETYPE) VEHICLETYPETEXT," +
|
||||
"(SELECT TEXT FROM TYPE_TEXT WHERE VALUE=t.IDENTIFYVEHICLETYPE) IDENTIFYVEHICLETYPETEXT," +
|
||||
"(SELECT TEXT FROM VEHICLECLASS_TEXT WHERE VALUE=t.VEHICLECLASS) VEHICLECLASSTEXT," +
|
||||
"(SELECT TEXT FROM TYPE_TEXT WHERE VALUE=t.OBUVEHICLETYPE) OBUVEHICLETYPETEXT," +
|
||||
"(SELECT TEXT FROM TYPE_TEXT WHERE VALUE=t.CPUVEHICLETYPE) CPUVEHICLETYPETEXT," +
|
||||
"(SELECT NAME FROM gantry_table WHERE ID=t.GANTRYID) GANTRYNAME";
|
||||
paramsMap.put("columns",columnsOK);
|
||||
paramsMap.put("sqlWhere"," passId " + "= " + "'" + passId + "'");
|
||||
paramsMap.put("listType",listType);
|
||||
|
||||
String gantryPassOtherGantryPassByPassIdBefore = imageUtils.toWebService("11", paramsMap);
|
||||
String gantryPassOtherGantryPassByPassId = gantryPassOtherGantryPassByPassIdBefore.replace("\"{","{").replace("}\"","}").replace("\\", "");
|
||||
GantryPassOtherGantryPassJsonResultJavaNullVO gantryPassOtherGantryPassJsonResultJavaNullTestVO = JSONObject.parseObject(gantryPassOtherGantryPassByPassId, GantryPassOtherGantryPassJsonResultJavaNullVO.class);
|
||||
Object resultDataTest = gantryPassOtherGantryPassJsonResultJavaNullTestVO.getResultData();
|
||||
GantryPassOtherGantryPassJsonResultNullVO gantryPassOtherGantryPassJsonResultNullTestVO = JSONObject.parseObject(resultDataTest.toString(), GantryPassOtherGantryPassJsonResultNullVO.class);
|
||||
String code = gantryPassOtherGantryPassJsonResultNullTestVO.getCode();
|
||||
if("1".equals(code)){
|
||||
//转化请求的 json 数据
|
||||
GantryPassOtherGantryPassJsonResultJavaVO gantryPassOtherGantryPassJsonResultJavaVO = JSONObject.parseObject(gantryPassOtherGantryPassByPassId, GantryPassOtherGantryPassJsonResultJavaVO.class);
|
||||
GantryPassOtherGantryPassJsonResultVO resultData = gantryPassOtherGantryPassJsonResultJavaVO.getResultData();
|
||||
resultData.setTipMessage("获取到的数据不为空");
|
||||
List<GantryPassOtherGantryPass> msg = resultData.getMsg();
|
||||
for(GantryPassOtherGantryPass gantryPassOtherGantryPass : msg){
|
||||
Long payfee = gantryPassOtherGantryPass.getPAYFEE();
|
||||
if(payfee != null){
|
||||
String payfeeT = String.format("%.2f", (payfee.doubleValue() / 100));
|
||||
gantryPassOtherGantryPass.setPAYFEET(payfeeT);
|
||||
}
|
||||
Long fee = gantryPassOtherGantryPass.getFEE();
|
||||
if(fee != null){
|
||||
String feeT = String.format("%.2f", (fee.doubleValue() / 100));
|
||||
gantryPassOtherGantryPass.setFEET(feeT);
|
||||
}
|
||||
Long discountfee = gantryPassOtherGantryPass.getDISCOUNTFEE();
|
||||
if(discountfee != null){
|
||||
String discountfeeT = String.format("%.2f", (discountfee.doubleValue() / 100));
|
||||
gantryPassOtherGantryPass.setDISCOUNTFEET(discountfeeT);
|
||||
}
|
||||
Long transfee = gantryPassOtherGantryPass.getTRANSFEE();
|
||||
if(transfee != null){
|
||||
String transfeeT = String.format("%.2f", (transfee.doubleValue() / 100));
|
||||
gantryPassOtherGantryPass.setTRANSFEET(transfeeT);
|
||||
}
|
||||
//vehiclePlate
|
||||
String vehiclePlate = gantryPassOtherGantryPass.getVEHICLEPLATE();
|
||||
String[] vehiclePlateSplits = vehiclePlate.split("_");
|
||||
if(vehiclePlateSplits.length == 2){
|
||||
String plateColor = commonUtils.getPlateColor(vehiclePlateSplits[1]);
|
||||
gantryPassOtherGantryPass.setVEHICLEPLATE(vehiclePlateSplits[0] + "_" + plateColor);
|
||||
}
|
||||
//CPUVehiclePlate
|
||||
String cpuVehiclePlate = gantryPassOtherGantryPass.getCPUVEHICLEPLATE();
|
||||
String[] cpuVehiclePlateSplits = cpuVehiclePlate.split("_");
|
||||
if(cpuVehiclePlateSplits.length == 2){
|
||||
String cpuPlateColor = commonUtils.getPlateColor(cpuVehiclePlateSplits[1]);
|
||||
gantryPassOtherGantryPass.setCPUVEHICLEPLATE(cpuVehiclePlateSplits[0] + "_" + cpuPlateColor);
|
||||
}
|
||||
//OBUVehiclePlate
|
||||
String obuVehiclePlate = gantryPassOtherGantryPass.getOBUVEHICLEPLATE();
|
||||
String[] obuVehiclePlateSplits = obuVehiclePlate.split("_");
|
||||
if(obuVehiclePlateSplits.length == 2){
|
||||
String obuPlateColor = commonUtils.getPlateColor(obuVehiclePlateSplits[1]);
|
||||
gantryPassOtherGantryPass.setOBUVEHICLEPLATE(obuVehiclePlateSplits[0] + "_" + obuPlateColor);
|
||||
}
|
||||
String gantryid = gantryPassOtherGantryPass.getGANTRYID();
|
||||
if(gantryid != null){
|
||||
String gantryName = commonUtils.getGantryName(gantryid);
|
||||
gantryPassOtherGantryPass.setGantryName(gantryName);
|
||||
}
|
||||
Long roadno = gantryPassOtherGantryPass.getROADNO();
|
||||
if(roadno != null){
|
||||
String roadName = commonUtils.getRoadName(roadno);
|
||||
gantryPassOtherGantryPass.setRoadName(roadName);
|
||||
}
|
||||
Long stano = gantryPassOtherGantryPass.getSTANO();
|
||||
if(stano != null){
|
||||
String staName = commonUtils.getStaName(stano);
|
||||
gantryPassOtherGantryPass.setStaName(staName);
|
||||
}
|
||||
Long mediatype = gantryPassOtherGantryPass.getMEDIATYPE();
|
||||
if(mediatype != null){
|
||||
String mediaTypeText = commonUtils.getMediaTypeText(mediatype);
|
||||
gantryPassOtherGantryPass.setMediaTypeText(mediaTypeText);
|
||||
}
|
||||
Long vehicletype = gantryPassOtherGantryPass.getVEHICLETYPE();
|
||||
if(vehicletype != null){
|
||||
String vehicletypeText = commonUtils.getTypeText(vehicletype);
|
||||
gantryPassOtherGantryPass.setVehicleTypeText(vehicletypeText);
|
||||
}
|
||||
Long identifyvehicletype = gantryPassOtherGantryPass.getIDENTIFYVEHICLETYPE();
|
||||
if(identifyvehicletype != null){
|
||||
String identifyvehicletypeText = commonUtils.getTypeText(identifyvehicletype);
|
||||
gantryPassOtherGantryPass.setIdentifyvehicleTypeText(identifyvehicletypeText);
|
||||
}
|
||||
Long vehicleclass = gantryPassOtherGantryPass.getVEHICLECLASS();
|
||||
if(vehicleclass != null){
|
||||
String vehicleclassText = commonUtils.getVehicleclassText(vehicleclass);
|
||||
gantryPassOtherGantryPass.setVehicleClassText(vehicleclassText);
|
||||
}
|
||||
Long obuvehicletype = gantryPassOtherGantryPass.getOBUVEHICLETYPE();
|
||||
if(obuvehicletype != null){
|
||||
String obuVehicletypeText = commonUtils.getTypeText(obuvehicletype);
|
||||
gantryPassOtherGantryPass.setObuvehicleTypeText(obuVehicletypeText);
|
||||
}
|
||||
Long cpuvehicletype = gantryPassOtherGantryPass.getCPUVEHICLETYPE();
|
||||
if(cpuvehicletype != null){
|
||||
String cpuVehicletypeText = commonUtils.getTypeText(cpuvehicletype);
|
||||
gantryPassOtherGantryPass.setCpuvehicleTypeText(cpuVehicletypeText);
|
||||
}
|
||||
}
|
||||
return R.SUCCESS(resultData);
|
||||
}else{
|
||||
GantryPassOtherGantryPassJsonResultVO gantryPassOtherGantryPassJsonResultVO = new GantryPassOtherGantryPassJsonResultVO();
|
||||
gantryPassOtherGantryPassJsonResultVO.setCode(code);
|
||||
gantryPassOtherGantryPassJsonResultVO.setTipMessage(gantryPassOtherGantryPassJsonResultNullTestVO.getMsg().toString());
|
||||
gantryPassOtherGantryPassJsonResultVO.setReturntime(gantryPassOtherGantryPassJsonResultNullTestVO.getReturntime());
|
||||
gantryPassOtherGantryPassJsonResultVO.setRespMsgSource(gantryPassOtherGantryPassJsonResultNullTestVO.getRespMsgSource());
|
||||
return R.SUCCESS(gantryPassOtherGantryPassJsonResultVO);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author chenxudong
|
||||
* @Date 2022/08/31 14:57
|
||||
* @方法 gantryPassInport
|
||||
* @作用 根据passId获取详细信息
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getGantryPassOutPortDataFromPassId")
|
||||
public R<GantryPassOutPortJsonResultVO> getGantryPassOutPortDataFromPassId(@RequestParam("columns") String columns,
|
||||
@RequestParam("passId") String passId,
|
||||
@RequestParam("listType") String listType
|
||||
){
|
||||
Map<String, Object> paramsMap = new HashMap<>();
|
||||
paramsMap.put("columns",columns);
|
||||
paramsMap.put("sqlWhere"," passId " + "= " + "'" + passId + "'");
|
||||
paramsMap.put("listType",listType);
|
||||
String gantryPassOutportByPassIdBefore = imageUtils.toWebService("11", paramsMap);
|
||||
String gantryPassOutportByPassId = gantryPassOutportByPassIdBefore.replace("\"{","{").replace("}\"","}").replace("\\", "");
|
||||
GantryPassOutPortJsonResultJavaNullVO gantryPassOutPortJsonResultJavaNullTestVO = JSONObject.parseObject(gantryPassOutportByPassId, GantryPassOutPortJsonResultJavaNullVO.class);
|
||||
Object resultDataTest = gantryPassOutPortJsonResultJavaNullTestVO.getResultData();
|
||||
GantryPassOutPortJsonResultNullVO gantryPassOutPortJsonResultNullTestVO = JSONObject.parseObject(resultDataTest.toString(), GantryPassOutPortJsonResultNullVO.class);
|
||||
String code = gantryPassOutPortJsonResultNullTestVO.getCode();
|
||||
if("1".equals(code)){
|
||||
//转化请求的 json 数据
|
||||
GantryPassOutPortJsonResultJavaVO gantryPassOutPortJsonResultJavaVO = JSONObject.parseObject(gantryPassOutportByPassId, GantryPassOutPortJsonResultJavaVO.class);
|
||||
GantryPassOutPortJsonResultVO resultData = gantryPassOutPortJsonResultJavaVO.getResultData();
|
||||
resultData.setTipMessage("获取到的数据不为空");
|
||||
List<GantryPassOutPort> msg = resultData.getMsg();
|
||||
for(GantryPassOutPort gantryPassOutPort : msg){
|
||||
Long roadno = gantryPassOutPort.getROADNO();
|
||||
if(roadno != null){
|
||||
String roadName = commonUtils.getRoadName(roadno);
|
||||
gantryPassOutPort.setRoadName(roadName);
|
||||
}
|
||||
Long stano = gantryPassOutPort.getSTANO();
|
||||
if(stano != null){
|
||||
String staName = commonUtils.getStaName(stano);
|
||||
gantryPassOutPort.setStaName(staName);
|
||||
}
|
||||
Long kind = gantryPassOutPort.getKIND();
|
||||
if(kind != null){
|
||||
String kindText = commonUtils.getKindText(kind);
|
||||
gantryPassOutPort.setKindText(kindText);
|
||||
}
|
||||
Long type = gantryPassOutPort.getTYPE();
|
||||
if(type != null){
|
||||
String typeText = commonUtils.getTypeText(type);
|
||||
gantryPassOutPort.setTypeText(typeText);
|
||||
}
|
||||
Long flag = gantryPassOutPort.getFLAG();
|
||||
if(flag != null){
|
||||
List<String> flagText = commonUtils.getFlagText(flag);
|
||||
gantryPassOutPort.setFlagText(flagText);
|
||||
}
|
||||
Long classno = gantryPassOutPort.getCLASSNO();
|
||||
if(classno != null){
|
||||
String classNOText = commonUtils.getClassNOText(classno);
|
||||
gantryPassOutPort.setClassNOText(classNOText);
|
||||
}
|
||||
Long obuCardtp = gantryPassOutPort.getOBUCARTYPE();
|
||||
if(obuCardtp != null){
|
||||
String obuCardtpText = commonUtils.getCardtpText(obuCardtp);
|
||||
gantryPassOutPort.setObuCarTypeText(obuCardtpText);
|
||||
}
|
||||
Long cpuCardtp = gantryPassOutPort.getCPUCRDCRTP();
|
||||
if(cpuCardtp != null){
|
||||
String cpuCardtpText = commonUtils.getCardtpText(cpuCardtp);
|
||||
gantryPassOutPort.setCpuCrdCrtpText(cpuCardtpText);
|
||||
}
|
||||
}
|
||||
return R.SUCCESS(resultData);
|
||||
}else{
|
||||
GantryPassOutPortJsonResultVO gantryPassOutPortJsonResultVO = new GantryPassOutPortJsonResultVO();
|
||||
gantryPassOutPortJsonResultVO.setCode(code);
|
||||
gantryPassOutPortJsonResultVO.setTipMessage(gantryPassOutPortJsonResultNullTestVO.getMsg().toString());
|
||||
gantryPassOutPortJsonResultVO.setReturntime(gantryPassOutPortJsonResultNullTestVO.getReturntime());
|
||||
gantryPassOutPortJsonResultVO.setRespMsgSource(gantryPassOutPortJsonResultNullTestVO.getRespMsgSource());
|
||||
return R.SUCCESS(gantryPassOutPortJsonResultVO);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author chenxudong
|
||||
* @Date 2022/08/31 14:57
|
||||
* @方法 gantryPassInport
|
||||
* @作用 根据passId获取详细信息
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getGantryPassInPortDataFromPassIdBefore")
|
||||
public R<GantryPassInPortJsonResultVO> getGantryPassInPortDataFromPassIdBefore(@RequestParam("columns") String columns,
|
||||
@RequestParam("passId") String passId,
|
||||
@RequestParam("listType") String listType
|
||||
){
|
||||
CommonService factory=new CommonService();
|
||||
CommonServiceSoap serviceSoap=factory.getCommonServiceSoap();
|
||||
String sqlWhere = " passId " + "= " + "'" + passId + "'";
|
||||
String gantryPassInPortByPassId = serviceSoap.getDataFromPassId(columns, sqlWhere, listType);
|
||||
String code = gantryPassInPortByPassId.replace("{", "").replace("}","").split(",")[0].split(":")[1];
|
||||
if("\"1\"".equals(code)){
|
||||
//转化请求的 json 数据
|
||||
GantryPassInPortJsonResultVO gantryPassInPortJsonResultVO = JSONObject.parseObject(gantryPassInPortByPassId, GantryPassInPortJsonResultVO.class);
|
||||
gantryPassInPortJsonResultVO.setTipMessage("获取到的数据不为空");
|
||||
List<GantryPassInPort> msg = gantryPassInPortJsonResultVO.getMsg();
|
||||
for(GantryPassInPort gantryPassInPort : msg){
|
||||
Long roadno = gantryPassInPort.getROADNO();
|
||||
if(roadno != null){
|
||||
String roadName = commonUtils.getRoadName(roadno);
|
||||
gantryPassInPort.setRoadName(roadName);
|
||||
}
|
||||
Long stano = gantryPassInPort.getSTANO();
|
||||
if(stano != null){
|
||||
String staName = commonUtils.getStaName(stano);
|
||||
gantryPassInPort.setStaName(staName);
|
||||
}
|
||||
Long kind = gantryPassInPort.getKIND();
|
||||
if(kind != null){
|
||||
String kindText = commonUtils.getKindText(kind);
|
||||
gantryPassInPort.setKindText(kindText);
|
||||
}
|
||||
Long type = gantryPassInPort.getTYPE();
|
||||
if(type != null){
|
||||
String typeText = commonUtils.getTypeText(type);
|
||||
gantryPassInPort.setTypeText(typeText);
|
||||
}
|
||||
Long flag = gantryPassInPort.getFLAG();
|
||||
if(flag != null){
|
||||
List<String> flagText = commonUtils.getFlagText(flag);
|
||||
gantryPassInPort.setFlagText(flagText);
|
||||
}
|
||||
Long classno = gantryPassInPort.getCLASSNO();
|
||||
if(classno != null){
|
||||
String classNOText = commonUtils.getClassNOText(classno);
|
||||
gantryPassInPort.setClassNOText(classNOText);
|
||||
}
|
||||
//Long obuCardtp = gantryPassInPort.getOBUCARTYPE();
|
||||
//if(obuCardtp != null){
|
||||
// String obuCardtpText = commonUtils.getCardtpText(obuCardtp);
|
||||
// gantryPassInPort.setObuCarTypeText(obuCardtpText);
|
||||
//}
|
||||
//Long cpuCardtp = gantryPassInPort.getCPUCRDCRTP();
|
||||
//if(cpuCardtp != null){
|
||||
// String cpuCardtpText = commonUtils.getCardtpText(cpuCardtp);
|
||||
// gantryPassInPort.setCpuCrdCrtpText(cpuCardtpText);
|
||||
//}
|
||||
}
|
||||
return R.SUCCESS(gantryPassInPortJsonResultVO);
|
||||
}else{
|
||||
GantryPassInPortJsonResultVO gantryPassInPortJsonResultVO = new GantryPassInPortJsonResultVO();
|
||||
gantryPassInPortJsonResultVO.setCode(code);
|
||||
String msg = gantryPassInPortByPassId.replace("{", "").replace("}","").split(",")[1].split(":")[1];
|
||||
gantryPassInPortJsonResultVO.setTipMessage(msg);
|
||||
String returntime = gantryPassInPortByPassId.replace("{", "").replace("}","").split(",")[2].split("\"")[3];
|
||||
gantryPassInPortJsonResultVO.setReturntime(returntime);
|
||||
String respMsgSource = gantryPassInPortByPassId.replace("{", "").replace("}","").split(",")[3].split(":")[1];
|
||||
gantryPassInPortJsonResultVO.setRespMsgSource(respMsgSource);
|
||||
return R.SUCCESS(gantryPassInPortJsonResultVO);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author chenxudong
|
||||
* @Date 2022/08/31 14:57
|
||||
* @方法 gantryPassInport
|
||||
* @作用 根据passId获取详细信息
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getGantryPassOutPortDataFromPassIdBefore")
|
||||
public R<GantryPassOutPortJsonResultVO> getGantryPassOutPortDataFromPassIdBefore(@RequestParam("columns") String columns,
|
||||
@RequestParam("passId") String passId,
|
||||
@RequestParam("listType") String listType
|
||||
){
|
||||
|
||||
CommonService factory=new CommonService();
|
||||
CommonServiceSoap serviceSoap=factory.getCommonServiceSoap();
|
||||
String sqlWhere = " passId " + "= " + "'" + passId + "'";
|
||||
String gantryPassOutPortByPassId = serviceSoap.getDataFromPassId(columns, sqlWhere, listType);
|
||||
String code = gantryPassOutPortByPassId.replace("{", "").replace("}","").split(",")[0].split(":")[1];
|
||||
if("\"1\"".equals(code)){
|
||||
//转化请求的 json 数据
|
||||
GantryPassOutPortJsonResultVO gantryPassOutPortJsonResultVO = JSONObject.parseObject(gantryPassOutPortByPassId, GantryPassOutPortJsonResultVO.class);
|
||||
gantryPassOutPortJsonResultVO.setTipMessage("获取到的数据不为空");
|
||||
List<GantryPassOutPort> msg = gantryPassOutPortJsonResultVO.getMsg();
|
||||
for(GantryPassOutPort gantryPassOutPort : msg){
|
||||
Long roadno = gantryPassOutPort.getROADNO();
|
||||
if(roadno != null){
|
||||
String roadName = commonUtils.getRoadName(roadno);
|
||||
gantryPassOutPort.setRoadName(roadName);
|
||||
}
|
||||
Long stano = gantryPassOutPort.getSTANO();
|
||||
if(stano != null){
|
||||
String staName = commonUtils.getStaName(stano);
|
||||
gantryPassOutPort.setStaName(staName);
|
||||
}
|
||||
Long kind = gantryPassOutPort.getKIND();
|
||||
if(kind != null){
|
||||
String kindText = commonUtils.getKindText(kind);
|
||||
gantryPassOutPort.setKindText(kindText);
|
||||
}
|
||||
Long type = gantryPassOutPort.getTYPE();
|
||||
if(type != null){
|
||||
String typeText = commonUtils.getTypeText(type);
|
||||
gantryPassOutPort.setTypeText(typeText);
|
||||
}
|
||||
Long flag = gantryPassOutPort.getFLAG();
|
||||
if(flag != null){
|
||||
List<String> flagText = commonUtils.getFlagText(flag);
|
||||
gantryPassOutPort.setFlagText(flagText);
|
||||
}
|
||||
Long classno = gantryPassOutPort.getCLASSNO();
|
||||
if(classno != null){
|
||||
String classNOText = commonUtils.getClassNOText(classno);
|
||||
gantryPassOutPort.setClassNOText(classNOText);
|
||||
}
|
||||
Long obuCardtp = gantryPassOutPort.getOBUCARTYPE();
|
||||
if(obuCardtp != null){
|
||||
String obuCardtpText = commonUtils.getCardtpText(obuCardtp);
|
||||
gantryPassOutPort.setObuCarTypeText(obuCardtpText);
|
||||
}
|
||||
Long cpuCardtp = gantryPassOutPort.getCPUCRDCRTP();
|
||||
if(cpuCardtp != null){
|
||||
String cpuCardtpText = commonUtils.getCardtpText(cpuCardtp);
|
||||
gantryPassOutPort.setCpuCrdCrtpText(cpuCardtpText);
|
||||
}
|
||||
}
|
||||
return R.SUCCESS(gantryPassOutPortJsonResultVO);
|
||||
}else{
|
||||
GantryPassOutPortJsonResultVO gantryPassOutPortJsonResultVO = new GantryPassOutPortJsonResultVO();
|
||||
gantryPassOutPortJsonResultVO.setCode(code);
|
||||
String msg = gantryPassOutPortByPassId.replace("{", "").replace("}","").split(",")[1].split(":")[1];
|
||||
gantryPassOutPortJsonResultVO.setTipMessage(msg);
|
||||
String returntime = gantryPassOutPortByPassId.replace("{", "").replace("}","").split(",")[2].split("\"")[3];
|
||||
gantryPassOutPortJsonResultVO.setReturntime(returntime);
|
||||
String respMsgSource = gantryPassOutPortByPassId.replace("{", "").replace("}","").split(",")[3].split(":")[1];
|
||||
gantryPassOutPortJsonResultVO.setRespMsgSource(respMsgSource);
|
||||
return R.SUCCESS(gantryPassOutPortJsonResultVO);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2023/01/31 15:40
|
||||
* @方法 getImgByListNO2
|
||||
* @作用 查询图像字节码
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/initBefore")
|
||||
public R<InitVO> getInitMessageBefore(){
|
||||
|
||||
InitVO initVO = new InitVO();
|
||||
initVO.setDBType(dbType);
|
||||
initVO.setRoadNO(roadNO);
|
||||
initVO.setUserStaNO(userStaNO);
|
||||
return R.SUCCESS(initVO);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author chenxudong
|
||||
* @Date 2022/08/31 14:57
|
||||
* @方法 gantryPassInport
|
||||
* @作用 根据passId获取详细信息
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getGantryPassOtherGantryPassDataFromPassIdBefore")
|
||||
public R<GantryPassOtherGantryPassJsonResultVO> getGantryPassOtherGantryPassDataFromPassIdBefore(@RequestParam("columns") String columns,
|
||||
@RequestParam("passId") String passId,
|
||||
@RequestParam("listType") String listType
|
||||
) {
|
||||
String columnsOK = "TRADEID,GANTRYID,TRANSTIME,PAYFEE,FEE,DISCOUNTFEE,TRANSFEE,FEESUMLOCALAFTER,OBUPAYFEESUMAFTER,MEDIATYPE,VEHICLEPLATE,VEHICLETYPE,IDENTIFYVEHICLETYPE,\n" +
|
||||
"VEHICLECLASS,TAC,TRANSTYPE,PASSSTATE,ENTOLLLANEID,ENTOLLSTATIONHEX,ENTIME,ENLANETYPE,PASSID,ROADNO,STANO,OBUVEHICLEPLATE,\n" +
|
||||
"OBUVEHICLETYPE,CPUVEHICLEPLATE,CPUVEHICLETYPE,\n" +
|
||||
"(select VEHICLEPICID from (select VEHICLEPICID from GANTRY_MATCH_TABLE where TRADEID=t.TRADEID and SHOOTPOS in(1,2) order by SHOOTPOS) where rownum=1) VEHICLEPICID,AXLECOUNT,\n" +
|
||||
"TOLLINTERVALID,PAYFEEGROUP,FEEGROUP,DISCOUNTFEEGROUP,SPECIALTYPE,TRADERESULT,FEECALCRESULT,\n" +
|
||||
"(SELECT ROADNAME FROM ROAD_TABLE WHERE ROADNO = t.ROADNO) ROADNAME,\n" +
|
||||
"(SELECT STANAME FROM NAME_TABLE WHERE ROADNO = t.ROADNO AND STANO = t.STANO) STANAME,\n" +
|
||||
"(SELECT NAME FROM BASICINFO_TABLE WHERE HEX=t.ENTOLLSTATIONHEX) ENTOLLSTATIONNAME,\n" +
|
||||
"(SELECT TEXT FROM mediatype_text WHERE VALUE=t.MEDIATYPE) MEDIATYPETEXT,\n" +
|
||||
"(SELECT TEXT FROM TYPE_TEXT WHERE VALUE=t.VEHICLETYPE) VEHICLETYPETEXT,\n" +
|
||||
"(SELECT TEXT FROM TYPE_TEXT WHERE VALUE=t.IDENTIFYVEHICLETYPE) IDENTIFYVEHICLETYPETEXT,\n" +
|
||||
"(SELECT TEXT FROM VEHICLECLASS_TEXT WHERE VALUE=t.VEHICLECLASS) VEHICLECLASSTEXT,\n" +
|
||||
"(SELECT TEXT FROM TYPE_TEXT WHERE VALUE=t.OBUVEHICLETYPE) OBUVEHICLETYPETEXT,\n" +
|
||||
"(SELECT TEXT FROM TYPE_TEXT WHERE VALUE=t.CPUVEHICLETYPE) CPUVEHICLETYPETEXT,\n" +
|
||||
"(SELECT NAME FROM gantry_table WHERE ID=t.GANTRYID) GANTRYNAME";
|
||||
CommonService factory = new CommonService();
|
||||
CommonServiceSoap serviceSoap = factory.getCommonServiceSoap();
|
||||
String sqlWhere = " passId " + "= " + "'" + passId + "'";
|
||||
String gantryPassOtherGantryPassByPassId = serviceSoap.getDataFromPassId(columnsOK, sqlWhere, listType);
|
||||
String code = gantryPassOtherGantryPassByPassId.replace("{", "").replace("}","").split(",")[0].split(":")[1];
|
||||
if("\"1\"".equals(code)){
|
||||
//转化请求的 json 数据
|
||||
GantryPassOtherGantryPassJsonResultVO gantryPassOtherGantryPassJsonResultVO = JSONObject.parseObject(gantryPassOtherGantryPassByPassId, GantryPassOtherGantryPassJsonResultVO.class);
|
||||
gantryPassOtherGantryPassJsonResultVO.setTipMessage("获取到的数据不为空");
|
||||
List<GantryPassOtherGantryPass> msg = gantryPassOtherGantryPassJsonResultVO.getMsg();
|
||||
for(GantryPassOtherGantryPass gantryPassOtherGantryPass : msg){
|
||||
Long payfee = gantryPassOtherGantryPass.getPAYFEE();
|
||||
if(payfee != null){
|
||||
String payfeeT = String.format("%.2f", (payfee.doubleValue() / 100));
|
||||
gantryPassOtherGantryPass.setPAYFEET(payfeeT);
|
||||
}
|
||||
Long fee = gantryPassOtherGantryPass.getFEE();
|
||||
if(fee != null){
|
||||
String feeT = String.format("%.2f", (fee.doubleValue() / 100));
|
||||
gantryPassOtherGantryPass.setFEET(feeT);
|
||||
}
|
||||
Long discountfee = gantryPassOtherGantryPass.getDISCOUNTFEE();
|
||||
if(discountfee != null){
|
||||
String discountfeeT = String.format("%.2f", (discountfee.doubleValue() / 100));
|
||||
gantryPassOtherGantryPass.setDISCOUNTFEET(discountfeeT);
|
||||
}
|
||||
Long transfee = gantryPassOtherGantryPass.getTRANSFEE();
|
||||
if(transfee != null){
|
||||
String transfeeT = String.format("%.2f", (transfee.doubleValue() / 100));
|
||||
gantryPassOtherGantryPass.setTRANSFEET(transfeeT);
|
||||
}
|
||||
//vehiclePlate
|
||||
String vehiclePlate = gantryPassOtherGantryPass.getVEHICLEPLATE();
|
||||
String[] vehiclePlateSplits = vehiclePlate.split("_");
|
||||
if(vehiclePlateSplits.length == 2){
|
||||
String plateColor = commonUtils.getPlateColor(vehiclePlateSplits[1]);
|
||||
gantryPassOtherGantryPass.setVEHICLEPLATE(vehiclePlateSplits[0] + "_" + plateColor);
|
||||
}
|
||||
//CPUVehiclePlate
|
||||
String cpuVehiclePlate = gantryPassOtherGantryPass.getCPUVEHICLEPLATE();
|
||||
String[] cpuVehiclePlateSplits = cpuVehiclePlate.split("_");
|
||||
if(cpuVehiclePlateSplits.length == 2){
|
||||
String cpuPlateColor = commonUtils.getPlateColor(cpuVehiclePlateSplits[1]);
|
||||
gantryPassOtherGantryPass.setCPUVEHICLEPLATE(cpuVehiclePlateSplits[0] + "_" + cpuPlateColor);
|
||||
}
|
||||
//OBUVehiclePlate
|
||||
String obuVehiclePlate = gantryPassOtherGantryPass.getOBUVEHICLEPLATE();
|
||||
String[] obuVehiclePlateSplits = obuVehiclePlate.split("_");
|
||||
if(obuVehiclePlateSplits.length == 2){
|
||||
String obuPlateColor = commonUtils.getPlateColor(obuVehiclePlateSplits[1]);
|
||||
gantryPassOtherGantryPass.setOBUVEHICLEPLATE(obuVehiclePlateSplits[0] + "_" + obuPlateColor);
|
||||
}
|
||||
String gantryid = gantryPassOtherGantryPass.getGANTRYID();
|
||||
if(gantryid != null){
|
||||
String gantryName = commonUtils.getGantryName(gantryid);
|
||||
gantryPassOtherGantryPass.setGantryName(gantryName);
|
||||
}
|
||||
Long roadno = gantryPassOtherGantryPass.getROADNO();
|
||||
if(roadno != null){
|
||||
String roadName = commonUtils.getRoadName(roadno);
|
||||
gantryPassOtherGantryPass.setRoadName(roadName);
|
||||
}
|
||||
Long stano = gantryPassOtherGantryPass.getSTANO();
|
||||
if(stano != null){
|
||||
String staName = commonUtils.getStaName(stano);
|
||||
gantryPassOtherGantryPass.setStaName(staName);
|
||||
}
|
||||
Long mediatype = gantryPassOtherGantryPass.getMEDIATYPE();
|
||||
if(mediatype != null){
|
||||
String mediaTypeText = commonUtils.getMediaTypeText(mediatype);
|
||||
gantryPassOtherGantryPass.setMediaTypeText(mediaTypeText);
|
||||
}
|
||||
Long vehicletype = gantryPassOtherGantryPass.getVEHICLETYPE();
|
||||
if(vehicletype != null){
|
||||
String vehicletypeText = commonUtils.getTypeText(vehicletype);
|
||||
gantryPassOtherGantryPass.setVehicleTypeText(vehicletypeText);
|
||||
}
|
||||
Long identifyvehicletype = gantryPassOtherGantryPass.getIDENTIFYVEHICLETYPE();
|
||||
if(identifyvehicletype != null){
|
||||
String identifyvehicletypeText = commonUtils.getTypeText(identifyvehicletype);
|
||||
gantryPassOtherGantryPass.setIdentifyvehicleTypeText(identifyvehicletypeText);
|
||||
}
|
||||
Long vehicleclass = gantryPassOtherGantryPass.getVEHICLECLASS();
|
||||
if(vehicleclass != null){
|
||||
String vehicleclassText = commonUtils.getVehicleclassText(vehicleclass);
|
||||
gantryPassOtherGantryPass.setVehicleClassText(vehicleclassText);
|
||||
}
|
||||
Long obuvehicletype = gantryPassOtherGantryPass.getOBUVEHICLETYPE();
|
||||
if(obuvehicletype != null){
|
||||
String obuVehicletypeText = commonUtils.getTypeText(obuvehicletype);
|
||||
gantryPassOtherGantryPass.setObuvehicleTypeText(obuVehicletypeText);
|
||||
}
|
||||
Long cpuvehicletype = gantryPassOtherGantryPass.getCPUVEHICLETYPE();
|
||||
if(cpuvehicletype != null){
|
||||
String cpuVehicletypeText = commonUtils.getTypeText(cpuvehicletype);
|
||||
gantryPassOtherGantryPass.setCpuvehicleTypeText(cpuVehicletypeText);
|
||||
}
|
||||
}
|
||||
return R.SUCCESS(gantryPassOtherGantryPassJsonResultVO);
|
||||
}else{
|
||||
GantryPassOtherGantryPassJsonResultVO gantryPassOtherGantryPassJsonResultVO = new GantryPassOtherGantryPassJsonResultVO();
|
||||
gantryPassOtherGantryPassJsonResultVO.setCode(code);
|
||||
String msg = gantryPassOtherGantryPassByPassId.replace("{", "").replace("}","").split(",")[1].split(":")[1];
|
||||
gantryPassOtherGantryPassJsonResultVO.setTipMessage(msg);
|
||||
String returntime = gantryPassOtherGantryPassByPassId.replace("{", "").replace("}","").split(",")[2].split("\"")[3];
|
||||
gantryPassOtherGantryPassJsonResultVO.setReturntime(returntime);
|
||||
String respMsgSource = gantryPassOtherGantryPassByPassId.replace("{", "").replace("}","").split(",")[3].split(":")[1];
|
||||
gantryPassOtherGantryPassJsonResultVO.setRespMsgSource(respMsgSource);
|
||||
return R.SUCCESS(gantryPassOtherGantryPassJsonResultVO);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
import com.cxds.imageaudit.mapper.ExitfeetypeTextMapper;
|
||||
import com.cxds.imageaudit.pojo.entity.ExitfeetypeText;
|
||||
import com.cxds.imageaudit.resultR.R;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2022-07-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/exitfeeType")
|
||||
public class ExitfeetypeTextController {
|
||||
|
||||
@Autowired
|
||||
private ExitfeetypeTextMapper exitfeetypeTextMapper;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/07/07 10:02
|
||||
* @方法 porttypegbTypeAll
|
||||
* @作用 查询计费方式全部类型
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/exitfeeTypeAll")
|
||||
public R<List<ExitfeetypeText>> exitfeeTypeAll(){
|
||||
List<ExitfeetypeText> exitfeeType = exitfeetypeTextMapper.selectList(null);
|
||||
//System.out.println("陈旭东:"+exitfeeType);
|
||||
return R.SUCCESS(exitfeeType);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
import com.cxds.imageaudit.mapper.FlagTextMapper;
|
||||
import com.cxds.imageaudit.pojo.entity.FlagText;
|
||||
import com.cxds.imageaudit.resultR.R;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2022-07-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/flagType")
|
||||
public class FlagTextController {
|
||||
|
||||
@Autowired
|
||||
private FlagTextMapper flagTextMapper;
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/07/07 09:39
|
||||
* @方法 flagTypeAll
|
||||
* @作用 查询事件全部类型
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/flagTypeAll")
|
||||
public R<List<FlagText>> flagTypeAll(){
|
||||
List<FlagText> flagType = flagTextMapper.selectList(null);
|
||||
//System.out.println("陈旭东:"+flagType);
|
||||
return R.SUCCESS(flagType);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,344 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.cxds.imageaudit.mapper.GantryPassMapper;
|
||||
import com.cxds.imageaudit.myjavawebservices.WsdlApiTest0;
|
||||
import com.cxds.imageaudit.mywebservices.CommonService;
|
||||
import com.cxds.imageaudit.mywebservices.CommonServiceSoap;
|
||||
import com.cxds.imageaudit.pojo.dto.GantryPassDTO;
|
||||
import com.cxds.imageaudit.pojo.entity.GantryPass;
|
||||
import com.cxds.imageaudit.pojo.vo.GantryPassInPortJsonResultVO;
|
||||
import com.cxds.imageaudit.pojo.vo.GantryPassOtherGantryPassJsonResultVO;
|
||||
import com.cxds.imageaudit.resultR.R;
|
||||
import com.cxds.imageaudit.service.IGantryPassService;
|
||||
import com.cxds.imageaudit.utils.CommonUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2022-07-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/gantryPass")
|
||||
public class GantryPassController {
|
||||
|
||||
@Autowired
|
||||
private CommonUtils commonUtils;
|
||||
|
||||
@Autowired
|
||||
private GantryPassMapper gantryPassMapper;
|
||||
|
||||
@Autowired
|
||||
private IGantryPassService iGantryPassService;
|
||||
|
||||
@Value("${DBType}")
|
||||
public String dbType;
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/07/27 17:23
|
||||
* @方法 gantryPassPage
|
||||
* @作用 查询门架图像审计流水信息列表
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/page")
|
||||
public R<IPage<GantryPass>> gantryPassPage(@RequestBody GantryPassDTO gantryPassDTO){
|
||||
Page<GantryPass> page = new Page<>(gantryPassDTO.getPageNum(), gantryPassDTO.getPageSize());
|
||||
IPage<GantryPass> gantryPassListPage = null;
|
||||
if(dbType.equals("1")){
|
||||
gantryPassListPage = gantryPassMapper.gantryPassPageSQLServer(page, gantryPassDTO);
|
||||
}else if(dbType.equals("2")){
|
||||
gantryPassListPage = gantryPassMapper.gantryPassPageOracle(page, gantryPassDTO);
|
||||
}else if(dbType.equals("3")){
|
||||
gantryPassListPage = gantryPassMapper.gantryPassPageDM(page, gantryPassDTO);
|
||||
}else if(dbType.equals("4")){
|
||||
gantryPassListPage = gantryPassMapper.gantryPassPageMySQL(page, gantryPassDTO);
|
||||
}
|
||||
List<GantryPass> gantryPassListPageRecords = gantryPassListPage.getRecords();
|
||||
for(GantryPass gantryPass : gantryPassListPageRecords){
|
||||
//vehiclePlate
|
||||
String vehiclePlate = gantryPass.getVehiclePlate();
|
||||
if(vehiclePlate != null){
|
||||
String[] vehiclePlateSplits = vehiclePlate.split("_");
|
||||
if(vehiclePlateSplits.length == 2){
|
||||
String plateColor = commonUtils.getPlateColor(vehiclePlateSplits[1]);
|
||||
gantryPass.setVehiclePlate(vehiclePlateSplits[0] + "_" + plateColor);
|
||||
}
|
||||
}
|
||||
//CPUVehiclePlate
|
||||
String cpuVehiclePlate = gantryPass.getCPUVehiclePlate();
|
||||
if(cpuVehiclePlate != null){
|
||||
String[] cpuVehiclePlateSplits = cpuVehiclePlate.split("_");
|
||||
if(cpuVehiclePlateSplits.length == 2){
|
||||
String cpuPlateColor = commonUtils.getPlateColor(cpuVehiclePlateSplits[1]);
|
||||
gantryPass.setCPUVehiclePlate(cpuVehiclePlateSplits[0] + "_" + cpuPlateColor);
|
||||
}
|
||||
}
|
||||
//OBUVehiclePlate
|
||||
String obuVehiclePlate = gantryPass.getOBUVehiclePlate();
|
||||
if(obuVehiclePlate != null){
|
||||
String[] obuVehiclePlateSplits = obuVehiclePlate.split("_");
|
||||
if(obuVehiclePlateSplits.length == 2){
|
||||
String obuPlateColor = commonUtils.getPlateColor(obuVehiclePlateSplits[1]);
|
||||
gantryPass.setOBUVehiclePlate(obuVehiclePlateSplits[0] + "_" + obuPlateColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
return R.SUCCESS(gantryPassListPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/08/04 07:15
|
||||
* @方法 printTableAll
|
||||
* @作用 查询门架全部打印流水信息数据
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/printTableAll")
|
||||
public R<List<GantryPass>> gantryPassPrintTableAll(@RequestBody GantryPassDTO gantryPassDTO){
|
||||
List<GantryPass> gantryPassPrintTableList = null;
|
||||
if(dbType.equals("1")){
|
||||
gantryPassPrintTableList = gantryPassMapper.gantryPassPageSQLServer(gantryPassDTO);
|
||||
}else if(dbType.equals("2")){
|
||||
gantryPassPrintTableList = gantryPassMapper.gantryPassPageOracle(gantryPassDTO);
|
||||
}else if(dbType.equals("3")){
|
||||
gantryPassPrintTableList = gantryPassMapper.gantryPassPageDM(gantryPassDTO);
|
||||
}else if(dbType.equals("4")){
|
||||
gantryPassPrintTableList = gantryPassMapper.gantryPassPageMySQL(gantryPassDTO);
|
||||
}
|
||||
for(GantryPass gantryPass : gantryPassPrintTableList){
|
||||
//vehiclePlate
|
||||
String vehiclePlate = gantryPass.getVehiclePlate();
|
||||
String[] vehiclePlateSplits = vehiclePlate.split("_");
|
||||
if(vehiclePlateSplits.length == 2){
|
||||
String plateColor = commonUtils.getPlateColor(vehiclePlateSplits[1]);
|
||||
gantryPass.setVehiclePlate(vehiclePlateSplits[0] + "_" + plateColor);
|
||||
}
|
||||
//CPUVehiclePlate
|
||||
String cpuVehiclePlate = gantryPass.getCPUVehiclePlate();
|
||||
String[] cpuVehiclePlateSplits = cpuVehiclePlate.split("_");
|
||||
if(cpuVehiclePlateSplits.length == 2){
|
||||
String cpuPlateColor = commonUtils.getPlateColor(cpuVehiclePlateSplits[1]);
|
||||
gantryPass.setCPUVehiclePlate(cpuVehiclePlateSplits[0] + "_" + cpuPlateColor);
|
||||
}
|
||||
//OBUVehiclePlate
|
||||
String obuVehiclePlate = gantryPass.getOBUVehiclePlate();
|
||||
String[] obuVehiclePlateSplits = obuVehiclePlate.split("_");
|
||||
if(obuVehiclePlateSplits.length == 2){
|
||||
String obuPlateColor = commonUtils.getPlateColor(obuVehiclePlateSplits[1]);
|
||||
gantryPass.setOBUVehiclePlate(obuVehiclePlateSplits[0] + "_" + obuPlateColor);
|
||||
}
|
||||
}
|
||||
return R.SUCCESS(gantryPassPrintTableList);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/08/04 07:15
|
||||
* @方法 printTableBatch
|
||||
* @作用 查询门架批量打印流水信息数据
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/printTableBatch")
|
||||
public R<List<GantryPass>> gantryPassPrintTableBatch(@RequestBody List<String> tradeIds){
|
||||
List<GantryPass> gantryPassPrintTableList = gantryPassMapper.gantryPassTradeIdsBatch(tradeIds);
|
||||
for(GantryPass gantryPass : gantryPassPrintTableList){
|
||||
//vehiclePlate
|
||||
String vehiclePlate = gantryPass.getVehiclePlate();
|
||||
String[] vehiclePlateSplits = vehiclePlate.split("_");
|
||||
if(vehiclePlateSplits.length == 2){
|
||||
String plateColor = commonUtils.getPlateColor(vehiclePlateSplits[1]);
|
||||
gantryPass.setVehiclePlate(vehiclePlateSplits[0] + "_" + plateColor);
|
||||
}
|
||||
//CPUVehiclePlate
|
||||
String cpuVehiclePlate = gantryPass.getCPUVehiclePlate();
|
||||
String[] cpuVehiclePlateSplits = cpuVehiclePlate.split("_");
|
||||
if(cpuVehiclePlateSplits.length == 2){
|
||||
String cpuPlateColor = commonUtils.getPlateColor(cpuVehiclePlateSplits[1]);
|
||||
gantryPass.setCPUVehiclePlate(cpuVehiclePlateSplits[0] + "_" + cpuPlateColor);
|
||||
}
|
||||
//OBUVehiclePlate
|
||||
String obuVehiclePlate = gantryPass.getOBUVehiclePlate();
|
||||
String[] obuVehiclePlateSplits = obuVehiclePlate.split("_");
|
||||
if(obuVehiclePlateSplits.length == 2){
|
||||
String obuPlateColor = commonUtils.getPlateColor(obuVehiclePlateSplits[1]);
|
||||
gantryPass.setOBUVehiclePlate(obuVehiclePlateSplits[0] + "_" + obuPlateColor);
|
||||
}
|
||||
}
|
||||
return R.SUCCESS(gantryPassPrintTableList);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/07/20 11:02
|
||||
* @方法 getImgByListNO2
|
||||
* @作用 查询图像字节码
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/javaImage")
|
||||
public String getImgByListNO2(@RequestParam("listno") String listno,
|
||||
@RequestParam("transferFlag") Integer transferFlag,
|
||||
@RequestParam("imgType") String imgType
|
||||
){
|
||||
Map<String, Object> paramsMap = new HashMap<>();
|
||||
paramsMap.put("listNO",listno);
|
||||
paramsMap.put("transferFlag",transferFlag);
|
||||
paramsMap.put("imgType",imgType);
|
||||
WsdlApiTest0 wsdlApiTest0 = new WsdlApiTest0();
|
||||
String resultTest = wsdlApiTest0.toWebService("10", paramsMap);
|
||||
System.out.println(resultTest);
|
||||
//System.out.println("陈旭东:" + resultTest);
|
||||
return resultTest;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author chenxudong
|
||||
* @Date 2022/08/31 14:57
|
||||
* @方法 gantryPassDetail
|
||||
* @作用 根据passId获取详细信息
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/gantryPassDetail/{passId}")
|
||||
public R<List<GantryPass>> gantryPassDetail(@PathVariable String passId){
|
||||
List<GantryPass> gantryPassList = null;
|
||||
if(dbType.equals("1")){
|
||||
gantryPassList = gantryPassMapper.selectByPassIdSQLServer(passId);
|
||||
}else if(dbType.equals("2")){
|
||||
gantryPassList = gantryPassMapper.selectByPassIdOracle(passId);
|
||||
}else if(dbType.equals("3")){
|
||||
gantryPassList = gantryPassMapper.selectByPassIdDM(passId);
|
||||
}else if(dbType.equals("4")){
|
||||
gantryPassList = gantryPassMapper.selectByPassIdMySQL(passId);
|
||||
}
|
||||
String staName = commonUtils.getDataFromPassId("STANO",passId,"1");
|
||||
for(GantryPass gantryPass : gantryPassList){
|
||||
gantryPass.setEntollStationNameNew(staName);
|
||||
List<String> vehiclepicidFromTradeIdList = gantryPassMapper.getVehiclepicidFromTradeId(gantryPass.getTradeId());
|
||||
if(vehiclepicidFromTradeIdList != null && vehiclepicidFromTradeIdList.size() > 0){
|
||||
gantryPass.setVehiclePicId(vehiclepicidFromTradeIdList.get(0));
|
||||
}
|
||||
//vehiclePlate
|
||||
String vehiclePlate = gantryPass.getVehiclePlate();
|
||||
if(vehiclePlate != null){
|
||||
String[] vehiclePlateSplits = vehiclePlate.split("_");
|
||||
if(vehiclePlateSplits.length == 2){
|
||||
String plateColor = commonUtils.getPlateColor(vehiclePlateSplits[1]);
|
||||
gantryPass.setVehiclePlate(vehiclePlateSplits[0] + "_" + plateColor);
|
||||
}
|
||||
}
|
||||
//CPUVehiclePlate
|
||||
String cpuVehiclePlate = gantryPass.getCPUVehiclePlate();
|
||||
if(cpuVehiclePlate != null){
|
||||
String[] cpuVehiclePlateSplits = cpuVehiclePlate.split("_");
|
||||
if(cpuVehiclePlateSplits.length == 2){
|
||||
String cpuPlateColor = commonUtils.getPlateColor(cpuVehiclePlateSplits[1]);
|
||||
gantryPass.setCPUVehiclePlate(cpuVehiclePlateSplits[0] + "_" + cpuPlateColor);
|
||||
}
|
||||
}
|
||||
//OBUVehiclePlate
|
||||
String obuVehiclePlate = gantryPass.getOBUVehiclePlate();
|
||||
if(obuVehiclePlate != null){
|
||||
String[] obuVehiclePlateSplits = obuVehiclePlate.split("_");
|
||||
if(obuVehiclePlateSplits.length == 2){
|
||||
String obuPlateColor = commonUtils.getPlateColor(obuVehiclePlateSplits[1]);
|
||||
gantryPass.setOBUVehiclePlate(obuVehiclePlateSplits[0] + "_" + obuPlateColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
return R.SUCCESS(gantryPassList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author chenxudong
|
||||
* @Date 2022/08/31 14:57
|
||||
* @方法 gantryPassInport
|
||||
* @作用 根据passId获取详细信息
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/gantryPassInport/{passId}")
|
||||
public R<GantryPassInPortJsonResultVO> gantryPassInport(@PathVariable String passId){
|
||||
CommonService factory=new CommonService();
|
||||
CommonServiceSoap serviceSoap=factory.getCommonServiceSoap();
|
||||
String sqlWhere = " passId " + "= " + "'" + passId + "'";
|
||||
String gantryPassInportByPassId = serviceSoap.getDataFromPassId("", sqlWhere, "1");
|
||||
//转化请求的 json 数据
|
||||
GantryPassInPortJsonResultVO gantryPassInPortJsonResultVO = JSONObject.parseObject(gantryPassInportByPassId, GantryPassInPortJsonResultVO.class);
|
||||
//JSONObject jsonObject = JSONObject.parseObject(gantryPassInportByPassId);
|
||||
////获取 msg 返回对象信息
|
||||
//String msg = jsonObject.getString("msg");
|
||||
//List<GantryPassInPort> gantryPassInPort = JSONArray.parseArray(msg,GantryPassInPort.class);
|
||||
//System.out.println(msg);
|
||||
//System.out.println(gantryPassInPort);
|
||||
return R.SUCCESS(gantryPassInPortJsonResultVO);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author chenxudong
|
||||
* @Date 2022/08/31 14:57
|
||||
* @方法 gantryPassOutPort
|
||||
* @作用 根据passId获取详细信息
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/gantryPassOutPort/{passId}")
|
||||
public R gantryPassOutPort(@PathVariable String passId){
|
||||
CommonService factory=new CommonService();
|
||||
CommonServiceSoap serviceSoap=factory.getCommonServiceSoap();
|
||||
String sqlWhere = " passId " + "= " + "'" + passId + "'";
|
||||
String gantryPassOutPortByPassId = serviceSoap.getDataFromPassId("", sqlWhere, "2");
|
||||
//转化请求的 json 数据
|
||||
JSONObject jsonObject = JSONObject.parseObject(gantryPassOutPortByPassId);
|
||||
//获取 msg 返回对象信息
|
||||
String msg = jsonObject.getString("msg");
|
||||
System.out.println(msg);
|
||||
return R.SUCCESS(msg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author chenxudong
|
||||
* @Date 2022/08/31 14:57
|
||||
* @方法 gantryPassOtherDetail
|
||||
* @作用 根据passId获取详细信息
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/otherGantryPassDetail/{passId}")
|
||||
public R gantryPassOtherDetail(@PathVariable String passId){
|
||||
CommonService factory=new CommonService();
|
||||
CommonServiceSoap serviceSoap=factory.getCommonServiceSoap();
|
||||
String sqlWhere = " passId " + "= " + "'" + passId + "'";
|
||||
String gantryPassOtherDetailByPassId = serviceSoap.getDataFromPassId("", sqlWhere, "3");
|
||||
//转化请求的 json 数据
|
||||
JSONObject jsonObject = JSONObject.parseObject(gantryPassOtherDetailByPassId);
|
||||
//获取 msg 返回对象信息
|
||||
String msg = jsonObject.getString("msg");
|
||||
System.out.println(msg);
|
||||
return R.SUCCESS(msg);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,145 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.cxds.imageaudit.mapper.GantryPlatePassMapper;
|
||||
import com.cxds.imageaudit.pojo.dto.GantryPlatePassDTO;
|
||||
import com.cxds.imageaudit.pojo.entity.GantryPass;
|
||||
import com.cxds.imageaudit.pojo.entity.GantryPlatePass;
|
||||
import com.cxds.imageaudit.pojo.entity.InPort;
|
||||
import com.cxds.imageaudit.resultR.R;
|
||||
import com.cxds.imageaudit.service.IGantryPlatePassService;
|
||||
import com.cxds.imageaudit.utils.CommonUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2022-07-28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/gantryPlatePass")
|
||||
public class GantryPlatePassController {
|
||||
|
||||
@Autowired
|
||||
private GantryPlatePassMapper gantryPlatePassMapper;
|
||||
|
||||
@Autowired
|
||||
private IGantryPlatePassService iGantryPlatePassService;
|
||||
|
||||
@Value("${DBType}")
|
||||
public String dbType;
|
||||
|
||||
@Autowired
|
||||
private CommonUtils commonUtils;
|
||||
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/07/27 17:23
|
||||
* @方法 gantryPassPage
|
||||
* @作用 查询门架车牌信息列表
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/page")
|
||||
public R<IPage<GantryPlatePass>> gantryPlatePassPage(@RequestBody GantryPlatePassDTO gantryPlatePassDTO){
|
||||
Page<GantryPlatePass> page = new Page<>(gantryPlatePassDTO.getPageNum(), gantryPlatePassDTO.getPageSize());
|
||||
IPage<GantryPlatePass> gantryPlatePassListPage = null;
|
||||
if(dbType.equals("1")){
|
||||
gantryPlatePassListPage = gantryPlatePassMapper.gantryPlatePassPageSQLServer(page, gantryPlatePassDTO);
|
||||
}else if(dbType.equals("2")){
|
||||
gantryPlatePassListPage = gantryPlatePassMapper.gantryPlatePassPageOracle(page, gantryPlatePassDTO);
|
||||
}else if(dbType.equals("3")){
|
||||
gantryPlatePassListPage = gantryPlatePassMapper.gantryPlatePassPageDM(page, gantryPlatePassDTO);
|
||||
}else if(dbType.equals("4")){
|
||||
gantryPlatePassListPage = gantryPlatePassMapper.gantryPlatePassPageMySQL(page, gantryPlatePassDTO);
|
||||
}
|
||||
List<GantryPlatePass> gantryPlatePassListPageRecords = gantryPlatePassListPage.getRecords();
|
||||
for(GantryPlatePass gantryPlatePass : gantryPlatePassListPageRecords){
|
||||
//vehiclePlate
|
||||
String vehiclePlate = gantryPlatePass.getVehicleplate();
|
||||
String[] vehiclePlateSplits = vehiclePlate.split("_");
|
||||
if(vehiclePlateSplits.length == 2){
|
||||
String plateColor = commonUtils.getPlateColor(vehiclePlateSplits[1]);
|
||||
gantryPlatePass.setVehicleplate(vehiclePlateSplits[0] + "_" + plateColor);
|
||||
}
|
||||
}
|
||||
//gantryPlatePassListPage = gantryPlatePassMapper.gantryPlatePassPage(page, gantryPlatePassDTO);
|
||||
return R.SUCCESS(gantryPlatePassListPage);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author chenxudong
|
||||
* @Date 2022/09/13 10:
|
||||
* @方法 gantryPlatePassNear
|
||||
* @作用 根据transTime获取前后5分钟牌识数据
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/gantryPlatePassNear")
|
||||
public R<IPage<GantryPlatePass>> gantryPlatePassNear(@RequestParam("transTime") String transTime,
|
||||
@RequestParam("gantryId") String gantryId,
|
||||
@RequestParam("pageNum") Integer pageNum,
|
||||
@RequestParam("pageSize") Integer pageSize){
|
||||
Page<GantryPlatePass> page = new Page<>(pageNum, pageSize);
|
||||
IPage<GantryPlatePass> gantryPlatePassNear = null;
|
||||
if(dbType.equals("1")){
|
||||
gantryPlatePassNear = gantryPlatePassMapper.selectByTransTimeSQLServer(page, transTime, gantryId);
|
||||
}else if(dbType.equals("2")){
|
||||
gantryPlatePassNear = gantryPlatePassMapper.selectByTransTimeOracle(page, transTime, gantryId);
|
||||
}else if(dbType.equals("3")){
|
||||
gantryPlatePassNear = gantryPlatePassMapper.selectByTransTimePageDM(page, transTime, gantryId);
|
||||
}else if(dbType.equals("4")){
|
||||
gantryPlatePassNear = gantryPlatePassMapper.selectByTransTimePageMySQL(page, transTime, gantryId);
|
||||
}
|
||||
//gantryPlatePassNear = gantryPlatePassMapper.selectByTransTime(page, transTime, gantryId);
|
||||
return R.SUCCESS(gantryPlatePassNear);
|
||||
}
|
||||
|
||||
|
||||
///**
|
||||
// * @Author chenxudong
|
||||
// * @Date 2022/09/13 10:
|
||||
// * @方法 gantryPlatePassNear
|
||||
// * @作用 根据transTime获取前后5分钟牌识数据
|
||||
// * @参数说明
|
||||
// * @return
|
||||
// */
|
||||
//@GetMapping("/gantryPlatePassNear/{transTime}?pageNum={pageNum}&pageSize={pageSize}")
|
||||
//public R<IPage<GantryPlatePass>> gantryPlatePassNear(@PathVariable String transTime, @PathVariable Integer pageNum, @PathVariable Integer pageSize){
|
||||
// Page<GantryPlatePass> page = new Page<>(pageNum, pageSize);
|
||||
// IPage<GantryPlatePass> gantryPlatePassNear = gantryPlatePassMapper.selectByTransTime(page, transTime);
|
||||
// return R.SUCCESS(gantryPlatePassNear);
|
||||
//}
|
||||
|
||||
|
||||
|
||||
///**
|
||||
// * @Author chenxudong
|
||||
// * @Date 2022/09/13 10:
|
||||
// * @方法 gantryPlatePassNear
|
||||
// * @作用 根据transTime获取前后5分钟牌识数据
|
||||
// * @参数说明
|
||||
// * @return
|
||||
// */
|
||||
//@GetMapping("/gantryPlatePassNear/{transTime}")
|
||||
//public R gantryPlatePassNear(@PathVariable String transTime){
|
||||
// List<GantryPlatePass> gantryPlatePassNear = gantryPlatePassMapper.selectByTransTime(transTime);
|
||||
// return R.SUCCESS(gantryPlatePassNear);
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2022-07-28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/tothefor/gantry-table")
|
||||
public class GantryTableController {
|
||||
|
||||
}
|
||||
@ -0,0 +1,103 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
import com.cxds.imageaudit.pojo.vo.ImageAllVO;
|
||||
import com.cxds.imageaudit.pojo.vo.ImageVO;
|
||||
import com.cxds.imageaudit.utils.ImageUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.xml.bind.DatatypeConverter;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2023-01-31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/image")
|
||||
public class GetImageController {
|
||||
|
||||
@Autowired
|
||||
private ImageUtils imageUtils;
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2023/01/31 15:40
|
||||
* @方法 getImgByListNO2
|
||||
* @作用 查询图像字节码
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/javaImage")
|
||||
public ImageVO getImgByListNO2(@RequestParam("listno") String listno,
|
||||
@RequestParam("transferFlag") Integer transferFlag,
|
||||
@RequestParam("imgType") String imgType
|
||||
){
|
||||
Map<String, Object> paramsMap = new HashMap<>();
|
||||
paramsMap.put("listNO",listno);
|
||||
paramsMap.put("transferFlag",transferFlag);
|
||||
paramsMap.put("imgType",imgType);
|
||||
String resultTest = imageUtils.toWebService("10", paramsMap);
|
||||
String[] splitValues = resultTest.split(",");
|
||||
String resultText = splitValues[0].split(":")[1];
|
||||
String imageString = splitValues[1].split(":")[1].replaceAll("\\\\", "");
|
||||
byte[] parseBase64Binary = DatatypeConverter.parseBase64Binary(imageString);
|
||||
String resultCode = splitValues[2].split(":")[1];
|
||||
ImageVO imageVO = new ImageVO();
|
||||
imageVO.setResultText(resultText);
|
||||
imageVO.setImageString(imageString);
|
||||
imageVO.setParseBase64Binary(parseBase64Binary);
|
||||
imageVO.setResultCode(resultCode);
|
||||
return imageVO;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2023/08/14 17:27
|
||||
* @方法 javaGetAllImage
|
||||
* @作用 查询图像字节码
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/javaGetAllImage")
|
||||
public ImageAllVO javaGetAllImage(@RequestParam("ilistno") String ilistno,
|
||||
@RequestParam("listno") String listno,
|
||||
@RequestParam("transferFlag") Integer transferFlag,
|
||||
@RequestParam("imgType") String imgType
|
||||
){
|
||||
Map<String, Object> paramsMapInPort = new HashMap<>();
|
||||
paramsMapInPort.put("listNO",ilistno);
|
||||
paramsMapInPort.put("transferFlag",transferFlag);
|
||||
paramsMapInPort.put("imgType",imgType);
|
||||
String resultInPort = imageUtils.toWebService("10", paramsMapInPort);
|
||||
String[] splitValuesInPort = resultInPort.split(",");
|
||||
String resultTextInPort = splitValuesInPort[0].split(":")[1];
|
||||
String imageStringInPort = splitValuesInPort[1].split(":")[1].replaceAll("\\\\", "");
|
||||
byte[] parseBase64BinaryInPort = DatatypeConverter.parseBase64Binary(imageStringInPort);
|
||||
String resultCodeInPort = splitValuesInPort[2].split(":")[1];
|
||||
|
||||
|
||||
|
||||
Map<String, Object> paramsMapOutPort = new HashMap<>();
|
||||
paramsMapOutPort.put("listNO",listno);
|
||||
paramsMapOutPort.put("transferFlag",transferFlag);
|
||||
paramsMapOutPort.put("imgType",imgType);
|
||||
String resultOutPort = imageUtils.toWebService("10", paramsMapOutPort);
|
||||
String[] splitValuesOutPort = resultOutPort.split(",");
|
||||
String resultTextOutPort = splitValuesOutPort[0].split(":")[1];
|
||||
String imageStringOutPort = splitValuesOutPort[1].split(":")[1].replaceAll("\\\\", "");
|
||||
byte[] parseBase64BinaryOutPort = DatatypeConverter.parseBase64Binary(imageStringOutPort);
|
||||
String resultCode = splitValuesOutPort[2].split(":")[1];
|
||||
|
||||
ImageAllVO imageAllVO = new ImageAllVO();
|
||||
return imageAllVO;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,638 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.poi.excel.ExcelUtil;
|
||||
import cn.hutool.poi.excel.ExcelWriter;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.cxds.imageaudit.mapper.*;
|
||||
import com.cxds.imageaudit.myjavawebservices.WsdlApiTest0;
|
||||
import com.cxds.imageaudit.mywebservices.CommonService;
|
||||
import com.cxds.imageaudit.mywebservices.CommonServiceSoap;
|
||||
import com.cxds.imageaudit.pojo.dto.InPortDTO;
|
||||
import com.cxds.imageaudit.pojo.entity.InPort;
|
||||
import com.cxds.imageaudit.pojo.entity.RoadTable;
|
||||
import com.cxds.imageaudit.resultR.R;
|
||||
import com.cxds.imageaudit.service.IInPortService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.imageio.stream.FileImageInputStream;
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.xml.bind.DatatypeConverter;
|
||||
import javax.xml.ws.Holder;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2022-07-13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/inPort")
|
||||
public class InPortController {
|
||||
|
||||
@Autowired
|
||||
private InPortMapper inPortMapper;
|
||||
|
||||
@Autowired
|
||||
private IInPortService iInPortService;
|
||||
|
||||
//@Autowired
|
||||
//InPortServiceImpl inPortServiceImpl;
|
||||
|
||||
@Autowired
|
||||
private RoadTableMapper roadTableMapper;
|
||||
|
||||
@Autowired
|
||||
private NameTableMapper nameTableMapper;
|
||||
|
||||
@Autowired
|
||||
private ClassnoTextMapper classnoTextMapper;
|
||||
|
||||
@Autowired
|
||||
private CardtpTextMapper cardtpTextMapper;
|
||||
|
||||
@Autowired
|
||||
private TypeTextMapper typeTextMapper;
|
||||
|
||||
@Autowired
|
||||
private KindTextMapper kindTextMapper;
|
||||
|
||||
@Autowired
|
||||
private FlagTextMapper flagTextMapper;
|
||||
|
||||
@Autowired
|
||||
private PorttypegbTextMapper porttypegbTextMapper;
|
||||
|
||||
@Autowired
|
||||
private ParticipantMapper participantMapper;
|
||||
|
||||
//@Autowired
|
||||
//private WsdlApiTest0 wsdlApiTest0;
|
||||
|
||||
@Value("${DBType}")
|
||||
public String dbType;
|
||||
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/07/20 11:02
|
||||
* @方法 inPortPage
|
||||
* @作用 查询入口流水信息列表
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/page")
|
||||
public R<IPage<InPort>> inPortPage(@RequestBody InPortDTO inPortDTO){
|
||||
|
||||
List<Long> flagList = inPortDTO.getFlagText();
|
||||
List<Long> flagListNew = new ArrayList<>();
|
||||
for (Long flag : flagList) {
|
||||
if(flag == 0){
|
||||
flagListNew.add(flag);
|
||||
}else{
|
||||
StringBuffer sbf = new StringBuffer();
|
||||
sbf = sbf.append(1);
|
||||
for(int i = 0; i < flag - 1; i++){
|
||||
sbf = sbf.append(0);
|
||||
}
|
||||
long bin2long = bin2long(sbf);
|
||||
flagListNew.add(bin2long);
|
||||
}
|
||||
}
|
||||
|
||||
//for (Long flag : flagList) {
|
||||
// if(flag == 0){
|
||||
// flagListNew.add(flag);
|
||||
// }else{
|
||||
// String s = new String();
|
||||
// s = s + 1;
|
||||
// for(int i = 0; i < flag - 1; i++){
|
||||
// s = s + 0;
|
||||
// }
|
||||
// long bin2long = bin2long(s);
|
||||
// flagListNew.add(bin2long);
|
||||
// }
|
||||
//}
|
||||
|
||||
inPortDTO.setFlagText(flagListNew);
|
||||
Page<InPort> page = new Page<>(inPortDTO.getPageNum(), inPortDTO.getPageSize());
|
||||
IPage<InPort> inPortListPage = null;
|
||||
if(dbType.equals("1")){
|
||||
inPortListPage = inPortMapper.inPortPageSQLServer(page, inPortDTO);
|
||||
}else if(dbType.equals("2")){
|
||||
inPortListPage = inPortMapper.inPortPageOracle(page, inPortDTO);
|
||||
}else if(dbType.equals("3")){
|
||||
inPortListPage = inPortMapper.inPortPageDM(page, inPortDTO);
|
||||
}else if(dbType.equals("4")){
|
||||
inPortListPage = inPortMapper.inPortPageMySQL(page, inPortDTO);
|
||||
}
|
||||
//inPortListPage = inPortMapper.inPortPage(page, inPortDTO);
|
||||
List<InPort> inPortList = inPortListPage.getRecords();
|
||||
for (InPort inPort : inPortList) {
|
||||
Long flagValue = inPort.getFlag();
|
||||
List<String> flagTextNew = getFlagText(flagValue);
|
||||
inPort.setFlagText(flagTextNew);
|
||||
}
|
||||
return R.SUCCESS(inPortListPage);
|
||||
}
|
||||
|
||||
|
||||
public long bin2long(StringBuffer binaryString){
|
||||
//public long bin2long(String binaryString){
|
||||
long sum = 0;
|
||||
for(int i = 0;i < binaryString.length();i++){
|
||||
char ch = binaryString.charAt(i);
|
||||
if(ch > '2' || ch < '0'){
|
||||
throw new NumberFormatException(String.valueOf(i));
|
||||
}
|
||||
sum = sum * 2 + (binaryString.charAt(i) - '0');
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
|
||||
public List<String> getFlagText(Long value){
|
||||
List<Integer> flagValueList = new ArrayList<>();
|
||||
if(value == 0){
|
||||
flagValueList.add(0);
|
||||
}else{
|
||||
for(int i = 1 ;i<=59;i++){
|
||||
if(isOne(value,i) == 1){
|
||||
flagValueList.add(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
return inPortMapper.getFlagText(flagValueList);
|
||||
}
|
||||
|
||||
public long isOne(long num , int n){
|
||||
return num>>(n-1) & 1 ;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author chenxudong
|
||||
* @Date 2022/08/11 15:19
|
||||
* @方法 inPortDetail
|
||||
* @作用 根据listno获取详细信息
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/inPortDetail/{listno}")
|
||||
public R inPortDetail(@PathVariable String listno){
|
||||
InPort inPort = inPortMapper.selectByListNO(listno);
|
||||
return R.SUCCESS(inPort);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/07/20 11:02
|
||||
* @方法 getImgByListNO2
|
||||
* @作用 查询图像字节码
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/javaImage")
|
||||
public byte[] getImgByListNO2(@RequestParam("listno") String listno,
|
||||
@RequestParam("transferFlag") Integer transferFlag,
|
||||
@RequestParam("imgType") String imgType
|
||||
){
|
||||
Map<String, Object> paramsMap = new HashMap<>();
|
||||
paramsMap.put("listNO",listno);
|
||||
paramsMap.put("transferFlag",transferFlag);
|
||||
paramsMap.put("imgType",imgType);
|
||||
WsdlApiTest0 wsdlApiTest0 = new WsdlApiTest0();
|
||||
String resultTest = wsdlApiTest0.toWebService("10", paramsMap);
|
||||
String[] splitValues = resultTest.split(",");
|
||||
String imageString = splitValues[1].split(":")[1].replaceAll("\\\\", "");
|
||||
byte[] parseBase64Binary = DatatypeConverter.parseBase64Binary(imageString);
|
||||
return parseBase64Binary;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/07/20 11:02
|
||||
* @方法 getImgByListNO2
|
||||
* @作用 查询图像字节码
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/image")
|
||||
public byte[] getWebServiceData(@RequestParam("listno") String listno,
|
||||
@RequestParam("transferFlag") Integer transferFlag,
|
||||
@RequestParam("imgType") String imgType
|
||||
){
|
||||
CommonService factory=new CommonService();
|
||||
CommonServiceSoap serviceSoap=factory.getCommonServiceSoap();
|
||||
Holder<byte[]> resultImageBytes=new Holder<>();
|
||||
Holder<Integer> resultFlag=new Holder<>();
|
||||
Holder<String> resultText=new Holder<>();
|
||||
serviceSoap.getImgByListNO2(listno,transferFlag,imgType,resultImageBytes,resultFlag,resultText );
|
||||
return resultImageBytes.value;
|
||||
}
|
||||
|
||||
///**
|
||||
// * @Author DragonOne
|
||||
// * @Date 2022/3/7 12:37
|
||||
// * @墨水记忆 www.tothefor.com
|
||||
// * @方法 PageitemAll
|
||||
// * @作用 物品的分页查询
|
||||
// * @参数说明
|
||||
// * @return
|
||||
// */
|
||||
//@GetMapping("/pageAll")
|
||||
//public R<IPage<ItemType>> PageItemTypeAll(@RequestParam("pageNum") Integer pageNum,
|
||||
// @RequestParam("PageSize") Integer pageSize,
|
||||
// @RequestParam(defaultValue = "") String itemname){
|
||||
//
|
||||
// IPage<ItemType> page = new Page<>(pageNum,pageSize);
|
||||
// QueryWrapper<ItemType> queryWrapper = new QueryWrapper<>();
|
||||
// if(StringUtils.hasText(itemname)){
|
||||
// queryWrapper.like("typename",itemname);
|
||||
// }
|
||||
// // queryWrapper.ne("id",1);
|
||||
// queryWrapper.orderByDesc("id");
|
||||
// return R.SUCCESS(itemTypeService.page(page, queryWrapper));
|
||||
//}
|
||||
|
||||
|
||||
|
||||
///**
|
||||
// * @Author 陈旭东
|
||||
// * @Date 2022/07/20 11:02
|
||||
// * @方法 inPortImage
|
||||
// * @作用 查询入口图片字节码
|
||||
// * @参数说明
|
||||
// * @return
|
||||
// */
|
||||
//@GetMapping("/inPortImage/{listno}")
|
||||
//public R<InPortImageDTO> inPortImage(@PathVariable String listno){
|
||||
//
|
||||
//
|
||||
// CommonService factory=new CommonService();
|
||||
// CommonServiceSoap serviceSoap=factory.getCommonServiceSoap();
|
||||
// Holder<byte[]> resultImageBytes=new Holder<>();
|
||||
// Holder<Integer> resultFlag=new Holder<>();
|
||||
// Holder<String> resultText=new Holder<>();
|
||||
//
|
||||
//
|
||||
// serviceSoap.getImgByListNO2(listno,0,"1",resultImageBytes,resultFlag,resultText );
|
||||
// InPortImageDTO inPortImageDTO = new InPortImageDTO();
|
||||
// inPortImageDTO.setResultImageBytes(resultImageBytes.value);
|
||||
// inPortImageDTO.setResultFlag(resultFlag.value);
|
||||
// inPortImageDTO.setResultText(resultText.value);
|
||||
//
|
||||
//
|
||||
// System.out.println(inPortImageDTO);
|
||||
// System.out.println(resultImageBytes.value.length);
|
||||
// System.out.println(resultFlag.value);
|
||||
// System.out.println(resultText.value);
|
||||
//
|
||||
//
|
||||
// return R.SUCCESS(inPortImageDTO);
|
||||
//}
|
||||
|
||||
///**
|
||||
// * @Author 陈旭东
|
||||
// * @Date 2022/07/27 09:10
|
||||
// * @方法 inPortImageT
|
||||
// * @作用 测试查询入口图片字节码0
|
||||
// * @参数说明
|
||||
// * @return
|
||||
// */
|
||||
//@GetMapping("/inPortImageT0")
|
||||
//public byte[] inPortImageT0(){
|
||||
// byte[] resultImageBytes = image2byte("F:\\cxd\\入口图像审计0.png");
|
||||
// //System.out.println(resultImageBytes);
|
||||
// return resultImageBytes;
|
||||
//}
|
||||
//
|
||||
//
|
||||
//
|
||||
///**
|
||||
// * @Author 陈旭东
|
||||
// * @Date 2022/07/26 21:17
|
||||
// * @方法 inPortImageT
|
||||
// * @作用 测试查询入口图片字节码
|
||||
// * @参数说明
|
||||
// * @return
|
||||
// */
|
||||
//@GetMapping("/inPortImageT")
|
||||
//public R<byte[]> inPortImageT(){
|
||||
// byte[] resultImageBytes = image2byte("F:\\cxd\\入口图像审计0.png");
|
||||
//
|
||||
//
|
||||
// //InPortImageDTO inPortImageDTO = new InPortImageDTO();
|
||||
// //inPortImageDTO.setResultImageBytes(resultImageBytes);
|
||||
// //inPortImageDTO.setResultFlag(1);
|
||||
// //inPortImageDTO.setResultText("加载图片成功");
|
||||
// //
|
||||
// //
|
||||
// //System.out.println(inPortImageDTO);
|
||||
// //System.out.println(resultImageBytes.length);
|
||||
// //System.out.println(inPortImageDTO.getResultFlag());
|
||||
// //System.out.println(inPortImageDTO.getResultText());
|
||||
// //return R.SUCCESS(inPortImageDTO);
|
||||
// R<byte[]> success = R.SUCCESS(resultImageBytes);
|
||||
// //System.out.println(success);
|
||||
// return R.SUCCESS(resultImageBytes);
|
||||
//
|
||||
//
|
||||
//}
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/07/20 11:02
|
||||
* @方法 inPortImage
|
||||
* @作用 查询入口图像字节码
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/inPortImage/{listno}")
|
||||
public byte[] inPortImage(@PathVariable String listno){
|
||||
CommonService factory=new CommonService();
|
||||
CommonServiceSoap serviceSoap=factory.getCommonServiceSoap();
|
||||
Holder<byte[]> resultImageBytes=new Holder<>();
|
||||
Holder<Integer> resultFlag=new Holder<>();
|
||||
Holder<String> resultText=new Holder<>();
|
||||
|
||||
serviceSoap.getImgByListNO2(listno,0,"1",resultImageBytes,resultFlag,resultText );
|
||||
//serviceSoap.getImgByListNO2(listno,0,"1",resultImageBytes,resultFlag,resultText );
|
||||
//InPortImageDTO inPortImageDTO = new InPortImageDTO();
|
||||
//inPortImageDTO.setResultImageBytes(resultImageBytes.value);
|
||||
//inPortImageDTO.setResultFlag(resultFlag.value);
|
||||
//inPortImageDTO.setResultText(resultText.value);
|
||||
|
||||
//System.out.println(inPortImageDTO);
|
||||
System.out.println("1:" + resultImageBytes.value.length);
|
||||
System.out.println("1:" + resultFlag.value);
|
||||
System.out.println("1:" + resultText.value);
|
||||
|
||||
return resultImageBytes.value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/07/20 11:02
|
||||
* @方法 inPortPlateImage
|
||||
* @作用 查询入口车牌识别图像字节码
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/inPortPlateImage/{listno}")
|
||||
public byte[] inPortPlateImage(@PathVariable String listno){
|
||||
CommonService factory=new CommonService();
|
||||
CommonServiceSoap serviceSoap=factory.getCommonServiceSoap();
|
||||
Holder<byte[]> resultImageBytes=new Holder<>();
|
||||
Holder<Integer> resultFlag=new Holder<>();
|
||||
Holder<String> resultText=new Holder<>();
|
||||
|
||||
serviceSoap.getImgByListNO2(listno,0,"5",resultImageBytes,resultFlag,resultText );
|
||||
//serviceSoap.getImgByListNO2(listno,0,"5",resultImageBytes,resultFlag,resultText );
|
||||
System.out.println("5:" + resultImageBytes.value.length);
|
||||
System.out.println("5:" + resultFlag.value);
|
||||
System.out.println("5:" + resultText.value);
|
||||
|
||||
return resultImageBytes.value;
|
||||
}
|
||||
|
||||
|
||||
//图片到byte数组
|
||||
public byte[] image2byte(String path){
|
||||
byte[] data = null;
|
||||
FileImageInputStream input = null;
|
||||
try {
|
||||
input = new FileImageInputStream(new File(path));
|
||||
ByteArrayOutputStream output = new ByteArrayOutputStream();
|
||||
byte[] buf = new byte[1024];
|
||||
int numBytesRead = 0;
|
||||
while ((numBytesRead = input.read(buf)) != -1) {
|
||||
output.write(buf, 0, numBytesRead);
|
||||
}
|
||||
data = output.toByteArray();
|
||||
output.close();
|
||||
input.close();
|
||||
}
|
||||
catch (FileNotFoundException ex1) {
|
||||
ex1.printStackTrace();
|
||||
}
|
||||
catch (IOException ex1) {
|
||||
ex1.printStackTrace();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/08/04 07:15
|
||||
* @方法 inPortPrintTableAll
|
||||
* @作用 查询入口全部打印流水信息数据
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/printTableAll")
|
||||
public R<List<InPort>> inPortPrintTableAll(@RequestBody InPortDTO inPortDTO){
|
||||
|
||||
List<Long> flagList = inPortDTO.getFlagText();
|
||||
List<Long> flagListNew = new ArrayList<>();
|
||||
for (Long flag : flagList) {
|
||||
if(flag == 0){
|
||||
flagListNew.add(flag);
|
||||
}else{
|
||||
StringBuffer sbf = new StringBuffer();
|
||||
sbf = sbf.append(1);
|
||||
for(int i = 0; i < flag - 1; i++){
|
||||
sbf = sbf.append(0);
|
||||
}
|
||||
long bin2long = bin2long(sbf);
|
||||
flagListNew.add(bin2long);
|
||||
}
|
||||
}
|
||||
inPortDTO.setFlagText(flagListNew);
|
||||
|
||||
List<InPort> inPortPrintTableList = null;
|
||||
|
||||
if(dbType.equals("1")){
|
||||
inPortPrintTableList = inPortMapper.inPortPageSQLServer(inPortDTO);
|
||||
}else if(dbType.equals("2")){
|
||||
inPortPrintTableList = inPortMapper.inPortPageOracle(inPortDTO);
|
||||
}else if(dbType.equals("3")){
|
||||
inPortPrintTableList = inPortMapper.inPortPageDM(inPortDTO);
|
||||
}else if(dbType.equals("4")){
|
||||
inPortPrintTableList = inPortMapper.inPortPageMySQL(inPortDTO);
|
||||
}
|
||||
|
||||
//inPortPrintTableList = inPortMapper.inPortPage(inPortDTO);
|
||||
|
||||
for (InPort inPort : inPortPrintTableList) {
|
||||
Long flagValue = inPort.getFlag();
|
||||
List<String> flagTextNew = getFlagText(flagValue);
|
||||
inPort.setFlagText(flagTextNew);
|
||||
}
|
||||
|
||||
return R.SUCCESS(inPortPrintTableList);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/08/04 07:15
|
||||
* @方法 inPortPrintTableBatch
|
||||
* @作用 查询入口批量打印流水信息数据
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/printTableBatch")
|
||||
public R<List<InPort>> inPortPrintTableBatch(@RequestBody List<String> listnos){
|
||||
List<InPort> inPortPrintTableList = inPortMapper.inPortListnosBatch(listnos);
|
||||
for (InPort inPort : inPortPrintTableList) {
|
||||
Long flagValue = inPort.getFlag();
|
||||
List<String> flagTextNew = getFlagText(flagValue);
|
||||
inPort.setFlagText(flagTextNew);
|
||||
}
|
||||
return R.SUCCESS(inPortPrintTableList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author ChenXuDong
|
||||
* @Date 2022/8/3 10:12
|
||||
* @方法 exportAll
|
||||
* @作用 数据全部导出
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/exportAll")
|
||||
public void exportAll(HttpServletRequest request, HttpServletResponse response, @RequestBody InPortDTO inPortDTO) throws Exception{
|
||||
// String token = request.getHeader("token");
|
||||
|
||||
List<Map<String, Object>> list = CollUtil.newArrayList();
|
||||
|
||||
List<InPort> all = null;
|
||||
|
||||
if(dbType.equals("1")){
|
||||
all = inPortMapper.inPortPageSQLServer(inPortDTO);
|
||||
}else if(dbType.equals("2")){
|
||||
all = inPortMapper.inPortPageOracle(inPortDTO);
|
||||
}else if(dbType.equals("3")){
|
||||
all = inPortMapper.inPortPageDM(inPortDTO);
|
||||
}else if(dbType.equals("4")){
|
||||
all = inPortMapper.inPortPageMySQL(inPortDTO);
|
||||
}
|
||||
//all = inPortMapper.inPortPage(inPortDTO);
|
||||
for(InPort inPort : all){
|
||||
Map<String, Object> row1 = new LinkedHashMap<>();
|
||||
row1.put("流水号",inPort.getListno());
|
||||
row1.put("路段",inPort.getRoadName());
|
||||
row1.put("收费站",inPort.getStaName());
|
||||
row1.put("车道",inPort.getPortno());
|
||||
row1.put("班次",inPort.getClassNoText());
|
||||
row1.put("统计日期",inPort.getClassdate());
|
||||
row1.put("操作时间",inPort.getDt());
|
||||
row1.put("工号",inPort.getManno());
|
||||
row1.put("姓名",inPort.getMan());
|
||||
row1.put("卡印刷号",inPort.getCardno());
|
||||
row1.put("卡类型",inPort.getCardtpText());
|
||||
row1.put("车种",inPort.getKindText());
|
||||
row1.put("车型",inPort.getTypeText());
|
||||
row1.put("轴数",inPort.getAxiscount());
|
||||
row1.put("实际重量(千克)",inPort.getBackup2());
|
||||
row1.put("折后重量(千克)",inPort.getBackup3());
|
||||
row1.put("事件",inPort.getFlagText());
|
||||
row1.put("识别车牌",inPort.getCarNoNew());
|
||||
row1.put("实际车牌",inPort.getAcarno());
|
||||
row1.put("支付卡余额",inPort.getPayCardCashT());
|
||||
row1.put("发行方",inPort.getBriefName());
|
||||
list.add(row1);
|
||||
}
|
||||
// 2. 写excel
|
||||
ExcelWriter writer = ExcelUtil.getWriter(true);
|
||||
writer.write(list, true);
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8");
|
||||
String fileName = URLEncoder.encode("下载信息", "UTF-8");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx");
|
||||
ServletOutputStream out = response.getOutputStream();
|
||||
writer.flush(out, true);
|
||||
writer.close();
|
||||
IoUtil.close(System.out);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author ChenXuDong
|
||||
* @Date 2022/8/3 10:12
|
||||
* @方法 exportBatch
|
||||
* @作用 数据批量导出
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/exportBatch")
|
||||
public void exportBatch(HttpServletRequest request, HttpServletResponse response, @RequestBody List<String> listnos) throws Exception{
|
||||
// String token = request.getHeader("token");
|
||||
List<Map<String, Object>> list = CollUtil.newArrayList();
|
||||
List<InPort> all = null;
|
||||
all = inPortMapper.inPortListnosBatch(listnos);
|
||||
for(InPort inPort : all){
|
||||
Map<String, Object> row1 = new LinkedHashMap<>();
|
||||
row1.put("流水号",inPort.getListno());
|
||||
row1.put("路段",inPort.getRoadName());
|
||||
row1.put("收费站",inPort.getStaName());
|
||||
row1.put("车道",inPort.getPortno());
|
||||
row1.put("班次",inPort.getClassNoText());
|
||||
row1.put("统计日期",inPort.getClassdate());
|
||||
row1.put("操作时间",inPort.getDt());
|
||||
row1.put("工号",inPort.getManno());
|
||||
row1.put("姓名",inPort.getMan());
|
||||
row1.put("卡印刷号",inPort.getCardno());
|
||||
row1.put("卡类型",inPort.getCardtpText());
|
||||
row1.put("车种",inPort.getKindText());
|
||||
row1.put("车型",inPort.getTypeText());
|
||||
row1.put("轴数",inPort.getAxiscount());
|
||||
row1.put("实际重量(千克)",inPort.getBackup2());
|
||||
row1.put("折后重量(千克)",inPort.getBackup3());
|
||||
row1.put("事件",inPort.getFlagText());
|
||||
row1.put("识别车牌",inPort.getCarNoNew());
|
||||
row1.put("实际车牌",inPort.getAcarno());
|
||||
row1.put("支付卡余额",inPort.getPayCardCashT());
|
||||
row1.put("发行方",inPort.getBriefName());
|
||||
|
||||
list.add(row1);
|
||||
}
|
||||
|
||||
// 2. 写excel
|
||||
ExcelWriter writer = ExcelUtil.getWriter(true);
|
||||
writer.write(list, true);
|
||||
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8");
|
||||
String fileName = URLEncoder.encode("下载信息", "UTF-8");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx");
|
||||
|
||||
ServletOutputStream out = response.getOutputStream();
|
||||
writer.flush(out, true);
|
||||
writer.close();
|
||||
IoUtil.close(System.out);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
import com.cxds.imageaudit.pojo.vo.InitVO;
|
||||
import com.cxds.imageaudit.resultR.R;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2022-11-03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/init")
|
||||
public class InitController {
|
||||
|
||||
@Value("${spring.application.verion}")
|
||||
public String version;
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/10/07 18:03
|
||||
* @方法 carpunishinfoPrintList
|
||||
* @作用 查询入口打印流水信息数据
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/initFirst")
|
||||
public R<InitVO> getInit(){
|
||||
|
||||
InitVO initVO = new InitVO();
|
||||
initVO.setVersion(version);
|
||||
|
||||
return R.SUCCESS(initVO);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
import com.cxds.imageaudit.mapper.KindTextMapper;
|
||||
import com.cxds.imageaudit.pojo.entity.KindText;
|
||||
import com.cxds.imageaudit.resultR.R;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2022-07-13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/kindType")
|
||||
public class KindTextController {
|
||||
|
||||
@Autowired
|
||||
private KindTextMapper kindTextMapper;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/07/07 09:35
|
||||
* @方法 kindTypeAll
|
||||
* @作用 查询车种全部类型
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/kindTypeAll")
|
||||
public R<List<KindText>> kindTypeAll(){
|
||||
List<KindText> kindType = kindTextMapper.selectList(null);
|
||||
//System.out.println("陈旭东:"+kindType);
|
||||
return R.SUCCESS(kindType);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
import com.cxds.imageaudit.mapper.MediatypeTextMapper;
|
||||
import com.cxds.imageaudit.pojo.entity.MediatypeText;
|
||||
import com.cxds.imageaudit.resultR.R;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2022-07-28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mediaType")
|
||||
public class MediatypeTextController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private MediatypeTextMapper mediatypeTextMapper;
|
||||
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/07/07 09:49
|
||||
* @方法 provinceNameTypeAll
|
||||
* @作用 查询介质类型全部类型
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/mediaTypeAll")
|
||||
public R<List<MediatypeText>> mediaTypeAll(){
|
||||
List<MediatypeText> mediaType = mediatypeTextMapper.selectList(null);
|
||||
return R.SUCCESS(mediaType);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,112 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.cxds.imageaudit.mapper.NameTableMapper;
|
||||
import com.cxds.imageaudit.pojo.entity.NameTable;
|
||||
import com.cxds.imageaudit.resultR.R;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2022-07-13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/nameType")
|
||||
public class NameTableController {
|
||||
|
||||
@Autowired
|
||||
private NameTableMapper nameTableMapper;
|
||||
|
||||
@Value("${RoadNO}")
|
||||
public String roadNO;
|
||||
|
||||
@Value("${UserStaNO}")
|
||||
public String staNO;
|
||||
|
||||
/**
|
||||
* @Author ChenXuDong
|
||||
* @Date 2022/07/07 09:17
|
||||
* @方法 nameTypeAllSelected
|
||||
* @作用 查询站名类型
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/nameTypeAllSelected")
|
||||
public R<List<NameTable>> nameTypeAllSelected(
|
||||
@RequestParam(value = "roadname", required = false) String roadname){
|
||||
|
||||
QueryWrapper<NameTable> queryWrapper = new QueryWrapper<>();
|
||||
|
||||
if(roadNO != null && roadNO.length() != 0){
|
||||
Integer roadNOInteger = Integer.valueOf(roadNO);
|
||||
queryWrapper.eq("roadno",roadNOInteger);
|
||||
}
|
||||
if(staNO != null && staNO.length() != 0){
|
||||
Integer staNOInteger = Integer.valueOf(staNO);
|
||||
queryWrapper.eq("STANO",staNOInteger);
|
||||
}
|
||||
if(roadname != "" && roadname != null){
|
||||
if(roadname.equals("高路公司(10)")){
|
||||
queryWrapper.eq("roadno",10);
|
||||
//queryWrapper.eq("roadname","高路公司");
|
||||
}else if(roadname.equals("高路公司(15)")){
|
||||
queryWrapper.eq("roadno",15);
|
||||
//queryWrapper.eq("roadname","高路公司");
|
||||
}else{
|
||||
queryWrapper.eq("roadname",roadname);
|
||||
}
|
||||
}
|
||||
List<NameTable> nameType = nameTableMapper.selectList(queryWrapper);
|
||||
return R.SUCCESS(nameType);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author ChenXuDong
|
||||
* @Date 2022/07/07 09:17
|
||||
* @方法 roadNameNameTypeAll
|
||||
* @作用 查询所属路段站名全部类型
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/roadNameNameTypeAll")
|
||||
public R<List<NameTable>> roadNameNameTypeAll(
|
||||
@RequestParam(value = "roadname", required = false) String roadname){
|
||||
QueryWrapper<NameTable> queryWrapper = new QueryWrapper<>();
|
||||
if(roadname != "" && roadname != null){
|
||||
if(roadname.equals("高路公司(10)")){
|
||||
queryWrapper.eq("roadno",10);
|
||||
//queryWrapper.eq("roadname","高路公司");
|
||||
}else if(roadname.equals("高路公司(15)")){
|
||||
queryWrapper.eq("roadno",15);
|
||||
//queryWrapper.eq("roadname","高路公司");
|
||||
}else{
|
||||
queryWrapper.eq("roadname",roadname);
|
||||
}
|
||||
}
|
||||
List<NameTable> nameType = nameTableMapper.selectList(queryWrapper);
|
||||
return R.SUCCESS(nameType);
|
||||
}
|
||||
|
||||
@GetMapping("/roadNoNameTypeAll")
|
||||
public R<List<NameTable>> roadNoNameTypeAll(
|
||||
@RequestParam(defaultValue = "0") Integer roadno){
|
||||
QueryWrapper<NameTable> queryWrapper = new QueryWrapper<>();
|
||||
if(roadno != 0){
|
||||
queryWrapper.eq("roadno",roadno);
|
||||
}
|
||||
List<NameTable> nameType = nameTableMapper.selectList(queryWrapper);
|
||||
return R.SUCCESS(nameType);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,668 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.poi.excel.ExcelUtil;
|
||||
import cn.hutool.poi.excel.ExcelWriter;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.cxds.imageaudit.mapper.OutPortMapper;
|
||||
import com.cxds.imageaudit.myjavawebservices.WsdlApiTest0;
|
||||
import com.cxds.imageaudit.mywebservices.CommonService;
|
||||
import com.cxds.imageaudit.mywebservices.CommonServiceSoap;
|
||||
import com.cxds.imageaudit.pojo.dto.InPortDTO;
|
||||
import com.cxds.imageaudit.pojo.dto.OutPortDTO;
|
||||
import com.cxds.imageaudit.pojo.entity.InPort;
|
||||
import com.cxds.imageaudit.pojo.entity.OutPort;
|
||||
import com.cxds.imageaudit.pojo.entity.Tjjg;
|
||||
import com.cxds.imageaudit.pojo.vo.OutPortVO;
|
||||
import com.cxds.imageaudit.pojo.vo.SplitProvince;
|
||||
import com.cxds.imageaudit.resultR.R;
|
||||
import com.cxds.imageaudit.service.IOutPortService;
|
||||
import com.cxds.imageaudit.utils.CommonUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.xml.bind.DatatypeConverter;
|
||||
import javax.xml.ws.Holder;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2022-07-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/outPort")
|
||||
public class OutPortController {
|
||||
|
||||
@Autowired
|
||||
private OutPortMapper outPortMapper;
|
||||
|
||||
@Autowired
|
||||
private IOutPortService iOutPortService;
|
||||
|
||||
//@Autowired
|
||||
//OutPortServiceImpl outPortServiceImpl;
|
||||
|
||||
@Value("${DBType}")
|
||||
public String dbType;
|
||||
|
||||
@Autowired
|
||||
private CommonUtils commonUtils;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author chenxudong
|
||||
* @Date 2022/09/07 17:40
|
||||
* @方法 outPortDetail
|
||||
* @作用 根据listno获取详细信息
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getVehicleSignIdInPortFromPassId")
|
||||
public R<String> getVehicleSignIdInPortFromPassId(@RequestParam("passId") String passId){
|
||||
String vehicleSignIdInPort = commonUtils.getVehicleSignIdInPortFromPassId("VEHICLESIGNID",passId,"1");
|
||||
return R.SUCCESS(vehicleSignIdInPort);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/07/20 11:02
|
||||
* @方法 outPortPage
|
||||
* @作用 查询入口流水信息列表
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/page")
|
||||
public R<IPage<OutPortVO>> outPortPage(@RequestBody OutPortDTO outPortDTO){
|
||||
List<Long> flagList = outPortDTO.getFlagText();
|
||||
List<Long> flagListNew = new ArrayList<>();
|
||||
for (Long flag : flagList) {
|
||||
if(flag == 0){
|
||||
flagListNew.add(flag);
|
||||
}else{
|
||||
StringBuffer sbf = new StringBuffer();
|
||||
sbf = sbf.append(1);
|
||||
for(int i = 0; i < flag - 1; i++){
|
||||
sbf = sbf.append(0);
|
||||
}
|
||||
long bin2long = bin2long(sbf);
|
||||
flagListNew.add(bin2long);
|
||||
}
|
||||
}
|
||||
//for (Long flag : flagList) {
|
||||
// if(flag == 0){
|
||||
// flagListNew.add(flag);
|
||||
// }else{
|
||||
// String s = new String();
|
||||
// s = s + 1;
|
||||
// for(int i = 0; i < flag - 1; i++){
|
||||
// s = s + 0;
|
||||
// }
|
||||
// long bin2long = bin2long(s);
|
||||
// flagListNew.add(bin2long);
|
||||
// }
|
||||
//}
|
||||
outPortDTO.setFlagText(flagListNew);
|
||||
Page<OutPortVO> page = new Page<>(outPortDTO.getPageNum(), outPortDTO.getPageSize());
|
||||
IPage<OutPortVO> outPortListPage = null;
|
||||
if(flagList.contains(12L)){
|
||||
if(dbType.equals("1")){
|
||||
List<String> listnos = outPortMapper.getIlistnosSQLServer(outPortDTO);
|
||||
outPortListPage = outPortMapper.outPortIlistnosBatch(page, outPortDTO, listnos);
|
||||
}else if(dbType.equals("2")){
|
||||
List<String> listnos = outPortMapper.getIlistnosOracle(outPortDTO);
|
||||
outPortListPage = outPortMapper.outPortIlistnosBatch(page, outPortDTO, listnos);
|
||||
}else if(dbType.equals("3")){
|
||||
List<String> listnos = outPortMapper.getIlistnosDM(outPortDTO);
|
||||
outPortListPage = outPortMapper.outPortIlistnosBatch(page, outPortDTO, listnos);
|
||||
}else if(dbType.equals("4")){
|
||||
List<String> listnos = outPortMapper.getIlistnosMySQL(outPortDTO);
|
||||
outPortListPage = outPortMapper.outPortIlistnosBatch(page, outPortDTO, listnos);
|
||||
}
|
||||
}else{
|
||||
if(dbType.equals("1")){
|
||||
outPortListPage = outPortMapper.outPortPageSQLServer(page, outPortDTO);
|
||||
}else if(dbType.equals("2")){
|
||||
outPortListPage = outPortMapper.outPortPageOracle(page, outPortDTO);
|
||||
}else if(dbType.equals("3")){
|
||||
outPortListPage = outPortMapper.outPortPageDM(page, outPortDTO);
|
||||
}else if(dbType.equals("4")){
|
||||
outPortListPage = outPortMapper.outPortPageMySQL(page, outPortDTO);
|
||||
}
|
||||
}
|
||||
|
||||
//outPortListPage = outPortMapper.outPortPage(page, outPortDTO);
|
||||
|
||||
List<OutPortVO> outPortList = outPortListPage.getRecords();
|
||||
for (OutPortVO outPort : outPortList) {
|
||||
Long flagValue = outPort.getFlag();
|
||||
List<String> flagTextNew = getFlagText(flagValue);
|
||||
outPort.setFlagText(flagTextNew);
|
||||
List<SplitProvince> splitProvinceList = JSONObject.parseArray(outPort.getSplitProvince(), SplitProvince.class);
|
||||
StringBuilder splitProvinceT = new StringBuilder();
|
||||
//String passId = outPort.getPassId();
|
||||
//String vehicleSignIdInPort = commonUtils.getVehicleSignIdInPortFromPassId("VEHICLESIGNID",passId,"1");
|
||||
//outPort.setVehicleSignIdInPort(vehicleSignIdInPort);
|
||||
if(splitProvinceList != null && splitProvinceList.size() > 0){
|
||||
for(SplitProvince splitProvince : splitProvinceList){
|
||||
String serProvinceId = splitProvince.getSerProvinceId();
|
||||
String substring = serProvinceId.substring(0, 2);
|
||||
String provinceName = commonUtils.getProvinceName(Integer.valueOf(substring));
|
||||
String splitProvince1 = "省份:" + provinceName + ",金额:" + String.format("%.2f", (splitProvince.getTollFee() / 100));
|
||||
splitProvinceT = splitProvinceT.append(splitProvince1).append("\n");
|
||||
}
|
||||
outPort.setSplitProvinceT(splitProvinceT);
|
||||
}
|
||||
//String ilistno = outPort.getIlistno();
|
||||
//String vehicleSignIdInPort = getvehicleSignIdInPort(ilistno);
|
||||
//outPort.setVehicleSignIdInPort(vehicleSignIdInPort);
|
||||
}
|
||||
return R.SUCCESS(outPortListPage);
|
||||
}
|
||||
|
||||
public String getvehicleSignIdInPort(String ilistno){
|
||||
return outPortMapper.getvehicleSignIdInPort(ilistno);
|
||||
}
|
||||
|
||||
public long bin2long(StringBuffer binaryString){
|
||||
//public long bin2long(String binaryString){
|
||||
long sum = 0;
|
||||
for(int i = 0;i < binaryString.length();i++){
|
||||
char ch = binaryString.charAt(i);
|
||||
if(ch > '2' || ch < '0'){
|
||||
throw new NumberFormatException(String.valueOf(i));
|
||||
}
|
||||
sum = sum * 2 + (binaryString.charAt(i) - '0');
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
|
||||
public List<String> getFlagText(Long value){
|
||||
List<Integer> flagValueList = new ArrayList<>();
|
||||
if(value == 0){
|
||||
flagValueList.add(0);
|
||||
}else{
|
||||
for(int i = 1 ;i<=59;i++){
|
||||
if(isOne(value,i) == 1){
|
||||
flagValueList.add(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
return outPortMapper.getFlagText(flagValueList);
|
||||
}
|
||||
|
||||
public long isOne(long num , int n){
|
||||
return num>>(n-1) & 1 ;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/08/08 14:15
|
||||
* @方法 printTableAll
|
||||
* @作用 查询出口打印流水信息数据
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/printTableAll")
|
||||
public R<List<OutPort>> outPortPrintTableAll(@RequestBody OutPortDTO outPortDTO){
|
||||
|
||||
List<Long> flagList = outPortDTO.getFlagText();
|
||||
List<Long> flagListNew = new ArrayList<>();
|
||||
for (Long flag : flagList) {
|
||||
if(flag == 0){
|
||||
flagListNew.add(flag);
|
||||
}else{
|
||||
StringBuffer sbf = new StringBuffer();
|
||||
sbf = sbf.append(1);
|
||||
for(int i = 0; i < flag - 1; i++){
|
||||
sbf = sbf.append(0);
|
||||
}
|
||||
long bin2long = bin2long(sbf);
|
||||
flagListNew.add(bin2long);
|
||||
}
|
||||
}
|
||||
outPortDTO.setFlagText(flagListNew);
|
||||
|
||||
List<OutPort> outPortPrintTableList = null;
|
||||
|
||||
if(dbType.equals("1")){
|
||||
outPortPrintTableList = outPortMapper.outPortPageSQLServerPrintAndExport(outPortDTO);
|
||||
}else if(dbType.equals("2")){
|
||||
outPortPrintTableList = outPortMapper.outPortPageOraclePrintAndExport(outPortDTO);
|
||||
}else if(dbType.equals("3")){
|
||||
outPortPrintTableList = outPortMapper.outPortPageDMPrintAndExport(outPortDTO);
|
||||
}else if(dbType.equals("4")){
|
||||
outPortPrintTableList = outPortMapper.outPortPageMySQLPrintAndExport(outPortDTO);
|
||||
}
|
||||
|
||||
//outPortPrintTableList = outPortMapper.outPortPage(outPortDTO);
|
||||
|
||||
for (OutPort outPort : outPortPrintTableList) {
|
||||
Long flagValue = outPort.getFlag();
|
||||
List<String> flagTextNew = getFlagText(flagValue);
|
||||
outPort.setFlagText(flagTextNew);
|
||||
}
|
||||
|
||||
return R.SUCCESS(outPortPrintTableList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/08/04 07:15
|
||||
* @方法 inPortPrintTableBatch
|
||||
* @作用 查询入口批量打印流水信息数据
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/printTableBatch")
|
||||
public R<List<OutPortVO>> inPortPrintTableBatch(@RequestBody List<String> listnos){
|
||||
List<OutPortVO> outPortPrintTableList = outPortMapper.outPortListnosBatch(listnos);
|
||||
for (OutPortVO outPort : outPortPrintTableList) {
|
||||
Long flagValue = outPort.getFlag();
|
||||
List<String> flagTextNew = getFlagText(flagValue);
|
||||
outPort.setFlagText(flagTextNew);
|
||||
}
|
||||
return R.SUCCESS(outPortPrintTableList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/08/16 15:04
|
||||
* @方法 tjjg
|
||||
* @作用 查询出口统计结果信息数据
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/tjjg")
|
||||
public R<Tjjg> tjjg(@RequestBody OutPortDTO outPortDTO){
|
||||
|
||||
List<Long> flagList = outPortDTO.getFlagText();
|
||||
List<Long> flagListNew = new ArrayList<>();
|
||||
for (Long flag : flagList) {
|
||||
if(flag == 0){
|
||||
flagListNew.add(flag);
|
||||
}else{
|
||||
StringBuffer sbf = new StringBuffer();
|
||||
sbf = sbf.append(1);
|
||||
for(int i = 0; i < flag - 1; i++){
|
||||
sbf = sbf.append(0);
|
||||
}
|
||||
long bin2long = bin2long(sbf);
|
||||
flagListNew.add(bin2long);
|
||||
}
|
||||
}
|
||||
//for (Long flag : flagList) {
|
||||
// if(flag == 0){
|
||||
// flagListNew.add(flag);
|
||||
// }else{
|
||||
// String s = new String();
|
||||
// s = s + 1;
|
||||
// for(int i = 0; i < flag - 1; i++){
|
||||
// s = s + 0;
|
||||
// }
|
||||
// long bin2long = bin2long(s);
|
||||
// flagListNew.add(bin2long);
|
||||
// }
|
||||
//}
|
||||
outPortDTO.setFlagText(flagListNew);
|
||||
Tjjg tjjg = null;
|
||||
//Page<OutPortVO> page = new Page<>(outPortDTO.getPageNum(), outPortDTO.getPageSize());
|
||||
//IPage<OutPortVO> outPortListPage = null;
|
||||
if(flagList.contains(12L)){
|
||||
if(dbType.equals("1")){
|
||||
List<String> listnos = outPortMapper.getIlistnosSQLServer(outPortDTO);
|
||||
//System.out.println("陈旭东listnos:" + listnos);
|
||||
tjjg = outPortMapper.tjjgIlistnosBatchSQLServer( outPortDTO, listnos);
|
||||
}else if(dbType.equals("2")){
|
||||
List<String> listnos = outPortMapper.getIlistnosOracle(outPortDTO);
|
||||
tjjg = outPortMapper.tjjgIlistnosBatchOracle(outPortDTO, listnos);
|
||||
}else if(dbType.equals("3")){
|
||||
List<String> listnos = outPortMapper.getIlistnosDM(outPortDTO);
|
||||
tjjg = outPortMapper.tjjgIlistnosBatchDM(outPortDTO, listnos);
|
||||
}else if(dbType.equals("4")){
|
||||
List<String> listnos = outPortMapper.getIlistnosMySQL(outPortDTO);
|
||||
tjjg = outPortMapper.tjjgIlistnosBatchMySQL(outPortDTO, listnos);
|
||||
}
|
||||
}else{
|
||||
if(dbType.equals("1")){
|
||||
tjjg = outPortMapper.tjjgSQLServer(outPortDTO);
|
||||
}else if(dbType.equals("2")){
|
||||
tjjg = outPortMapper.tjjgOracle(outPortDTO);
|
||||
}else if(dbType.equals("3")){
|
||||
tjjg = outPortMapper.tjjgDM(outPortDTO);
|
||||
}else if(dbType.equals("4")){
|
||||
tjjg = outPortMapper.tjjgMySQL(outPortDTO);
|
||||
}
|
||||
//if(dbType.equals("1")){
|
||||
// outPortListPage = outPortMapper.outPortPageSQLServer(page, outPortDTO);
|
||||
//}else if(dbType.equals("2")){
|
||||
// outPortListPage = outPortMapper.outPortPageOracle(page, outPortDTO);
|
||||
//}else if(dbType.equals("3")){
|
||||
// outPortListPage = outPortMapper.outPortPageDM(page, outPortDTO);
|
||||
//}else if(dbType.equals("4")){
|
||||
// outPortListPage = outPortMapper.outPortPageMySQL(page, outPortDTO);
|
||||
//}
|
||||
}
|
||||
|
||||
//Tjjg tjjg = null;
|
||||
//
|
||||
//if(dbType.equals("1")){
|
||||
// tjjg = outPortMapper.tjjgSQLServer(outPortDTO);
|
||||
//}else if(dbType.equals("2")){
|
||||
// tjjg = outPortMapper.tjjgOracle(outPortDTO);
|
||||
//}else if(dbType.equals("3")){
|
||||
// tjjg = outPortMapper.tjjgDM(outPortDTO);
|
||||
//}else if(dbType.equals("4")){
|
||||
// tjjg = outPortMapper.tjjgMySQL(outPortDTO);
|
||||
//}
|
||||
|
||||
//Tjjg tjjg = outPortMapper.tjjg(outPortDTO);
|
||||
|
||||
return R.SUCCESS(tjjg);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Author chenxudong
|
||||
* @Date 2022/09/07 17:40
|
||||
* @方法 outPortDetail
|
||||
* @作用 根据listno获取详细信息
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/outPortDetail/{listno}")
|
||||
public R outPortDetail(@PathVariable String listno){
|
||||
OutPort outPort = outPortMapper.selectByListNO(listno);
|
||||
return R.SUCCESS(outPort);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author ChenXuDong
|
||||
* @Date 2022/8/3 10:12
|
||||
* @方法 exportAll
|
||||
* @作用 数据全部导出
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/exportAll")
|
||||
public void export(HttpServletRequest request, HttpServletResponse response, @RequestBody OutPortDTO outPortDTO) throws Exception{
|
||||
// String token = request.getHeader("token");
|
||||
|
||||
List<Map<String, Object>> list = CollUtil.newArrayList();
|
||||
|
||||
List<OutPort> all = null;
|
||||
|
||||
if(dbType.equals("1")){
|
||||
all = outPortMapper.outPortPageSQLServerPrintAndExport(outPortDTO);
|
||||
}else if(dbType.equals("2")){
|
||||
all = outPortMapper.outPortPageOraclePrintAndExport(outPortDTO);
|
||||
}else if(dbType.equals("3")){
|
||||
all = outPortMapper.outPortPageDMPrintAndExport(outPortDTO);
|
||||
}else if(dbType.equals("4")){
|
||||
all = outPortMapper.outPortPageMySQLPrintAndExport(outPortDTO);
|
||||
}
|
||||
|
||||
//all = inPortMapper.inPortPage(inPortDTO);
|
||||
|
||||
for(OutPort outPort : all){
|
||||
Map<String, Object> row1 = new LinkedHashMap<>();
|
||||
row1.put("流水号",outPort.getListno());
|
||||
row1.put("路段",outPort.getRoadName());
|
||||
row1.put("收费站",outPort.getStaName());
|
||||
row1.put("车道",outPort.getPortno());
|
||||
row1.put("班次",outPort.getClassNoText());
|
||||
row1.put("统计日期",outPort.getClassdate());
|
||||
row1.put("操作时间",outPort.getDt());
|
||||
row1.put("工号",outPort.getManno());
|
||||
row1.put("姓名",outPort.getMan());
|
||||
row1.put("卡印刷号",outPort.getCardno());
|
||||
row1.put("卡类型",outPort.getCardtpText());
|
||||
row1.put("车种",outPort.getKindText());
|
||||
row1.put("车型",outPort.getTypeText());
|
||||
row1.put("轴数",outPort.getAxiscount());
|
||||
row1.put("实际重量(千克)",outPort.getBackup2());
|
||||
row1.put("折后重量(千克)",outPort.getBackup3());
|
||||
row1.put("事件",outPort.getFlagText());
|
||||
row1.put("识别车牌",outPort.getCarNoNew());
|
||||
row1.put("实际车牌",outPort.getAcarno());
|
||||
row1.put("支付卡余额",outPort.getPayCardCashT());
|
||||
row1.put("发行方",outPort.getBriefName());
|
||||
|
||||
list.add(row1);
|
||||
}
|
||||
|
||||
// 2. 写excel
|
||||
ExcelWriter writer = ExcelUtil.getWriter(true);
|
||||
writer.write(list, true);
|
||||
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8");
|
||||
String fileName = URLEncoder.encode("下载信息", "UTF-8");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx");
|
||||
|
||||
ServletOutputStream out = response.getOutputStream();
|
||||
writer.flush(out, true);
|
||||
writer.close();
|
||||
IoUtil.close(System.out);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author ChenXuDong
|
||||
* @Date 2022/8/3 10:12
|
||||
* @方法 exportBatch
|
||||
* @作用 数据全部导出
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/exportBatch")
|
||||
public void export(HttpServletRequest request, HttpServletResponse response, @RequestBody List<String> listnos) throws Exception{
|
||||
// String token = request.getHeader("token");
|
||||
|
||||
List<Map<String, Object>> list = CollUtil.newArrayList();
|
||||
List<OutPortVO> all = null;
|
||||
all = outPortMapper.outPortListnosBatch(listnos);
|
||||
for(OutPortVO outPort : all){
|
||||
Map<String, Object> row1 = new LinkedHashMap<>();
|
||||
row1.put("流水号",outPort.getListno());
|
||||
row1.put("路段",outPort.getRoadName());
|
||||
row1.put("收费站",outPort.getStaName());
|
||||
row1.put("车道",outPort.getPortno());
|
||||
row1.put("班次",outPort.getClassNoText());
|
||||
row1.put("统计日期",outPort.getClassdate());
|
||||
row1.put("操作时间",outPort.getDt());
|
||||
row1.put("工号",outPort.getManno());
|
||||
row1.put("姓名",outPort.getMan());
|
||||
row1.put("卡印刷号",outPort.getCardno());
|
||||
row1.put("卡类型",outPort.getCardtpText());
|
||||
row1.put("车种",outPort.getKindText());
|
||||
row1.put("车型",outPort.getTypeText());
|
||||
row1.put("轴数",outPort.getAxiscount());
|
||||
row1.put("实际重量(千克)",outPort.getBackup2());
|
||||
row1.put("折后重量(千克)",outPort.getBackup3());
|
||||
row1.put("事件",outPort.getFlagText());
|
||||
row1.put("识别车牌",outPort.getCarNoNew());
|
||||
row1.put("实际车牌",outPort.getAcarno());
|
||||
row1.put("支付卡余额",outPort.getPayCardCashT());
|
||||
row1.put("发行方",outPort.getBriefName());
|
||||
|
||||
list.add(row1);
|
||||
}
|
||||
|
||||
// 2. 写excel
|
||||
ExcelWriter writer = ExcelUtil.getWriter(true);
|
||||
writer.write(list, true);
|
||||
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8");
|
||||
String fileName = URLEncoder.encode("下载信息", "UTF-8");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx");
|
||||
|
||||
ServletOutputStream out = response.getOutputStream();
|
||||
writer.flush(out, true);
|
||||
writer.close();
|
||||
IoUtil.close(System.out);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
///**
|
||||
// * @Author 陈旭东
|
||||
// * @Date 2022/07/07 09:23
|
||||
// * @方法 portNoTypeAll
|
||||
// * @作用 查询出口车道下拉类型
|
||||
// * @参数说明
|
||||
// * @return
|
||||
// */
|
||||
//@GetMapping("/portNoTypeAll")
|
||||
//public R<List<Integer>> portNoTypeAll(){
|
||||
// //车道
|
||||
// List<Integer> portNoType = outPortMapper.portNoTypeAll();
|
||||
// System.out.println("陈旭东:"+portNoType);
|
||||
// return R.SUCCESS(portNoType);
|
||||
//}
|
||||
//
|
||||
///**
|
||||
// * @Author 陈旭东
|
||||
// * @Date 2022/07/07 09:57
|
||||
// * @方法 manNOTypeAll
|
||||
// * @作用 查询出口收费员工号下拉类型
|
||||
// * @参数说明
|
||||
// * @return
|
||||
// */
|
||||
//@GetMapping("/manNOTypeAll")
|
||||
//public R<List<Integer>> manNOTypeAll(){
|
||||
// //收费员工号
|
||||
// List<Integer> manNOType = outPortMapper.manNOTypeAll();
|
||||
// System.out.println("陈旭东:"+manNOType);
|
||||
// return R.SUCCESS(manNOType);
|
||||
//}
|
||||
//
|
||||
///**
|
||||
// * @Author 陈旭东
|
||||
// * @Date 2022/07/07 09:28
|
||||
// * @方法 portNoTypeAll
|
||||
// * @作用 查询出口收费员姓名下拉类型
|
||||
// * @参数说明
|
||||
// * @return
|
||||
// */
|
||||
//@GetMapping("/manTypeAll")
|
||||
//public R<List<String>> manTypeAll(){
|
||||
// //收费员姓名
|
||||
// List<String> manType = outPortMapper.manTypeAll();
|
||||
// System.out.println("陈旭东:"+manType);
|
||||
// return R.SUCCESS(manType);
|
||||
//}
|
||||
//
|
||||
//
|
||||
///**
|
||||
// * @Author 陈旭东
|
||||
// * @Date 2022/07/20 11:02
|
||||
// * @方法 outPortType
|
||||
// * @作用 查询入口下拉类型
|
||||
// * @参数说明
|
||||
// * @return
|
||||
// */
|
||||
//@GetMapping("/outPortType")
|
||||
//public R<OutPortTypeDTO> outPortType(){
|
||||
// //入口省份
|
||||
// List<ProvinceText> provinceNameType = provinceTextMapper.selectList(null);
|
||||
// //本省路段
|
||||
// List<RoadTable> iroadType = roadTableMapper.selectList(null);
|
||||
// for (RoadTable rT : iroadType) {
|
||||
// if(rT.getRoadno() == 10){
|
||||
// rT.setRoadname("高路公司(10)");
|
||||
// }
|
||||
// if(rT.getRoadno() == 15){
|
||||
// rT.setRoadname("高路公司(15)");
|
||||
// }
|
||||
// }
|
||||
// //本省站名
|
||||
// List<NameTable> inameType = nameTableMapper.selectList(null);
|
||||
//
|
||||
// //入口车型
|
||||
// List<TypeText> itypeType = typeTextMapper.selectList(null);
|
||||
//
|
||||
//
|
||||
//
|
||||
// //车道
|
||||
// List<Integer> portNoType = outPortMapper.portNoTypeAll();
|
||||
// //收费班次
|
||||
// List<ClassnoText> classnoType = classnoTextMapper.selectList(null);
|
||||
//
|
||||
//
|
||||
// //收费员工号
|
||||
// List<Integer> manNOType = outPortMapper.manNOTypeAll();
|
||||
//
|
||||
//
|
||||
// //收费员姓名
|
||||
// List<String> manType = outPortMapper.manTypeAll();
|
||||
// //卡类型
|
||||
// List<CardtpText> cardtpType = cardtpTextMapper.selectList(null);
|
||||
// //车型
|
||||
// List<TypeText> typeType = typeTextMapper.selectList(null);
|
||||
// //车种
|
||||
// List<KindText> kindType = kindTextMapper.selectList(null);
|
||||
// //事件
|
||||
// List<FlagText> flagType = flagTextMapper.selectList(null);
|
||||
// //出口车道类型
|
||||
// List<PorttypegbText> porttypegbType = porttypegbTextMapper.selectList(null);
|
||||
// //计费方式
|
||||
// List<ExitfeetypeText> exitfeeType = exitfeetypeTextMapper.selectList(null);
|
||||
// //发行方
|
||||
// List<Participant> briefFullNameType = participantMapper.briefFullNameTypeAll();
|
||||
// //支付方式
|
||||
// List<PaytypeText> payType = paytypeTextMapper.selectList(null);
|
||||
//
|
||||
// // 入口条件下拉
|
||||
// OutPortTypeDTO outPortTypeDTO = new OutPortTypeDTO();
|
||||
// outPortTypeDTO.setProvinceNameType(provinceNameType);
|
||||
// outPortTypeDTO.setIroadType(iroadType);
|
||||
// outPortTypeDTO.setInameType(inameType);
|
||||
// outPortTypeDTO.setItypeType(itypeType);
|
||||
//
|
||||
// // 出口条件下拉
|
||||
// outPortTypeDTO.setPortNoType(portNoType);
|
||||
// outPortTypeDTO.setClassnoType(classnoType);
|
||||
// //outPortTypeDTO.setManNOType(manNOType);
|
||||
// outPortTypeDTO.setManType(manType);
|
||||
// outPortTypeDTO.setCardtpType(cardtpType);
|
||||
// outPortTypeDTO.setTypeType(typeType);
|
||||
// outPortTypeDTO.setKindType(kindType);
|
||||
// outPortTypeDTO.setFlagType(flagType);
|
||||
// outPortTypeDTO.setPorttypegbType(porttypegbType);
|
||||
// outPortTypeDTO.setExitFeeType(exitfeeType);
|
||||
// outPortTypeDTO.setBriefFullNameType(briefFullNameType);
|
||||
// outPortTypeDTO.setPayType(payType);
|
||||
//
|
||||
// return R.SUCCESS(outPortTypeDTO);
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.cxds.imageaudit.mapper.ParticipantMapper;
|
||||
import com.cxds.imageaudit.pojo.entity.InPort;
|
||||
import com.cxds.imageaudit.pojo.entity.Participant;
|
||||
import com.cxds.imageaudit.resultR.R;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2022-07-13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/participantType")
|
||||
public class ParticipantController {
|
||||
|
||||
@Autowired
|
||||
private ParticipantMapper participantMapper;
|
||||
|
||||
@Value("${DBType}")
|
||||
public String dbType;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/07/07 09:30
|
||||
* @方法 participantTypeAll
|
||||
* @作用 查询发行方全部类型
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/participantTypeAll")
|
||||
public R<List<Participant>> participantTypeAll(){
|
||||
List<Participant> participantType = null;
|
||||
if(dbType.equals("1")){
|
||||
participantType = participantMapper.briefFullNameTypeAllSQLServer();
|
||||
}else if(dbType.equals("2")){
|
||||
participantType = participantMapper.briefFullNameTypeAllOracle();
|
||||
}else if(dbType.equals("3")){
|
||||
participantType = participantMapper.briefFullNameTypeAllDM();
|
||||
}else if(dbType.equals("4")){
|
||||
participantType = participantMapper.briefFullNameTypeAllMySQL();
|
||||
}
|
||||
//participantType = participantMapper.briefFullNameTypeAll();
|
||||
//System.out.println("陈旭东:"+participantType);
|
||||
return R.SUCCESS(participantType);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
import com.cxds.imageaudit.mapper.PaytypeTextMapper;
|
||||
import com.cxds.imageaudit.pojo.entity.PaytypeText;
|
||||
import com.cxds.imageaudit.resultR.R;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2022-07-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/payType")
|
||||
public class PaytypeTextController {
|
||||
|
||||
@Autowired
|
||||
private PaytypeTextMapper paytypeTextMapper;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/07/07 10:02
|
||||
* @方法 payTypeAll
|
||||
* @作用 查询支付方式全部类型
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/payTypeAll")
|
||||
public R<List<PaytypeText>> payTypeAll(){
|
||||
List<PaytypeText> payType = paytypeTextMapper.selectList(null);
|
||||
//System.out.println("陈旭东:"+payType);
|
||||
return R.SUCCESS(payType);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,19 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2022-07-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/tothefor/platecolor-text")
|
||||
public class PlatecolorTextController {
|
||||
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
import com.cxds.imageaudit.mapper.PorttypegbTextMapper;
|
||||
import com.cxds.imageaudit.pojo.entity.PorttypegbText;
|
||||
import com.cxds.imageaudit.resultR.R;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2022-07-13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/porttypegbType")
|
||||
public class PorttypegbTextController {
|
||||
|
||||
@Autowired
|
||||
private PorttypegbTextMapper porttypegbTextMapper;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/07/07 09:41
|
||||
* @方法 porttypegbTypeAll
|
||||
* @作用 查询车道全部类型
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/porttypegbTypeAll")
|
||||
public R<List<PorttypegbText>> porttypegbTypeAll(){
|
||||
List<PorttypegbText> porttypegbType = porttypegbTextMapper.selectList(null);
|
||||
//System.out.println("陈旭东:"+porttypegbType);
|
||||
return R.SUCCESS(porttypegbType);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
import com.cxds.imageaudit.mapper.ProvinceTextMapper;
|
||||
import com.cxds.imageaudit.pojo.entity.ProvinceText;
|
||||
import com.cxds.imageaudit.resultR.R;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2022-07-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/provinceNameType")
|
||||
public class ProvinceTextController {
|
||||
|
||||
@Autowired
|
||||
private ProvinceTextMapper provinceTextMapper;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/07/07 09:49
|
||||
* @方法 provinceNameTypeAll
|
||||
* @作用 查询入口省份全部类型
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/provinceNameTypeAll")
|
||||
public R<List<ProvinceText>> provinceNameTypeAll(){
|
||||
List<ProvinceText> provinceNameType = provinceTextMapper.selectList(null);
|
||||
//System.out.println("陈旭东:"+provinceNameType);
|
||||
return R.SUCCESS(provinceNameType);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.cxds.imageaudit.mapper.RoadTableMapper;
|
||||
import com.cxds.imageaudit.pojo.entity.RoadTable;
|
||||
import com.cxds.imageaudit.resultR.R;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2022-07-13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/roadType")
|
||||
public class RoadTableController {
|
||||
|
||||
@Autowired
|
||||
private RoadTableMapper roadTableMapper;
|
||||
|
||||
@Value("${RoadNO}")
|
||||
public String roadNO;
|
||||
|
||||
/**
|
||||
* @Author ChenXuDong
|
||||
* @Date 2022/07/07 09:14
|
||||
* @方法 roadTypeAllSelected
|
||||
* @作用 查询路段类型
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/roadTypeAllSelected")
|
||||
public R<List<RoadTable>> roadTypeAllSelected(){
|
||||
|
||||
QueryWrapper<RoadTable> queryWrapper = new QueryWrapper<>();
|
||||
|
||||
if(roadNO != null && roadNO.length() != 0){
|
||||
Integer roadNOInteger = Integer.valueOf(roadNO);
|
||||
queryWrapper.eq("ROADNO",roadNOInteger);
|
||||
}
|
||||
List<RoadTable> roadType = roadTableMapper.selectList(queryWrapper);
|
||||
//for (RoadTable rT : roadType) {
|
||||
// if(rT.getRoadno() == 10){
|
||||
// rT.setRoadname("高路公司(10)");
|
||||
// }
|
||||
// if(rT.getRoadno() == 15){
|
||||
// rT.setRoadname("高路公司(15)");
|
||||
// }
|
||||
//}
|
||||
return R.SUCCESS(roadType);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author ChenXuDong
|
||||
* @Date 2022/07/07 09:14
|
||||
* @方法 roadTypeAll
|
||||
* @作用 查询路段全部类型
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/roadTypeAll")
|
||||
public R<List<RoadTable>> roadTypeAll(){
|
||||
List<RoadTable> roadType = roadTableMapper.selectList(null);
|
||||
//for (RoadTable rT : roadType) {
|
||||
// if(rT.getRoadno() == 10){
|
||||
// rT.setRoadname("高路公司(10)");
|
||||
// }
|
||||
// if(rT.getRoadno() == 15){
|
||||
// rT.setRoadname("高路公司(15)");
|
||||
// }
|
||||
//}
|
||||
//System.out.println(roadType);
|
||||
return R.SUCCESS(roadType);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,65 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.cxds.imageaudit.mapper.SetupTableMapper;
|
||||
import com.cxds.imageaudit.pojo.dto.SetupTableDTO;
|
||||
import com.cxds.imageaudit.pojo.entity.SetupTable;
|
||||
import com.cxds.imageaudit.resultR.R;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2022-07-28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/setupType")
|
||||
public class SetupTableController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private SetupTableMapper setupTableMapper;
|
||||
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/07/20 11:02
|
||||
* @方法 setupTablePage
|
||||
* @作用 查询入口流水信息列表
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/page")
|
||||
public R<IPage<SetupTable>> setupTablePage(@RequestBody SetupTableDTO setupTableDTO){
|
||||
Page<SetupTable> page = new Page<>(setupTableDTO.getPageNum(), setupTableDTO.getPageSize());
|
||||
IPage<SetupTable> setupTableListPage = setupTableMapper.setupTablePage(page, setupTableDTO);
|
||||
return R.SUCCESS(setupTableListPage);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/07/07 15:03
|
||||
* @方法 portNoTypeAll
|
||||
* @作用 查询车道下拉类型
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/setupTypeAll")
|
||||
public R<List<SetupTable>> setupTypeAll(){
|
||||
//车道
|
||||
List<SetupTable> setupType = setupTableMapper.selectList(null);
|
||||
//System.out.println("陈旭东:"+setupType);
|
||||
return R.SUCCESS(setupType);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,123 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
import com.cxds.imageaudit.mapper.InPortMapper;
|
||||
import com.trkf.PasswordEncryption.PassWordUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* @author chenxudong
|
||||
* @data
|
||||
* @apiNote
|
||||
*/
|
||||
public class Test {
|
||||
@Autowired
|
||||
InPortMapper inPortMapper;
|
||||
public static void main(String[] args) {
|
||||
String s = PassWordUtils.decrypt("cjxzZ1FYOClrVVoxNGwpelA7VEw2QyhA");
|
||||
System.out.println("陈旭东:" + s);
|
||||
//long i = bin2Dec("10000000000000000000000000000000000000000000000000000000000000");
|
||||
//System.out.println(i);
|
||||
|
||||
//getFlagText(16777216);
|
||||
|
||||
//int num = 16777216 ; //二进制为 0111
|
||||
//for(int i = 1 ;i<=59;i++){
|
||||
// if(isOne(num,i) == 1){
|
||||
// System.out.println(i);
|
||||
// }
|
||||
// System.out.println("第"+i+"位为0:"+isOne(num,i));
|
||||
//}
|
||||
|
||||
//String flagValueString = Integer.toBinaryString(16777216);
|
||||
//System.out.println(flagValueString);
|
||||
//List<Integer> flagList = new ArrayList<>();
|
||||
//flagList.add(4);
|
||||
//flagList.add(7);
|
||||
//List<Integer> flagListNew = new ArrayList<>();
|
||||
//for (Integer flag : flagList) {
|
||||
// String s = new String();
|
||||
// s = s + 1;
|
||||
// for(int i = 0; i < flag - 1; i++){
|
||||
// s = s + 0;
|
||||
// }
|
||||
// int parseInt = Integer.parseInt(s, 2);
|
||||
// flagListNew.add(parseInt);
|
||||
//}
|
||||
//System.out.println(flagListNew);
|
||||
//System.out.println(Integer.parseInt("100000000000000",2)); // gives 0
|
||||
//System.out.println(Integer.toBinaryString(Integer.parseInt("010",2))); // gives 10
|
||||
//System.out.println(Integer.toBinaryString(Integer.parseInt("100",2))); // gives 100
|
||||
//Scanner in = new Scanner(System.in);
|
||||
//System.out.print("请输入字符串:");
|
||||
//String str = new String();
|
||||
//str = in.next();
|
||||
//char[] a = str.toCharArray();
|
||||
//System.out.print("字符串转化为二进制:");
|
||||
//for(int i = 0; i < str.length(); i++)
|
||||
//{
|
||||
// System.out.print(Integer.toBinaryString(a[i]));
|
||||
//}
|
||||
}
|
||||
|
||||
//public static List<String> getFlagText(Integer value){
|
||||
// List<Integer> flagValueList = new ArrayList<>();
|
||||
// for(int i = 1 ;i<=59;i++){
|
||||
// if(isOne(value,i) == 1){
|
||||
// flagValueList.add(i);
|
||||
// }
|
||||
// }
|
||||
// return inPortMapper.getFlagText(flagValueList);
|
||||
//}
|
||||
|
||||
public static long bin2Dec(String binaryString){
|
||||
long sum = 0;
|
||||
for(int i = 0;i < binaryString.length();i++){
|
||||
char ch = binaryString.charAt(i);
|
||||
if(ch > '2' || ch < '0'){
|
||||
throw new NumberFormatException(String.valueOf(i));
|
||||
}
|
||||
sum = sum * 2 + (binaryString.charAt(i) - '0');
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static int isOne(int num , int n){
|
||||
return num>>(n-1)&1 ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//static int isOne(int num , int n){
|
||||
// return num>>(n-1)&1 ;
|
||||
//}
|
||||
|
||||
// public static void main(String[] args) {
|
||||
// // 创建动态客户端
|
||||
// JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
|
||||
// Client client = dcf.createClient("http://192.168.101.217:7000/SSMPBack/webService/IGetSystemInfoService?wsdl");
|
||||
// // 需要密码的情况需要加上用户名和密码
|
||||
// // client.getOutInterceptors().add(new ClientLoginInterceptor(USER_NAME, PASS_WORD));
|
||||
// Object[] objects = new Object[0];
|
||||
// try {
|
||||
// // invoke("方法名",参数1,参数2,参数3....);
|
||||
// //json的形式
|
||||
//// Map<String,Object> params=new HashMap<String,Object>();
|
||||
//// params.put("name", "dasda");
|
||||
//// Gson gson = new Gson();
|
||||
//// String json = gson.toJson(params);
|
||||
//// objects = client.invoke("say", json);
|
||||
// objects = client.invoke("UseingInfo");
|
||||
// Map<String,Object> map= JSONObject.parseObject(objects[0].toString());
|
||||
// System.out.println("返回数据:" + objects[0]);
|
||||
// System.out.println("返回数据:" + map);
|
||||
// } catch (java.lang.Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
import com.cxds.imageaudit.mapper.TypeTextMapper;
|
||||
import com.cxds.imageaudit.pojo.entity.TypeText;
|
||||
import com.cxds.imageaudit.resultR.R;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2022-07-13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/typeType")
|
||||
public class TypeTextController {
|
||||
|
||||
@Autowired
|
||||
private TypeTextMapper typeTextMapper;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/07/07 09:30
|
||||
* @方法 typeTypeAll
|
||||
* @作用 查询车型全部类型
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/typeTypeAll")
|
||||
public R<List<TypeText>> typeTypeAll(){
|
||||
List<TypeText> typeType = typeTextMapper.selectList(null);
|
||||
return R.SUCCESS(typeType);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
import com.cxds.imageaudit.mapper.UserTableMapper;
|
||||
import com.cxds.imageaudit.pojo.entity.UserTable;
|
||||
import com.cxds.imageaudit.pojo.vo.NameTableSelectedSuccessVO;
|
||||
import com.cxds.imageaudit.pojo.vo.NameTableSelectedVO;
|
||||
import com.cxds.imageaudit.resultR.R;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2022-07-28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/userType")
|
||||
public class UserTableController {
|
||||
|
||||
@Autowired
|
||||
private UserTableMapper userTableMapper;
|
||||
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/07/20 11:02
|
||||
* @方法 getStaNOByManNO
|
||||
* @作用 查询图像字节码
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getMessageByManNO")
|
||||
public R<NameTableSelectedSuccessVO> getStaNOByManNO(@RequestParam("manNO") String manNO){
|
||||
NameTableSelectedSuccessVO nameTableSelectedSuccessVO = new NameTableSelectedSuccessVO();
|
||||
List<Integer> staNOsByManNO = userTableMapper.getStaNOByManNO(manNO);
|
||||
List<NameTableSelectedVO> staNOAndStaNameByStaNOs = userTableMapper.getStaNOAndStaNameByStaNOs(staNOsByManNO);
|
||||
nameTableSelectedSuccessVO.setNameTableSelectedVOList(staNOAndStaNameByStaNOs);
|
||||
nameTableSelectedSuccessVO.setStanos(staNOsByManNO);
|
||||
return R.SUCCESS(nameTableSelectedSuccessVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/07/07 15:07
|
||||
* @方法 manNOTypeAll
|
||||
* @作用 查询入口收费员姓名工号下拉类型
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/userTypeAll")
|
||||
public R<List<UserTable>> userTypeAll(){
|
||||
//收费员姓名工号
|
||||
List<UserTable> userType = userTableMapper.selectList(null);
|
||||
//System.out.println("陈旭东:"+userType);
|
||||
return R.SUCCESS(userType);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
import com.cxds.imageaudit.mapper.VehicleclassTextMapper;
|
||||
import com.cxds.imageaudit.pojo.entity.VehicleclassText;
|
||||
import com.cxds.imageaudit.resultR.R;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2022-07-28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/vehicleclassType")
|
||||
public class VehicleclassTextController {
|
||||
|
||||
@Autowired
|
||||
private VehicleclassTextMapper vehicleclassTextMapper;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author 陈旭东
|
||||
* @Date 2022/07/07 09:49
|
||||
* @方法 provinceNameTypeAll
|
||||
* @作用 查询门架车种全部类型
|
||||
* @参数说明
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/vehicleclassTypeAll")
|
||||
public R<List<VehicleclassText>> vehicleclassTypeAll(){
|
||||
List<VehicleclassText> vehicleclassType = vehicleclassTextMapper.selectList(null);
|
||||
//System.out.println("陈旭东:"+vehicleclassType);
|
||||
return R.SUCCESS(vehicleclassType);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.cxds.imageaudit.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 陈旭东
|
||||
* @since 2022-07-13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/springbootmpz/vehplatesnap")
|
||||
public class VehplatesnapController {
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue