代码提交
parent
ab967c53b5
commit
e93f145a3b
@ -1,97 +0,0 @@
|
||||
package com.nmgs.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nmgs.annotation.OperationLogDesc;
|
||||
import com.nmgs.config.ResultData;
|
||||
import com.nmgs.entity.WhiteAccountText;
|
||||
import com.nmgs.service.IWhiteAccountSerive;
|
||||
import com.nmgs.util.PubTools;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.sql.SQLException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 单位信息管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/whiteAccount")
|
||||
@Api(tags = "单位信息管理")
|
||||
public class WhiteAccountTextController {
|
||||
|
||||
|
||||
public IWhiteAccountSerive iWhiteAccountSerive;
|
||||
@Autowired
|
||||
public void setiWhiteAccountSerive(IWhiteAccountSerive iWhiteAccountSerive) {
|
||||
this.iWhiteAccountSerive = iWhiteAccountSerive;
|
||||
}
|
||||
|
||||
SimpleDateFormat df=new SimpleDateFormat("yyyy-MM-dd");
|
||||
@PostMapping(value="/getAccountByPage")
|
||||
@ApiOperation(httpMethod="POST",value="查询单位信息管理数据")
|
||||
public Object getListByPage(HttpServletRequest request, @RequestBody(required = false) Map<String, Object> req) throws SQLException {
|
||||
Page<WhiteAccountText> whiteCarnoListList =null;
|
||||
try{
|
||||
whiteCarnoListList = iWhiteAccountSerive.getWhiteAccountTextByPage(req);
|
||||
if (PubTools.isEmpty(whiteCarnoListList)) {
|
||||
return ResultData.fail(-1,"数据查询失败");
|
||||
}
|
||||
}catch (Exception e){
|
||||
String throwableStr = e.getCause().toString();
|
||||
if(throwableStr.contains(":")){
|
||||
throwableStr = throwableStr.substring(throwableStr.indexOf(":") + 1);
|
||||
}
|
||||
return ResultData.fail(-1,"数据查询失败==>"+throwableStr);
|
||||
}
|
||||
return whiteCarnoListList;
|
||||
}
|
||||
|
||||
@PostMapping(value = "/addData")
|
||||
@OperationLogDesc(module = "单位信息管理>新增", events = "新增记录")
|
||||
@ApiOperation(httpMethod="POST",value="新增记录")
|
||||
public ResultData<String> addData(HttpServletRequest request, @RequestBody(required = false) Map<String, Object> req) throws Exception {
|
||||
int ret = iWhiteAccountSerive.insertData((WhiteAccountText)PubTools.map2Object(req,WhiteAccountText.class));
|
||||
if(ret>-1){
|
||||
return ResultData.success("新增成功","",0);
|
||||
}else{
|
||||
if(ret==-2){
|
||||
return ResultData.fail("单位编码已经存在!");
|
||||
}
|
||||
}
|
||||
return ResultData.fail("新增失败");
|
||||
}
|
||||
@PostMapping(value = "/batchDelDatas")
|
||||
@OperationLogDesc(module = "单位信息管理>批量删除", events = "删除记录")
|
||||
@ApiOperation(httpMethod="POST",value="删除记录")
|
||||
public ResultData<String> batchDelDatas(HttpServletRequest request, @RequestBody Object req) throws Exception {
|
||||
int ret = iWhiteAccountSerive.batchDelDatas(req);
|
||||
if(ret>-1){
|
||||
return ResultData.success("删除成功","",0);
|
||||
}
|
||||
return ResultData.fail("删除失败");
|
||||
}
|
||||
@PostMapping(value = "/updateById")
|
||||
@OperationLogDesc(module = "单位信息管理>修改", events = "修改记录")
|
||||
@ApiOperation(httpMethod="POST",value="修改记录")
|
||||
public ResultData<String> updateById(HttpServletRequest request, @RequestBody(required = false) WhiteAccountText req) throws Exception {
|
||||
try{
|
||||
int ret = iWhiteAccountSerive.updateById(req);
|
||||
if(ret>-1){
|
||||
return ResultData.success("保存成功");
|
||||
}
|
||||
}catch (Exception e){
|
||||
return ResultData.fail("保存失败:"+e.getMessage());
|
||||
}
|
||||
|
||||
return ResultData.fail("保存失败");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,84 +0,0 @@
|
||||
package com.nmgs.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nmgs.annotation.OperationLogDesc;
|
||||
import com.nmgs.config.ResultData;
|
||||
import com.nmgs.entity.WhiteAccountText;
|
||||
import com.nmgs.entity.WhiteCarnoDic;
|
||||
import com.nmgs.service.IWhiteAccountSerive;
|
||||
import com.nmgs.service.IWhiteCarnoDicService;
|
||||
import com.nmgs.util.PubTools;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.sql.SQLException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 单位信息管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/whiteCarnoDic")
|
||||
@Api(tags = "自定义白名单管理")
|
||||
public class WhiteCarnoDicController {
|
||||
|
||||
|
||||
public IWhiteCarnoDicService iWhiteCarnoDicService;
|
||||
@Autowired
|
||||
public void setiWhiteCarnoDicService(IWhiteCarnoDicService iWhiteCarnoDicService) {
|
||||
this.iWhiteCarnoDicService = iWhiteCarnoDicService;
|
||||
}
|
||||
|
||||
SimpleDateFormat df=new SimpleDateFormat("yyyy-MM-dd");
|
||||
@PostMapping(value="/getCarnoDicByPage")
|
||||
@ApiOperation(httpMethod="POST",value="查询自定义白名单管理数据")
|
||||
public Object getCarnoDicByPage(HttpServletRequest request, @RequestBody(required = false) Map<String, Object> req) throws SQLException {
|
||||
Page<WhiteCarnoDic> whiteCarnoListList =null;
|
||||
try{
|
||||
whiteCarnoListList = iWhiteCarnoDicService.getWhiteCarnoDicByPage(req);
|
||||
if (PubTools.isEmpty(whiteCarnoListList)) {
|
||||
return ResultData.fail(-1,"数据查询失败");
|
||||
}
|
||||
}catch (Exception e){
|
||||
String throwableStr = e.getCause().toString();
|
||||
if(throwableStr.contains(":")){
|
||||
throwableStr = throwableStr.substring(throwableStr.indexOf(":") + 1);
|
||||
}
|
||||
return ResultData.fail(-1,"数据查询失败==>"+throwableStr);
|
||||
}
|
||||
return whiteCarnoListList;
|
||||
}
|
||||
|
||||
@PostMapping(value = "/addCarnoDicData")
|
||||
@OperationLogDesc(module = "自定义白名单管理>新增", events = "新增记录")
|
||||
@ApiOperation(httpMethod="POST",value="新增记录")
|
||||
public ResultData<String> addCarnoDicData(HttpServletRequest request, @RequestBody(required = false) Map<String, Object> req) throws Exception {
|
||||
int ret = iWhiteCarnoDicService.insertData(req);
|
||||
if(ret>-1){
|
||||
return ResultData.success("新增成功","",0);
|
||||
}else{
|
||||
if(ret==-2){
|
||||
return ResultData.fail("此数据已存在!");
|
||||
}
|
||||
}
|
||||
return ResultData.fail("新增失败");
|
||||
}
|
||||
@PostMapping(value = "/batchDelCarnoDicDatas")
|
||||
@OperationLogDesc(module = "自定义白名单管理>批量删除", events = "删除记录")
|
||||
@ApiOperation(httpMethod="POST",value="删除记录")
|
||||
public ResultData<String> batchDelCarnoDicDatas(HttpServletRequest request, @RequestBody Object req) throws Exception {
|
||||
int ret = iWhiteCarnoDicService.batchDelDatas(req);
|
||||
if(ret>-1){
|
||||
return ResultData.success("删除成功","",0);
|
||||
}
|
||||
return ResultData.fail("删除失败");
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,65 @@
|
||||
package com.nmgs.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("HANGLIST_TABLE")
|
||||
public class HangListTable {
|
||||
@TableField("ROADNO")
|
||||
private int roadno;
|
||||
@TableField("STANO")
|
||||
private int stano;
|
||||
@TableField("RPNAME")
|
||||
private String rpname;
|
||||
@TableField("RPTIME")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date rptime;
|
||||
@TableField("BEGDT")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date begdt;
|
||||
@TableField("CARDID")
|
||||
private String cardid;
|
||||
@TableField("CARDNO")
|
||||
private String cardno;
|
||||
@TableField("CARDTP")
|
||||
private int cardtp;
|
||||
@TableField("APNAME")
|
||||
private String apname;
|
||||
@TableField("DT")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date dt;
|
||||
@TableField("PLATECOLOR")
|
||||
private String platecolor;
|
||||
@TableField("CASH")
|
||||
private BigDecimal cash;
|
||||
@TableField("TYPE")
|
||||
private int type;
|
||||
@TableField("CREATEFLAG")
|
||||
private int createflag;
|
||||
@TableField("JTFLAG")
|
||||
private int jtflag;
|
||||
@TableField(exist = false)
|
||||
private String cardtpName;
|
||||
@TableField(exist = false)
|
||||
private String typeName;
|
||||
@TableField(exist = false)
|
||||
private String roadnoName;
|
||||
@TableField(exist = false)
|
||||
private String stanoName;
|
||||
@TableField(exist = false)
|
||||
private String createflagName;
|
||||
@TableField(exist = false)
|
||||
private String jtflagName;
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
package com.nmgs.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("WHITE_CARNO_TABLE")
|
||||
public class HangTable {
|
||||
@TableField("BEGDATE")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date begdate;
|
||||
@TableField("CARDID")
|
||||
private String cardid;
|
||||
@TableField("CARDNO")
|
||||
private String cardno;
|
||||
@TableField("CARDTP")
|
||||
private int cardtp;
|
||||
@TableField("DT")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date dt;
|
||||
@TableField("PLATECOLOR")
|
||||
private String platecolor;
|
||||
@TableField("VERNO")
|
||||
private String verno;
|
||||
@TableField("CASH")
|
||||
private BigDecimal cash;
|
||||
@TableField("TYPE")
|
||||
private int type;
|
||||
@TableField("REPORTROADNO")
|
||||
private int reportroadno;
|
||||
@TableField("REPORTSTANO")
|
||||
private int reportstano;
|
||||
@TableField("JTFLAG")
|
||||
private int jtflag;
|
||||
@TableField(exist = false)
|
||||
private String cardtpName;
|
||||
@TableField(exist = false)
|
||||
private String typeName;
|
||||
@TableField(exist = false)
|
||||
private String reportroadnoName;
|
||||
@TableField(exist = false)
|
||||
private String reportstanoName;
|
||||
@TableField(exist = false)
|
||||
private String jtflagName;
|
||||
|
||||
}
|
||||
@ -1,24 +0,0 @@
|
||||
package com.nmgs.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("WHITE_ACCOUNT_TEXT")
|
||||
public class WhiteAccountText {
|
||||
@TableField("ACOUNTID")
|
||||
private int acountid;
|
||||
@TableField("ACOUNTNAME")
|
||||
private String acountname;
|
||||
|
||||
}
|
||||
@ -1,26 +0,0 @@
|
||||
package com.nmgs.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("WHITE_CARNO_DIC_TABLE")
|
||||
public class WhiteCarnoDic {
|
||||
@TableField("MEMO")
|
||||
private String memo;
|
||||
@TableField("DISCRP")
|
||||
private String discrp;
|
||||
@TableField("DICNAME")
|
||||
private String dicname;
|
||||
@TableField("UNUSER1")
|
||||
private String unuser1;
|
||||
@TableField("UNUSER2")
|
||||
private int unuser2;
|
||||
|
||||
|
||||
}
|
||||
@ -1,87 +0,0 @@
|
||||
package com.nmgs.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("WHITE_CARNO_TABLE")
|
||||
public class WhiteCarnoList {
|
||||
@TableId(type = IdType.AUTO)
|
||||
private String id;
|
||||
@TableField("ACARNO")
|
||||
private String acarno;
|
||||
@TableField("COLOR")
|
||||
private int color;
|
||||
@TableField("DT")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date dt;
|
||||
@TableField("BEGDT")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date begdt;
|
||||
@TableField("ENDDT")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date enddt;
|
||||
@TableField("VEHICLE_TYPE")
|
||||
private int vehicleType;
|
||||
@TableField("DATAFLAG")
|
||||
private String dataflag;
|
||||
@TableField("DESCRIB")
|
||||
private String describ;
|
||||
@TableField("BEGDATE")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date begdate;
|
||||
@TableField("ACCOUNT")
|
||||
private int account;
|
||||
@TableField("VERNO")
|
||||
private String verno;
|
||||
@TableField("BAK1")
|
||||
private String bak1;
|
||||
@TableField("BAK2")
|
||||
private String bak2;
|
||||
@TableField("BAK3")
|
||||
private String bak3;
|
||||
@TableField("MEMO")
|
||||
private String memo;
|
||||
@TableField("VEHICLE_CLASS")
|
||||
private int vehicleClass;
|
||||
@TableField("DISCRP")
|
||||
private String discrp;
|
||||
@TableField(exist = false)
|
||||
private String colorName;
|
||||
@TableField(exist = false)
|
||||
private String flagName;
|
||||
@TableField(exist = false)
|
||||
private String accountName;
|
||||
@TableField(exist = false)
|
||||
private String vehicleClassName;
|
||||
@TableField(exist = false)
|
||||
private String vehicleTypeName;
|
||||
@TableField(exist = false)
|
||||
private String promperty;
|
||||
@TableField(exist = false)
|
||||
private String opermano;
|
||||
@TableField(exist = false)
|
||||
private String opermaname;
|
||||
@TableField(exist = false)
|
||||
private String qm;
|
||||
@TableField(exist = false)
|
||||
private String mfld;
|
||||
@TableField(exist = false)
|
||||
private String mfzzh;
|
||||
@TableField(exist = false)
|
||||
private String zdyzh;
|
||||
|
||||
public WhiteCarnoList(String verno) {
|
||||
this.verno = verno;
|
||||
}
|
||||
}
|
||||
@ -1,83 +0,0 @@
|
||||
package com.nmgs.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("WHITE_CARNO_LOG_TABLE")
|
||||
public class WhiteCarnoLogTable {
|
||||
@TableId(type = IdType.INPUT)
|
||||
private String id;
|
||||
@TableField("ACARNO")
|
||||
private String acarno;
|
||||
@TableField("COLOR")
|
||||
private int color;
|
||||
@TableField("DT")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date dt;
|
||||
@TableField("BEGDT")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date begdt;
|
||||
@TableField("ENDDT")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date enddt;
|
||||
@TableField("VEHICLE_TYPE")
|
||||
private int vehicleType;
|
||||
@TableField("DATAFLAG")
|
||||
private String dataflag;
|
||||
@TableField("DESCRIB")
|
||||
private String describ;
|
||||
@TableField("BEGDATE")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date begdate;
|
||||
@TableField("ACCOUNT")
|
||||
private int account;
|
||||
@TableField("VERNO")
|
||||
private String verno;
|
||||
@TableField("BAK1")
|
||||
private String bak1;
|
||||
@TableField("BAK2")
|
||||
private String bak2;
|
||||
@TableField("BAK3")
|
||||
private String bak3;
|
||||
@TableField("MEMO")
|
||||
private String memo;
|
||||
@TableField("VEHICLE_CLASS")
|
||||
private int vehicleClass;
|
||||
@TableField(exist = false)
|
||||
private String flagName;
|
||||
@TableField(exist = false)
|
||||
private String accountName;
|
||||
@TableField(exist = false)
|
||||
private String colorName;
|
||||
@TableField(exist = false)
|
||||
private String vehicleClassName;
|
||||
@TableField(exist = false)
|
||||
private String vehicleTypeName;
|
||||
@TableField("OPERTYPE")
|
||||
private Integer opertype;
|
||||
@TableField("OPERTYPENAME")
|
||||
private String opertypename;
|
||||
@TableField("OPERDATE")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date operdate;
|
||||
@TableField("OPERMANO")
|
||||
private String opermano;
|
||||
@TableField("OPERMANAME")
|
||||
private String opermaname;
|
||||
@TableField("COMNO")
|
||||
private String comno="test";
|
||||
@TableField("IDBUSINESS")
|
||||
private String idbusiness;
|
||||
|
||||
}
|
||||
@ -1,20 +0,0 @@
|
||||
package com.nmgs.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("white_account_text")
|
||||
public class WhiteComnoText {
|
||||
@TableField("VALUE")
|
||||
private String value;
|
||||
@TableField("TEXT")
|
||||
private String text;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.nmgs.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nmgs.entity.HangListTable;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 白名单数据操作日志
|
||||
*/
|
||||
@Mapper
|
||||
public interface HangListMapper extends BaseMapper<HangListTable> {
|
||||
Page<HangListTable> getBlackListByPage(Page<HangListTable> page, @Param("params") Map<String, Object> params);
|
||||
}
|
||||
@ -0,0 +1,136 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nmgs.mapper.HangListMapper">
|
||||
<select id="getBlackListByPage" parameterType="java.util.HashMap" resultType="com.nmgs.entity.HangListTable">
|
||||
select
|
||||
t.ROADNO,t.STANO,t.RPNAME,t.RPTIME,t.BEGDATE,t.CARDID,
|
||||
t.CARDNO,t.CARDTP,t.APNAME,t.DT,
|
||||
t.PLATECOLOR,t.CASH,t.TYPE,t.CREATEFLAG,t.JTFLAG,
|
||||
ht.text as cardtpName,tt.TEXT as typeName,rta.roadname as roadnoName,
|
||||
nta.staname as stanoName,(case when t.CREATEFLAG=1 THEN '添加' else '修改' end) As createflagName,
|
||||
(case when t.JTFLAG=1 THEN '是' else '否' end) As jtflagName
|
||||
FROM HANGLIST_TABLE t
|
||||
left join ROAD_TABLE_ALL rta on(t.ROADNO = rta.roadno)
|
||||
left join hangtp_text ht on(t.CARDTP = ht.ID)
|
||||
left join TYPE_TEXT tt on(t.TYPE = tt.value)
|
||||
left join NAME_TABLE nta on(t.STANO = nta.STANO)
|
||||
<where>
|
||||
<if test="params.id != null and params.id != ''">
|
||||
AND t.id = #{params.id}
|
||||
</if>
|
||||
<if test="params.queryCreateTimeS!= null and params.queryCreateTimeS!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.DT >= dateadd(day,0,#{params.queryCreateTimeS})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.DT >= TO_DATE(#{params.queryCreateTimeS}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.DT >= TO_DATE(#{params.queryCreateTimeS}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.DT >= STR_TO_DATE(#{params.queryCreateTimeS}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.queryCreateTimeE!= null and params.queryCreateTimeE!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.DT <= dateadd(day,0,#{params.queryCreateTimeE})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.DT <= TO_DATE(#{params.queryCreateTimeE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.DT <= TO_DATE(#{params.queryCreateTimeE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.DT <= STR_TO_DATE(#{params.queryCreateTimeE}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.queryrptimeS!= null and params.queryrptimeS!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.RPTIME >= dateadd(day,0,#{params.queryrptimeS})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.RPTIME >= TO_DATE(#{params.queryrptimeS}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.RPTIME >= TO_DATE(#{params.queryrptimeS}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.RPTIME >= STR_TO_DATE(#{params.queryrptimeS}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.queryrptimeE!= null and params.queryrptimeE!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.RPTIME <= dateadd(day,0,#{params.queryrptimeE})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.RPTIME <= TO_DATE(#{params.queryrptimeE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.RPTIME <= TO_DATE(#{params.queryrptimeE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.RPTIME <= STR_TO_DATE(#{params.queryrptimeE}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.querybegdateS!= null and params.querybegdateS!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.BEGDATE >= dateadd(day,0,#{params.querybegdateS})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.BEGDATE >= TO_DATE(#{params.querybegdateS}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.BEGDATE >= TO_DATE(#{params.querybegdateS}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.BEGDATE >= STR_TO_DATE(#{params.querybegdateS}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.querybegdateE!= null and params.querybegdateE!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.BEGDATE <= dateadd(day,0,#{params.querybegdateE})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.BEGDATE <= TO_DATE(#{params.querybegdateE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.BEGDATE <= TO_DATE(#{params.querybegdateE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.BEGDATE <= STR_TO_DATE(#{params.querybegdateE}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.SROADNO != null and params.SROADNO != ''">
|
||||
AND t.ROADNO = #{params.SROADNO}
|
||||
</if>
|
||||
<if test="params.SSTANO != null and params.SSTANO != ''">
|
||||
AND t.STANO = #{params.SSTANO}
|
||||
</if>
|
||||
<if test="params.SRPNAME != null and params.SRPNAME != ''">
|
||||
AND t.RPNAME like '%'|| #{params.SRPNAME} || '%'
|
||||
</if>
|
||||
<if test="params.SAPNAME != null and params.SAPNAME != ''">
|
||||
AND t.APNAME like '%'|| #{params.SAPNAME} || '%'
|
||||
</if>
|
||||
<if test="params.SCARDID != null and params.SCARDID != ''">
|
||||
AND t.CARDID like '%'|| #{params.SCARDID} || '%'
|
||||
</if>
|
||||
<if test="params.SCARDTP != null and params.SCARDTP != ''">
|
||||
AND t.CARDTP = #{params.SCARDTP}
|
||||
</if>
|
||||
<if test="params.STYPE != null and params.STYPE != ''">
|
||||
AND t.TYPE = #{params.STYPE}
|
||||
</if>
|
||||
<if test="params.SJTFLAG != null and params.SJTFLAG != ''">
|
||||
AND t.JTFLAG = #{params.SJTFLAG}
|
||||
</if>
|
||||
<if test="params.SPLATECOLOR != null and params.SPLATECOLOR != ''">
|
||||
AND t.JTFLAG = #{params.PLATECOLOR}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,20 @@
|
||||
package com.nmgs.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nmgs.entity.HangTable;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Mapper
|
||||
public interface HangTableMapper extends BaseMapper<HangTable> {
|
||||
Page<HangTable> getHangByPage(Page<HangTable> page, @Param("params") Map<String, Object> params);
|
||||
int delDataBatch(@Param("ids") List<String> ids);
|
||||
int updateById(@Param("params") HangTable params);
|
||||
List<HangTable> getHangList(@Param("params") Map<String, Object> params);
|
||||
public List<HangTable> getHangMaxVarnoBySql(@Param("params") Map<String, Object> params);
|
||||
public int publishVersion(@Param("params") Map<String, Object> params);
|
||||
}
|
||||
@ -0,0 +1,314 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nmgs.mapper.HangTableMapper">
|
||||
|
||||
<select id="getHangByPage" parameterType="java.util.HashMap" resultType="com.nmgs.entity.HangTable">
|
||||
select
|
||||
t.BEGDATE,t.CARDID,t.CARDNO,t.CARDTP,t.APNAME,t.DT,
|
||||
t.PLATECOLOR,t.VERNO,t.CASH,t.TYPE,t.REPORTROADNO,t.REPORTSTANO,
|
||||
t.JTFLAG,ht.text as cardtpName,tt.TEXT as typeName,rta.roadname as reportroadnoName,
|
||||
nta.staname as reportstanoName,(case when t.JTFLAG=1 THEN '是' else '否' end) As jtflagName
|
||||
FROM HANG_TABLE t
|
||||
left join ROAD_TABLE_ALL rta on(t.ROADNO = rta.roadno)
|
||||
left join hangtp_text ht on(t.CARDTP = ht.ID)
|
||||
left join TYPE_TEXT tt on(t.TYPE = tt.value)
|
||||
left join NAME_TABLE nta on(t.STANO = nta.STANO)
|
||||
<where>
|
||||
<if test="params.id != null and params.id != ''">
|
||||
AND t.id = #{params.id}
|
||||
</if>
|
||||
<if test="params.queryCreateTimeS!= null and params.queryCreateTimeS!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.DT >= dateadd(day,0,#{params.queryCreateTimeS})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.DT >= TO_DATE(#{params.queryCreateTimeS}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.DT >= TO_DATE(#{params.queryCreateTimeS}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.DT >= STR_TO_DATE(#{params.queryCreateTimeS}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.queryCreateTimeE!= null and params.queryCreateTimeE!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.DT <= dateadd(day,0,#{params.queryCreateTimeE})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.DT <= TO_DATE(#{params.queryCreateTimeE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.DT <= TO_DATE(#{params.queryCreateTimeE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.DT <= STR_TO_DATE(#{params.queryCreateTimeE}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.queryrptimeS!= null and params.queryrptimeS!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.RPTIME >= dateadd(day,0,#{params.queryrptimeS})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.RPTIME >= TO_DATE(#{params.queryrptimeS}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.RPTIME >= TO_DATE(#{params.queryrptimeS}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.RPTIME >= STR_TO_DATE(#{params.queryrptimeS}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.queryrptimeE!= null and params.queryrptimeE!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.RPTIME <= dateadd(day,0,#{params.queryrptimeE})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.RPTIME <= TO_DATE(#{params.queryrptimeE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.RPTIME <= TO_DATE(#{params.queryrptimeE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.RPTIME <= STR_TO_DATE(#{params.queryrptimeE}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.querybegdateS!= null and params.querybegdateS!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.BEGDATE >= dateadd(day,0,#{params.querybegdateS})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.BEGDATE >= TO_DATE(#{params.querybegdateS}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.BEGDATE >= TO_DATE(#{params.querybegdateS}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.BEGDATE >= STR_TO_DATE(#{params.querybegdateS}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.querybegdateE!= null and params.querybegdateE!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.BEGDATE <= dateadd(day,0,#{params.querybegdateE})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.BEGDATE <= TO_DATE(#{params.querybegdateE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.BEGDATE <= TO_DATE(#{params.querybegdateE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.BEGDATE <= STR_TO_DATE(#{params.querybegdateE}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.SROADNO != null and params.SROADNO != ''">
|
||||
AND t.ROADNO = #{params.SROADNO}
|
||||
</if>
|
||||
<if test="params.SSTANO != null and params.SSTANO != ''">
|
||||
AND t.STANO = #{params.SSTANO}
|
||||
</if>
|
||||
<if test="params.SCARDID != null and params.SCARDID != ''">
|
||||
AND t.CARDID like '%'|| #{params.SCARDID} || '%'
|
||||
</if>
|
||||
<if test="params.SCARDTP != null and params.SCARDTP != ''">
|
||||
AND t.CARDTP = #{params.SCARDTP}
|
||||
</if>
|
||||
<if test="params.STYPE != null and params.STYPE != ''">
|
||||
AND t.TYPE = #{params.STYPE}
|
||||
</if>
|
||||
<if test="params.SJTFLAG != null and params.SJTFLAG != ''">
|
||||
AND t.JTFLAG = #{params.SJTFLAG}
|
||||
</if>
|
||||
<if test="params.SPLATECOLOR != null and params.SPLATECOLOR != ''">
|
||||
AND t.JTFLAG = #{params.PLATECOLOR}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<update id="updateById" parameterType="com.nmgs.entity.HangTable">
|
||||
update HANG_TABLE
|
||||
<set>
|
||||
<if test="params.platecolor !='' and params.platecolor != null">
|
||||
PLATECOLOR= #{params.platecolor},
|
||||
</if>
|
||||
<if test="params.type !='' and params.type != null">
|
||||
type= #{params.type},
|
||||
</if>
|
||||
<if test="params.verno !='' and params.verno != null">
|
||||
verno= #{params.verno},
|
||||
</if>
|
||||
<if test="params.cash !='' and params.cash != null">
|
||||
cash= #{params.cash},
|
||||
</if>
|
||||
<if test="params.cardno !='' and params.cardno != null">
|
||||
CARDNO= #{params.cardno},
|
||||
</if>
|
||||
<if test="params.reportroadno !='' and params.reportroadno != null">
|
||||
REPORTROADNO=#{params.reportroadno},
|
||||
</if>
|
||||
<if test="params.reportstano !='' and params.reportstano != null">
|
||||
REPORTSTANO=#{params.reportstano},
|
||||
</if>
|
||||
</set>
|
||||
where CARDID=#{params.cardid} AND CARDTP=#{params.cardtp}
|
||||
</update>
|
||||
<update id="publishVersion" parameterType="java.util.HashMap">
|
||||
update HANG_TABLE
|
||||
<set>
|
||||
<if test="params.DBType == 1">
|
||||
BEGDATE = dateadd(day,0,#{params.begdate})
|
||||
</if>
|
||||
<if test="params.DBType == 2">
|
||||
BEGDATE= TO_DATE(#{params.begdate}, 'YYYY-MM-DD HH24:mi:ss'),
|
||||
</if>
|
||||
<if test="params.DBType == 3">
|
||||
BEGDATE = TO_DATE(#{params.begdate}, 'YYYY-MM-DD HH24:mi:ss'),
|
||||
</if>
|
||||
<if test="params.DBType == 4">
|
||||
BEGDATE= STR_TO_DATE(#{params.begdate}, '%Y-%m-%d %H:%k:%s'),
|
||||
</if>
|
||||
VERNO= #{params.verno}
|
||||
</set>
|
||||
</update>
|
||||
|
||||
<delete id="delDataBatch">
|
||||
DELETE FROM HANG_TABLE WHERE ID IN
|
||||
<foreach item="str" collection="ids" open="(" separator="," close=")">
|
||||
#{str}
|
||||
</foreach>
|
||||
</delete>
|
||||
<select id="getHangList" parameterType="java.util.HashMap" resultType="com.nmgs.entity.HangTable">
|
||||
select
|
||||
t.BEGDATE,t.CARDID,t.CARDNO,t.CARDTP,t.APNAME,t.DT,
|
||||
t.PLATECOLOR,t.VERNO,t.CASH,t.TYPE,t.REPORTROADNO,t.REPORTSTANO,
|
||||
t.JTFLAG,ht.text as cardtpName,tt.TEXT as typeName,rta.roadname as reportroadnoName,
|
||||
nta.staname as reportstanoName,(case when t.JTFLAG=1 THEN '是' else '否' end) As jtflagName
|
||||
FROM HANG_TABLE t
|
||||
left join ROAD_TABLE_ALL rta on(t.ROADNO = rta.roadno)
|
||||
left join hangtp_text ht on(t.CARDTP = ht.ID)
|
||||
left join TYPE_TEXT tt on(t.TYPE = tt.value)
|
||||
left join NAME_TABLE nta on(t.STANO = nta.STANO)
|
||||
<where>
|
||||
<if test="params.id != null and params.id != ''">
|
||||
AND t.id = #{params.id}
|
||||
</if>
|
||||
<if test="params.queryCreateTimeS!= null and params.queryCreateTimeS!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.DT >= dateadd(day,0,#{params.queryCreateTimeS})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.DT >= TO_DATE(#{params.queryCreateTimeS}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.DT >= TO_DATE(#{params.queryCreateTimeS}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.DT >= STR_TO_DATE(#{params.queryCreateTimeS}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.queryCreateTimeE!= null and params.queryCreateTimeE!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.DT <= dateadd(day,0,#{params.queryCreateTimeE})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.DT <= TO_DATE(#{params.queryCreateTimeE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.DT <= TO_DATE(#{params.queryCreateTimeE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.DT <= STR_TO_DATE(#{params.queryCreateTimeE}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.queryrptimeS!= null and params.queryrptimeS!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.RPTIME >= dateadd(day,0,#{params.queryrptimeS})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.RPTIME >= TO_DATE(#{params.queryrptimeS}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.RPTIME >= TO_DATE(#{params.queryrptimeS}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.RPTIME >= STR_TO_DATE(#{params.queryrptimeS}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.queryrptimeE!= null and params.queryrptimeE!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.RPTIME <= dateadd(day,0,#{params.queryrptimeE})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.RPTIME <= TO_DATE(#{params.queryrptimeE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.RPTIME <= TO_DATE(#{params.queryrptimeE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.RPTIME <= STR_TO_DATE(#{params.queryrptimeE}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.querybegdateS!= null and params.querybegdateS!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.BEGDATE >= dateadd(day,0,#{params.querybegdateS})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.BEGDATE >= TO_DATE(#{params.querybegdateS}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.BEGDATE >= TO_DATE(#{params.querybegdateS}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.BEGDATE >= STR_TO_DATE(#{params.querybegdateS}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.querybegdateE!= null and params.querybegdateE!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.BEGDATE <= dateadd(day,0,#{params.querybegdateE})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.BEGDATE <= TO_DATE(#{params.querybegdateE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.BEGDATE <= TO_DATE(#{params.querybegdateE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.BEGDATE <= STR_TO_DATE(#{params.querybegdateE}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.SROADNO != null and params.SROADNO != ''">
|
||||
AND t.ROADNO = #{params.SROADNO}
|
||||
</if>
|
||||
<if test="params.SSTANO != null and params.SSTANO != ''">
|
||||
AND t.STANO = #{params.SSTANO}
|
||||
</if>
|
||||
<if test="params.SCARDID != null and params.SCARDID != ''">
|
||||
AND t.CARDID like '%'|| #{params.SCARDID} || '%'
|
||||
</if>
|
||||
<if test="params.SCARDTP != null and params.SCARDTP != ''">
|
||||
AND t.CARDTP = #{params.SCARDTP}
|
||||
</if>
|
||||
<if test="params.STYPE != null and params.STYPE != ''">
|
||||
AND t.TYPE = #{params.STYPE}
|
||||
</if>
|
||||
<if test="params.SJTFLAG != null and params.SJTFLAG != ''">
|
||||
AND t.JTFLAG = #{params.SJTFLAG}
|
||||
</if>
|
||||
<if test="params.SPLATECOLOR != null and params.SPLATECOLOR != ''">
|
||||
AND t.PLATECOLOR = #{params.PLATECOLOR}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getHangMaxVarnoBySql" parameterType="java.util.HashMap" resultType="com.nmgs.entity.HangTable">
|
||||
select
|
||||
max(t.VERNO) as verno
|
||||
FROM HANG_TABLE t
|
||||
<where>
|
||||
<if test="params.whereSql != null and params.whereSql != ''">
|
||||
${params.whereSql}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@ -1,20 +0,0 @@
|
||||
package com.nmgs.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nmgs.entity.WhiteAccountText;
|
||||
import com.nmgs.entity.WhiteAccountText;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Mapper
|
||||
public interface WhiteAccountMapper extends BaseMapper<WhiteAccountText> {
|
||||
Page<WhiteAccountText> getWhiteAccountByPage(Page<WhiteAccountText> page, @Param("params") Map<String, Object> params);
|
||||
int insertData(@Param("params") WhiteAccountText params);
|
||||
int delDataById(@Param("ids") List<Integer> ids);
|
||||
int updateById(@Param("params") WhiteAccountText params);
|
||||
List<WhiteAccountText> getWhiteAccountText(@Param("params") Map<String, Object> params);
|
||||
}
|
||||
@ -1,51 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nmgs.mapper.WhiteAccountMapper">
|
||||
|
||||
<select id="getWhiteAccountByPage" parameterType="java.util.HashMap" resultType="com.nmgs.entity.WhiteAccountText">
|
||||
select
|
||||
t.ACOUNTID,t.ACOUNTNAME
|
||||
FROM WHITE_ACCOUNT_TEXT t
|
||||
<where>
|
||||
<if test="params.id != null and params.id != ''">
|
||||
AND t.acountid = #{params.id}
|
||||
</if>
|
||||
|
||||
<if test="params.name != null and params.name != ''">
|
||||
AND t.acountname like '%'|| #{params.name} || '%'
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<update id="updateById" parameterType="com.nmgs.entity.WhiteAccountText">
|
||||
update WHITE_ACCOUNT_TEXT
|
||||
<set>
|
||||
acountname=#{params.acountname},
|
||||
</set>
|
||||
where acountid=#{params.acountid}
|
||||
</update>
|
||||
<insert id="insertData" parameterType="com.nmgs.entity.WhiteAccountText">
|
||||
insert into WHITE_ACCOUNT_TEXT(VALUE,TEXT) values(#{params.acountid},#{params.text})
|
||||
</insert>
|
||||
<delete id="delDataById">
|
||||
DELETE FROM WHITE_ACCOUNT_TEXT WHERE acountid IN
|
||||
<foreach item="str" collection="ids" open="(" separator="," close=")">
|
||||
#{str}
|
||||
</foreach>
|
||||
</delete>
|
||||
<select id="getWhiteAccountText" parameterType="java.util.HashMap" resultType="com.nmgs.entity.WhiteAccountText">
|
||||
select
|
||||
t.acountid,t.acountname
|
||||
FROM WHITE_ACCOUNT_TEXT t
|
||||
<where>
|
||||
<if test="params.id != null and params.id != ''">
|
||||
AND t.acountid = #{params.id}
|
||||
</if>
|
||||
|
||||
<if test="params.name != null and params.name != ''">
|
||||
AND t.acountname like '%'|| #{params.name} || '%'
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@ -1,20 +0,0 @@
|
||||
package com.nmgs.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nmgs.entity.WhiteAccountText;
|
||||
import com.nmgs.entity.WhiteCarnoDic;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Mapper
|
||||
public interface WhiteCarnoDicMapper extends BaseMapper<WhiteCarnoDic> {
|
||||
Page<WhiteCarnoDic> getWhiteCarnoDicByPage(Page<WhiteCarnoDic> page, @Param("params") Map<String, Object> params);
|
||||
int insertData(@Param("params") WhiteCarnoDic params);
|
||||
int delDataById(@Param("ids") List<String> ids);
|
||||
int updateById(@Param("params") WhiteCarnoDic params);
|
||||
List<WhiteCarnoDic> getWhiteCarnoDicList(@Param("params") Map<String, Object> params);
|
||||
}
|
||||
@ -1,43 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nmgs.mapper.WhiteCarnoDicMapper">
|
||||
|
||||
<select id="getWhiteCarnoDicByPage" parameterType="java.util.HashMap" resultType="com.nmgs.entity.WhiteCarnoDic">
|
||||
select
|
||||
t.memo,t.discrp,t.dicname,t.unuser1,t.unuser2
|
||||
FROM WHITE_CARNO_DIC_TABLE t
|
||||
<where>
|
||||
<if test="params.memo != null and params.memo != ''">
|
||||
AND t.memo = #{params.memo}
|
||||
</if>
|
||||
|
||||
<if test="params.dicname != null and params.dicname != ''">
|
||||
AND t.dicname like '%'|| #{params.dicname} || '%'
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<insert id="insertData" parameterType="com.nmgs.entity.WhiteCarnoDic">
|
||||
insert into WHITE_CARNO_DIC_TABLE(memo,discrp,dicname) values(#{params.memo},#{params.discrp},#{params.dicname})
|
||||
</insert>
|
||||
<delete id="delDataById">
|
||||
DELETE FROM WHITE_CARNO_DIC_TABLE WHERE memo IN
|
||||
<foreach item="str" collection="ids" open="(" separator="," close=")">
|
||||
#{str}
|
||||
</foreach>
|
||||
</delete>
|
||||
<select id="getWhiteCarnoDicList" parameterType="java.util.HashMap" resultType="com.nmgs.entity.WhiteCarnoDic">
|
||||
select
|
||||
t.memo,t.discrp,t.dicname,t.unuser1,t.unuser2
|
||||
FROM WHITE_CARNO_DIC_TABLE t
|
||||
<where>
|
||||
<if test="params.memo != null and params.memo != ''">
|
||||
AND t.memo = #{params.memo}
|
||||
</if>
|
||||
<if test="params.dicname != null and params.dicname != ''">
|
||||
AND t.dicname like '%'|| #{params.dicname} || '%'
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@ -1,25 +0,0 @@
|
||||
package com.nmgs.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nmgs.entity.WhiteCarnoList;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Mapper
|
||||
public interface WhiteCarnoListMapper extends BaseMapper<WhiteCarnoList> {
|
||||
Page<WhiteCarnoList> getWhiteCarnoListByPage(Page<WhiteCarnoList> page, @Param("params") Map<String, Object> params);
|
||||
int insertData(@Param("params") WhiteCarnoList params);
|
||||
int insertDataBatch(@Param("list") List<WhiteCarnoList> params);
|
||||
int delDataBatch(@Param("ids") List<String> ids);
|
||||
int updateById(@Param("params") WhiteCarnoList params);
|
||||
List<WhiteCarnoList> getWhiteCarnoList(@Param("params") Map<String, Object> params);
|
||||
|
||||
int batchUpdateById(@Param("ids") String[] str,@Param("params") Map<String, Object> params);
|
||||
|
||||
public List<WhiteCarnoList> getWhiteCarno(@Param("params") Map<String, Object> params);
|
||||
public int publishVersion(@Param("params") Map<String, Object> params);
|
||||
}
|
||||
@ -1,522 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nmgs.mapper.WhiteCarnoListMapper">
|
||||
|
||||
<select id="getWhiteCarnoListByPage" parameterType="java.util.HashMap" resultType="com.nmgs.entity.WhiteCarnoList">
|
||||
select
|
||||
t.id,t.acarno,t.COLOR,t.DT,t.BEGDT,t.ENDDT,
|
||||
t.VEHICLE_TYPE,t.DATAFLAG,t.DESCRIB,t.BEGDATE,
|
||||
t.ACCOUNT,t.VERNO,t.bak1,t.bak2,t.bak3,t.memo,t.VEHICLE_CLASS,t.DISCRP,
|
||||
<if test="params.DBTYPE ==1">
|
||||
(case when t.ENDDT< dateadd(day,0,#{params.CURRENTDATE}) THEN '已过期'
|
||||
when t.ENDDT< dateadd(day,0,#{params.CURRENTWILLDATE}) THEN '将到期'
|
||||
else '正常' end) AS promperty,
|
||||
</if>
|
||||
<if test="params.DBTYPE ==2">
|
||||
(case
|
||||
when t.ENDDT< to_Date(#{params.CURRENTDATE},'YYYY-MM-DD HH24:mi:ss') THEN '已过期'
|
||||
when t.ENDDT< to_Date(#{params.CURRENTWILLDATE},'YYYY-MM-DD HH24:mi:ss') THEN '将到期'
|
||||
else '正常' end) AS promperty,
|
||||
</if>
|
||||
<if test="params.DBTYPE ==3">
|
||||
(case
|
||||
when t.ENDDT< to_Date(#{params.CURRENTDATE},'YYYY-MM-DD HH24:mi:ss') THEN '已过期'
|
||||
when t.ENDDT< to_Date(#{params.CURRENTWILLDATE},'YYYY-MM-DD HH24:mi:ss') THEN '将到期'
|
||||
else '正常' end) AS promperty,
|
||||
</if>
|
||||
<if test="params.DBTYPE ==4">
|
||||
(case
|
||||
when t.ENDDT< STR_TO_DATE(#{params.CURRENTDATE},'%Y-%m-%d %H:%k:%s') THEN '已过期'
|
||||
when t.ENDDT< STR_TO_DATE(#{params.CURRENTWILLDATE},'%Y-%m-%d %H:%k:%s') THEN '将到期'
|
||||
else '正常' end) AS promperty,
|
||||
</if>
|
||||
(case when t.DATAFLAG='1' then '在用' else '停用' end) as flagName,
|
||||
wct.acountname as accountName,wpc.text as colorName,wvc.text as vehicleClassName,'' as vehicleTypeName
|
||||
FROM WHITE_CARNO_TABLE t
|
||||
left join white_ACCOUNT_text wct on(t.ACCOUNT = wct.acountid)
|
||||
left join white_plate_color wpc on(t.COLOR = wpc.value)
|
||||
left join WHITE_VEHICLE_CLASS wvc on(t.VEHICLE_CLASS = wvc.value)
|
||||
<where>
|
||||
<if test="params.id != null and params.id != ''">
|
||||
AND t.id = #{params.id}
|
||||
</if>
|
||||
<if test="params.queryStartTime!= null and params.queryStartTime!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.BEGDT >= dateadd(day,0,#{params.queryStartTime})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.BEGDT >= TO_DATE(#{params.queryStartTime}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.BEGDT >= TO_DATE(#{params.queryStartTime}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.BEGDT >= STR_TO_DATE(#{params.queryStartTime}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.queryEndTime!= null and params.queryEndTime!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.BEGDT <= dateadd(day,0,#{params.queryEndTime})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.BEGDT <= TO_DATE(#{params.queryEndTime}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.BEGDT <= TO_DATE(#{params.queryEndTime}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.BEGDT <= STR_TO_DATE(#{params.queryEndTime}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.queryEndTimeS!= null and params.queryEndTimeS!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.ENDDT = dateadd(day,0,#{params.queryEndTimeS})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.ENDDT >= TO_DATE(#{params.queryEndTimeS}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.ENDDT >= TO_DATE(#{params.queryEndTimeS}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.ENDDT >= STR_TO_DATE(#{params.queryEndTimeS}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.queryEndTimeE!= null and params.queryEndTimeE!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.ENDDT <= dateadd(day,0,#{params.queryEndTimeE})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.ENDDT <= TO_DATE(#{params.queryEndTimeE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.ENDDT <= TO_DATE(#{params.queryEndTimeE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.ENDDT <= STR_TO_DATE(#{params.queryEndTimeE}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
|
||||
<if test="params.queryOperStartTime!= null and params.queryOperStartTime!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.BEGDATE >= dateadd(day,0,#{params.queryOperStartTime})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.BEGDATE >= TO_DATE(#{params.queryOperStartTime}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.BEGDATE >= TO_DATE(#{params.queryOperStartTime}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.BEGDATE >= STR_TO_DATE(#{params.queryOperStartTime}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.queryOperEndTime!= null and params.queryOperEndTime!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.BEGDATE <= dateadd(day,0,#{params.queryOperEndTime})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.BEGDATE <= TO_DATE(#{params.queryOperEndTime}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.BEGDATE <= TO_DATE(#{params.queryOperEndTime}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.BEGDATE <= STR_TO_DATE(#{params.queryOperEndTime}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.queryCreateTimeS!= null and params.queryCreateTimeS!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.DT >= dateadd(day,0,#{params.queryCreateTimeS})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.DT >= TO_DATE(#{params.queryCreateTimeS}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.DT >= TO_DATE(#{params.queryCreateTimeS}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.DT >= STR_TO_DATE(#{params.queryCreateTimeS}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.queryCreateTimeE!= null and params.queryCreateTimeE!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.DT <= dateadd(day,0,#{params.queryCreateTimeE})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.DT <= TO_DATE(#{params.queryCreateTimeE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.DT <= TO_DATE(#{params.queryCreateTimeE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.DT <= STR_TO_DATE(#{params.queryCreateTimeE}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.WILLDATE!= null and params.WILLDATE!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.ENDDT < dateadd(day,0,#{params.WILLDATE})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.ENDDT < TO_DATE(#{params.WILLDATE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.ENDDT < TO_DATE(#{params.WILLDATE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.ENDDT < STR_TO_DATE(#{params.WILLDATE}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.SVEHICLEID != null and params.SVEHICLEID != ''">
|
||||
AND t.acarno like '%'|| #{params.SVEHICLEID} || '%'
|
||||
</if>
|
||||
<if test="params.SCOMNO != null and params.SCOMNO != ''">
|
||||
AND t.ACCOUNT = #{params.SCOMNO}
|
||||
</if>
|
||||
<if test="params.SSTATUS != null and params.SSTATUS != ''">
|
||||
AND t.DATAFLAG = #{params.SSTATUS}
|
||||
</if>
|
||||
<if test="params.SVECHECLASS != null and params.SVECHECLASS != ''">
|
||||
AND t.VEHICLECLASS = #{params.SVECHECLASS}
|
||||
</if>
|
||||
<if test="params.SVECHETYPE != null and params.SVECHETYPE != ''">
|
||||
AND t.VEHICLETYPE = #{params.SVECHETYPE}
|
||||
</if>
|
||||
<if test="params.SDESCRIBE != null and params.SDESCRIBE != ''">
|
||||
AND t.DESCRIB = #{params.SDESCRIBE}
|
||||
</if>
|
||||
<if test="params.SPROMPOTY != null and params.SPROMPOTY != ''">
|
||||
<!-- 7天之内 将要过期 -->
|
||||
<if test="params.SPROMPOTY =='WILL'">
|
||||
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<update id="updateById" parameterType="com.nmgs.entity.WhiteCarnoList">
|
||||
update WHITE_CARNO_TABLE
|
||||
<set>
|
||||
ACARNO=#{params.acarno},
|
||||
COLOR=#{params.color},
|
||||
BEGDT= #{params.begdt},
|
||||
ENDDT= #{params.enddt},
|
||||
VEHICLE_TYPE=#{params.vehicleType} ,
|
||||
DATAFLAG= #{params.dataflag},
|
||||
DESCRIB= #{params.describ},
|
||||
BEGDATE= #{params.begdate},
|
||||
ACCOUNT= #{params.account},
|
||||
<if test="params.verno !='' and params.verno != null">
|
||||
VERNO= #{params.verno},
|
||||
</if>
|
||||
<if test="params.bak1 !='' and params.bak1 != null">
|
||||
BAK1= #{params.bak1},
|
||||
</if>
|
||||
<if test="params.bak2 !='' and params.bak2 != null">
|
||||
BAK2= #{params.bak12},
|
||||
</if>
|
||||
<if test="params.bak3 !='' and params.bak3 != null">
|
||||
BAK3= #{params.bak3},
|
||||
</if>
|
||||
<if test="params.discrp !='' and params.discrp != null">
|
||||
DISCRP= #{params.discrp},
|
||||
</if>
|
||||
<if test="params.vehicleClass !='' and params.vehicleClass != null">
|
||||
VEHICLE_CLASS=#{params.vehicleClass},
|
||||
</if>
|
||||
MEMO= #{params.memo}
|
||||
|
||||
</set>
|
||||
where ID=#{params.id}
|
||||
</update>
|
||||
<update id="batchUpdateById" parameterType="java.util.HashMap">
|
||||
update WHITE_CARNO_TABLE
|
||||
<set>
|
||||
<if test="params.DBType == 1">
|
||||
BEGDT = dateadd(day,0,#{params.begdt}),
|
||||
ENDDT= dateadd(day,0,#{params.enddt}),
|
||||
</if>
|
||||
<if test="params.DBType == 2">
|
||||
BEGDT= TO_DATE(#{params.begdt}, 'YYYY-MM-DD HH24:mi:ss'),
|
||||
ENDDT= TO_DATE(#{params.enddt}, 'YYYY-MM-DD HH24:mi:ss'),
|
||||
</if>
|
||||
<if test="params.DBType == 3">
|
||||
BEGDT = TO_DATE(#{params.begdt}, 'YYYY-MM-DD HH24:mi:ss'),
|
||||
ENDDT= TO_DATE(#{params.enddt}, 'YYYY-MM-DD HH24:mi:ss'),
|
||||
</if>
|
||||
<if test="params.DBType == 4">
|
||||
BEGDT= STR_TO_DATE(#{params.begdt}, '%Y-%m-%d %H:%k:%s'),
|
||||
ENDDT= STR_TO_DATE(#{params.enddt}, '%Y-%m-%d %H:%k:%s'),
|
||||
</if>
|
||||
DATAFLAG= #{params.dataflag},
|
||||
ACCOUNT= #{params.account}
|
||||
</set>
|
||||
where ID IN
|
||||
<foreach item="str" collection="ids" open="(" separator="," close=")">
|
||||
#{str}
|
||||
</foreach>
|
||||
</update>
|
||||
<update id="publishVersion" parameterType="java.util.HashMap">
|
||||
update WHITE_CARNO_TABLE
|
||||
<set>
|
||||
<if test="params.DBType == 1">
|
||||
BEGDATE = dateadd(day,0,#{params.begdate})
|
||||
</if>
|
||||
<if test="params.DBType == 2">
|
||||
BEGDATE= TO_DATE(#{params.begdate}, 'YYYY-MM-DD HH24:mi:ss'),
|
||||
</if>
|
||||
<if test="params.DBType == 3">
|
||||
BEGDATE = TO_DATE(#{params.begdate}, 'YYYY-MM-DD HH24:mi:ss'),
|
||||
</if>
|
||||
<if test="params.DBType == 4">
|
||||
BEGDATE= STR_TO_DATE(#{params.begdate}, '%Y-%m-%d %H:%k:%s'),
|
||||
</if>
|
||||
VERNO= #{params.verno}
|
||||
</set>
|
||||
</update>
|
||||
|
||||
<insert id="insertData" parameterType="com.nmgs.entity.WhiteCarnoList">
|
||||
insert into WHITE_CARNO_TABLE(ID,
|
||||
acarno,
|
||||
COLOR,
|
||||
DT,BEGDT,ENDDT,
|
||||
VEHICLE_TYPE,
|
||||
DATAFLAG,DESCRIB,BEGDATE,ACCOUNT,VERNO,
|
||||
BAK1,BAK2,BAK3,MEMO,
|
||||
VEHICLE_CLASS,DISCRP)
|
||||
values(#{params.id},
|
||||
#{params.acarno},
|
||||
#{params.color},
|
||||
#{params.dt},
|
||||
#{params.begdt},
|
||||
#{params.enddt},
|
||||
#{params.vehicleType},
|
||||
#{params.dataflag},#{params.describ},#{params.begdate},
|
||||
#{params.account},#{params.verno},#{params.bak1},
|
||||
#{params.bak2},#{params.bak3},#{params.memo},
|
||||
#{params.vehicleClass},#{params.discrp}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertDataBatch" parameterType="java.util.List">
|
||||
insert into WHITE_CARNO_TABLE(ID,acarno,COLOR,DT,BEGDT,ENDDT,VEHICLE_TYPE,
|
||||
DATAFLAG,DESCRIB,BEGDATE,ACCOUNT,VERNO,BAK1,BAK2,BAK3,MEMO,
|
||||
VEHICLE_CLASS,DISCRP) values
|
||||
<foreach collection="list" item="params" separator=",">
|
||||
(#{params.id},#{params.acarno},#{params.color},#{params.dt},#{params.begdt},
|
||||
#{params.enddt},#{params.vehicleType},#{params.dataflag},#{params.describ},#{params.begdate},
|
||||
#{params.account},#{params.verno},#{params.bak1},#{params.bak2},#{params.bak3},#{params.memo},#{params.vehicleClass},#{params.discrp}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
<delete id="delDataBatch">
|
||||
DELETE FROM WHITE_CARNO_TABLE WHERE ID IN
|
||||
<foreach item="str" collection="ids" open="(" separator="," close=")">
|
||||
#{str}
|
||||
</foreach>
|
||||
</delete>
|
||||
<select id="getWhiteCarnoList" parameterType="java.util.HashMap" resultType="com.nmgs.entity.WhiteCarnoList">
|
||||
select
|
||||
t.id,t.acarno,t.COLOR,t.DT,t.BEGDT,t.ENDDT,
|
||||
t.VEHICLE_TYPE,t.DATAFLAG,t.DESCRIB,t.BEGDATE,
|
||||
t.ACCOUNT,t.VERNO,t.bak1,t.bak2,t.bak3,t.memo,t.VEHICLE_CLASS,t.DISCRP,
|
||||
<if test="params.DBTYPE ==1">
|
||||
(case when t.ENDDT< dateadd(day,0,#{params.CURRENTDATE}) THEN '已过期'
|
||||
when t.ENDDT< dateadd(day,0,#{params.CURRENTWILLDATE}) THEN '将到期'
|
||||
else '正常' end) AS promperty,
|
||||
</if>
|
||||
<if test="params.DBTYPE ==2">
|
||||
(case
|
||||
when t.ENDDT< to_Date(#{params.CURRENTDATE},'YYYY-MM-DD HH24:mi:ss') THEN '已过期'
|
||||
when t.ENDDT< to_Date(#{params.CURRENTWILLDATE},'YYYY-MM-DD HH24:mi:ss') THEN '将到期'
|
||||
else '正常' end) AS promperty,
|
||||
</if>
|
||||
<if test="params.DBTYPE ==3">
|
||||
(case
|
||||
when t.ENDDT< to_Date(#{params.CURRENTDATE},'YYYY-MM-DD HH24:mi:ss') THEN '已过期'
|
||||
when t.ENDDT< to_Date(#{params.CURRENTWILLDATE},'YYYY-MM-DD HH24:mi:ss') THEN '将到期'
|
||||
else '正常' end) AS promperty,
|
||||
</if>
|
||||
<if test="params.DBTYPE ==4">
|
||||
(case
|
||||
when t.ENDDT< STR_TO_DATE(#{params.CURRENTDATE},'%Y-%m-%d %H:%k:%s') THEN '已过期'
|
||||
when t.ENDDT< STR_TO_DATE(#{params.CURRENTWILLDATE},'%Y-%m-%d %H:%k:%s') THEN '将到期'
|
||||
else '正常' end) AS promperty,
|
||||
</if>
|
||||
|
||||
(case when t.DATAFLAG='1' then '在用' else '停用' end) as flagName,
|
||||
wct.acountname as accountName,wpc.text as colorName,wvc.text as vehicleClassName,'' as vehicleTypeName
|
||||
FROM WHITE_CARNO_TABLE t
|
||||
left join white_account_text wct on(t.ACCOUNT = wct.acountid)
|
||||
left join white_plate_color wpc on(t.COLOR = wpc.value)
|
||||
left join WHITE_VEHICLE_CLASS wvc on(t.VEHICLE_CLASS = wvc.value)
|
||||
<where>
|
||||
<if test="params.id != null and params.id != ''">
|
||||
AND t.id = #{params.id}
|
||||
</if>
|
||||
<if test="params.queryStartTime!= null and params.queryStartTime!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.BEGDT >= dateadd(day,0,#{params.queryStartTime})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.BEGDT >= TO_DATE(#{params.queryStartTime}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.BEGDT >= TO_DATE(#{params.queryStartTime}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.BEGDT >= STR_TO_DATE(#{params.queryStartTime}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.queryEndTime!= null and params.queryEndTime!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.BEGDT <= dateadd(day,0,#{params.queryEndTime})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.BEGDT <= TO_DATE(#{params.queryEndTime}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.BEGDT <= TO_DATE(#{params.queryEndTime}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.BEGDT <= STR_TO_DATE(#{params.queryEndTime}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.queryEndTimeS!= null and params.queryEndTimeS!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.ENDDT = dateadd(day,0,#{params.queryEndTimeS})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.ENDDT >= TO_DATE(#{params.queryEndTimeS}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.ENDDT >= TO_DATE(#{params.queryEndTimeS}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.ENDDT >= STR_TO_DATE(#{params.queryEndTimeS}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.queryEndTimeE!= null and params.queryEndTimeE!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.ENDDT <= dateadd(day,0,#{params.queryEndTimeE})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.ENDDT <= TO_DATE(#{params.queryEndTimeE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.ENDDT <= TO_DATE(#{params.queryEndTimeE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.ENDDT <= STR_TO_DATE(#{params.queryEndTimeE}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
|
||||
<if test="params.queryOperStartTime!= null and params.queryOperStartTime!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.BEGDATE >= dateadd(day,0,#{params.queryOperStartTime})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.BEGDATE >= TO_DATE(#{params.queryOperStartTime}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.BEGDATE >= TO_DATE(#{params.queryOperStartTime}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.BEGDATE >= STR_TO_DATE(#{params.queryOperStartTime}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.queryOperEndTime!= null and params.queryOperEndTime!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.BEGDATE <= dateadd(day,0,#{params.queryOperEndTime})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.BEGDATE <= TO_DATE(#{params.queryOperEndTime}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.BEGDATE <= TO_DATE(#{params.queryOperEndTime}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.BEGDATE <= STR_TO_DATE(#{params.queryOperEndTime}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.queryCreateTimeS!= null and params.queryCreateTimeS!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.DT >= dateadd(day,0,#{params.queryCreateTimeS})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.DT >= TO_DATE(#{params.queryCreateTimeS}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.DT >= TO_DATE(#{params.queryCreateTimeS}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.DT >= STR_TO_DATE(#{params.queryCreateTimeS}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.queryCreateTimeE!= null and params.queryCreateTimeE!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.DT <= dateadd(day,0,#{params.queryCreateTimeE})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.DT <= TO_DATE(#{params.queryCreateTimeE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.DT <= TO_DATE(#{params.queryCreateTimeE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.DT <= STR_TO_DATE(#{params.queryCreateTimeE}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.WILLDATE!= null and params.WILLDATE!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.ENDDT < dateadd(day,0,#{params.WILLDATE})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.ENDDT < TO_DATE(#{params.WILLDATE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.ENDDT < TO_DATE(#{params.WILLDATE}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.ENDDT < STR_TO_DATE(#{params.WILLDATE}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.SVEHICLEID != null and params.SVEHICLEID != ''">
|
||||
AND t.acarno like '%'|| #{params.SVEHICLEID} || '%'
|
||||
</if>
|
||||
<if test="params.acarNo != null and params.acarNo != ''">
|
||||
AND t.acarno =#{params.acarNo}
|
||||
</if>
|
||||
<if test="params.color != null and params.color != ''">
|
||||
AND t.COLOR =#{params.color}
|
||||
</if>
|
||||
<if test="params.SCOMNO != null and params.SCOMNO != ''">
|
||||
AND t.account = #{params.SCOMNO}
|
||||
</if>
|
||||
<if test="params.SSTATUS != null and params.SSTATUS != ''">
|
||||
AND t.dataflag = #{params.SSTATUS}
|
||||
</if>
|
||||
<if test="params.SVECHECLASS != null and params.SVECHECLASS != ''">
|
||||
AND t.VEHICLECLASS = #{params.SVECHECLASS}
|
||||
</if>
|
||||
<if test="params.SVECHETYPE != null and params.SVECHETYPE != ''">
|
||||
AND t.VEHICLETYPE = #{params.SVECHETYPE}
|
||||
</if>
|
||||
<if test="params.SDESCRIBE != null and params.SDESCRIBE != ''">
|
||||
AND t.DESCRIB = #{params.SDESCRIBE}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getWhiteCarno" parameterType="java.util.HashMap" resultType="com.nmgs.entity.WhiteCarnoList">
|
||||
select
|
||||
max(t.VERNO) as verno
|
||||
FROM WHITE_CARNO_TABLE t
|
||||
<where>
|
||||
<if test="params.whereSql != null and params.whereSql != ''">
|
||||
${params.whereSql}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@ -1,22 +0,0 @@
|
||||
package com.nmgs.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nmgs.entity.WhiteCarnoList;
|
||||
import com.nmgs.entity.WhiteCarnoLogTable;
|
||||
import com.nmgs.entity.WhiteOperationLog;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 白名单数据操作日志
|
||||
*/
|
||||
@Mapper
|
||||
public interface WhiteCarnoLogMapper extends BaseMapper<WhiteCarnoLogTable> {
|
||||
int insertBatch(@Param("list") List<WhiteCarnoLogTable> list);
|
||||
|
||||
Page<WhiteCarnoLogTable> getWhiteCarnoLogByPage(Page<WhiteCarnoLogTable> page, @Param("params") Map<String, Object> params);
|
||||
}
|
||||
@ -1,90 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nmgs.mapper.WhiteCarnoLogMapper">
|
||||
<insert id="insertBatch" parameterType="java.util.List">
|
||||
<foreach collection="list" item="params" separator=";">
|
||||
insert into WHITE_CARNO_LOG_TABLE(ID,acarno,COLOR,DT,BEGDT,ENDDT,VEHICLE_TYPE,
|
||||
STATUS,DESCRIB,BEGDATE,ACCOUNT,VERNO,BAK1,BAK2,BAK3,MEMO,
|
||||
VEHICLE_CLASS,OPERTYPE,OPERTYPENAME,OPERDATE,OPERMANO,OPERMANAME,COMNO,IDBUSINESS)
|
||||
values
|
||||
(#{params.id},#{params.acarno},#{params.color},#{params.dt},#{params.begdt},
|
||||
#{params.enddt},#{params.vehicleType},#{params.dataflag},#{params.describ},#{params.begdate},
|
||||
#{params.account},#{params.verno},#{params.bak1},#{params.bak2},#{params.bak3},#{params.memo},
|
||||
#{params.vehicleClass},#{params.opertype},#{params.opertypename},#{params.operdate},
|
||||
#{params.opermano},#{params.opermaname},#{params.comno},#{params.idbusiness}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<select id="getWhiteCarnoLogByPage" parameterType="java.util.HashMap" resultType="com.nmgs.entity.WhiteCarnoLogTable">
|
||||
select
|
||||
t.id,t.acarno,t.COLOR,t.DT,t.BEGDT,t.ENDDT,
|
||||
t.VEHICLE_TYPE,t.DATAFLAG,t.DESCRIB,t.BEGDATE,
|
||||
t.ACCOUNT,t.VERNO,t.bak1,t.bak2,t.bak3,t.memo,t.VEHICLE_CLASS AS vehicleClass,
|
||||
(case when t.DATAFLAG='1' then '在用' else '停用' end) as flagName,
|
||||
wct.acountname as accountName,wpc.text as colorName,wvc.text as vehicleClassName,'' as vehicleTypeName,
|
||||
t.OPERTYPE,t.OPERTYPENAME,t.OPERDATE,t.OPERMANO,t.OPERMANAME,t.COMNO,t.IDBUSINESS
|
||||
FROM WHITE_CARNO_LOG_TABLE t
|
||||
left join white_ACCOUNT_text wct on(t.ACCOUNT = wct.acountid)
|
||||
left join white_plate_color wpc on(t.COLOR = wpc.value)
|
||||
left join WHITE_VEHICLE_CLASS wvc on(t.VEHICLE_CLASS = wvc.value)
|
||||
|
||||
<where>
|
||||
<if test="params.id != null and params.id != ''">
|
||||
AND t.id = #{params.id}
|
||||
</if>
|
||||
<if test="params.queryOperStartTime!= null and params.queryOperStartTime!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.OPERDATE >= dateadd(day,0,#{params.queryOperStartTime})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.OPERDATE >= TO_DATE(#{params.queryOperStartTime}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.OPERDATE >= TO_DATE(#{params.queryOperStartTime}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.OPERDATE >= STR_TO_DATE(#{params.queryOperStartTime}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.queryOperEndTime!= null and params.queryOperEndTime!= ''">
|
||||
<if test="params.DBTYPE == 1">
|
||||
AND t.OPERDATE <= dateadd(day,0,#{params.queryOperEndTime})
|
||||
</if>
|
||||
<if test="params.DBTYPE == 2">
|
||||
AND t.OPERDATE <= TO_DATE(#{params.queryOperEndTime}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 3">
|
||||
AND t.OPERDATE <= TO_DATE(#{params.queryOperEndTime}, 'YYYY-MM-DD HH24:mi:ss')
|
||||
</if>
|
||||
<if test="params.DBTYPE == 4">
|
||||
AND t.OPERDATE <= STR_TO_DATE(#{params.queryOperEndTime}, '%Y-%m-%d %H:%k:%s')
|
||||
</if>
|
||||
</if>
|
||||
<if test="params.SVEHICLEID != null and params.SVEHICLEID != ''">
|
||||
AND t.acarno like '%'|| #{params.SVEHICLEID} || '%'
|
||||
</if>
|
||||
<if test="params.SCOLOR != null and params.SCOLOR != ''">
|
||||
AND t.COLOR = #{params.SCOLOR}
|
||||
</if>
|
||||
<if test="params.SOPERTYPE != null and params.SOPERTYPE != ''">
|
||||
AND t.OPERTYPE = #{params.SOPERTYPE}
|
||||
</if>
|
||||
<if test="params.SOPERMANAME != null and params.SOPERMANAME != ''">
|
||||
AND t.OPERMANAME like '%'|| #{params.SOPERMANAME} || '%'
|
||||
</if>
|
||||
<if test="params.SVECHECLASS != null and params.SVECHECLASS != ''">
|
||||
AND t.VEHICLECLASS = #{params.SVECHECLASS}
|
||||
</if>
|
||||
<if test="params.SVECHETYPE != null and params.SVECHETYPE != ''">
|
||||
AND t.VEHICLETYPE = #{params.SVECHETYPE}
|
||||
</if>
|
||||
<if test="params.SDESCRIBE != null and params.SDESCRIBE != ''">
|
||||
AND t.DESCRIB = #{params.SDESCRIBE}
|
||||
</if>
|
||||
</where>
|
||||
order by t.OPERDATE DESC
|
||||
</select>
|
||||
</mapper>
|
||||
@ -1,13 +1,8 @@
|
||||
package com.nmgs.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nmgs.entity.WhiteAccountText;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface IWhiteBatchImportSerive {
|
||||
public interface IBlackBatchImportSerive {
|
||||
|
||||
/**
|
||||
* 白名单批量导入
|
||||
@ -0,0 +1,26 @@
|
||||
package com.nmgs.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nmgs.entity.HangListTable;
|
||||
import com.nmgs.entity.HangTable;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface IHangListService extends IService<HangListTable> {
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询黑名单流水
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
public Page<HangListTable> getBlackListByPage(Map<String, Object> params);
|
||||
/**
|
||||
* 单条数据插入
|
||||
* @param hangListTable
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
int insertData(HangListTable hangListTable) throws Exception;
|
||||
}
|
||||
@ -1,47 +0,0 @@
|
||||
package com.nmgs.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nmgs.entity.WhiteAccountText;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface IWhiteAccountSerive {
|
||||
/**
|
||||
* 分页查询白名单
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
Page<WhiteAccountText> getWhiteAccountTextByPage(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 单条数据插入
|
||||
* @param whiteCarnoList
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
int insertData(WhiteAccountText whiteCarnoList) throws Exception;
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param params
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
int batchDelDatas(Object params) throws Exception;
|
||||
|
||||
/**
|
||||
* 修改某一条数据
|
||||
* @param params
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
int updateById(WhiteAccountText params) throws Exception;
|
||||
|
||||
/**
|
||||
* 查询全部数据
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<WhiteAccountText> getWhiteAccountText(Map<String, Object> params);
|
||||
}
|
||||
@ -1,40 +0,0 @@
|
||||
package com.nmgs.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nmgs.entity.WhiteAccountText;
|
||||
import com.nmgs.entity.WhiteCarnoDic;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface IWhiteCarnoDicService {
|
||||
/**
|
||||
* 分页查自定义询白名单
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
Page<WhiteCarnoDic> getWhiteCarnoDicByPage(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 单条数据插入
|
||||
* @param params
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
int insertData(Map<String, Object> params) throws Exception;
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param params
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
int batchDelDatas(Object params) throws Exception;
|
||||
|
||||
/**
|
||||
* 查询全部数据
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<WhiteCarnoDic> getWhiteCarnoDicList(Map<String, Object> params);
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
package com.nmgs.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nmgs.entity.WhiteCarnoList;
|
||||
import com.nmgs.entity.WhiteCarnoLogTable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface IWhiteCarnoLogService extends IService<WhiteCarnoLogTable> {
|
||||
int saveData(WhiteCarnoLogTable operationLog);
|
||||
|
||||
// int insertBatch(List<WhiteCarnoLogTable> list);
|
||||
|
||||
/**
|
||||
* 分页查询白名单操作日志
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
public Page<WhiteCarnoLogTable> getWhiteCarnoLogByPage(Map<String, Object> params);
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
package com.nmgs.service.impl;
|
||||
|
||||
import cn.hutool.core.lang.UUID;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nmgs.entity.Consistent;
|
||||
import com.nmgs.entity.HangListTable;
|
||||
import com.nmgs.entity.HangTable;
|
||||
import com.nmgs.mapper.HangListMapper;
|
||||
import com.nmgs.mapper.HangTableMapper;
|
||||
import com.nmgs.service.IHangListService;
|
||||
import com.nmgs.util.LogUtil;
|
||||
import com.nmgs.util.PubTools;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class HangListServiceImpl extends ServiceImpl<HangListMapper, HangListTable> implements IHangListService {
|
||||
SimpleDateFormat dateTimeFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
@Autowired
|
||||
public void setHangListMapper(HangListMapper hangListMapper) {
|
||||
this.hangListMapper = hangListMapper;
|
||||
}
|
||||
@Autowired
|
||||
public HangListMapper hangListMapper;
|
||||
@Autowired
|
||||
public HangTableMapper hangTableMapper;
|
||||
@Override
|
||||
public Page<HangListTable> getBlackListByPage(Map<String, Object> params) {
|
||||
//从配置文件中读取数据库连接类型
|
||||
params.put("DBTYPE", PubTools.getDBType());
|
||||
//设置分页
|
||||
Integer pageNum = (Integer) params.get("pageNum");
|
||||
Integer pageSize = (Integer) params.get("pageSize");
|
||||
Page<HangListTable> page = new Page<>(pageNum,pageSize);
|
||||
page = hangListMapper.getBlackListByPage(page,params);
|
||||
return page;
|
||||
|
||||
}
|
||||
@Override
|
||||
public int insertData(HangListTable hangListTable) throws Exception {
|
||||
int ret=-1;
|
||||
try{
|
||||
//先根据车牌号与颜色判断是否已经存在
|
||||
Map<String,Object> params=new HashMap<String,Object>();
|
||||
params.put("SCARDID", hangListTable.getCardid());
|
||||
params.put("SPLATECOLOR", hangListTable.getPlatecolor());
|
||||
List<HangTable> hangTable1 = hangTableMapper.getHangList(params);
|
||||
if(!hangTable1.isEmpty()){
|
||||
return -2;//黑名单存在该信息!
|
||||
}
|
||||
HangTable hangTable=new HangTable();
|
||||
hangTable.setDt(dateTimeFormatter.parse(dateTimeFormatter.format(new Date())));
|
||||
BeanUtils.copyProperties(hangTable,hangListTable);
|
||||
ret= hangTableMapper.insert(hangTable);
|
||||
if(ret>0){
|
||||
hangListTable.setCreateflag(Consistent.ADD);
|
||||
hangListMapper.insert(hangListTable);
|
||||
}
|
||||
}catch (Exception e){
|
||||
LogUtil.WriteLog_Error("新增黑名单出错:"+e.getMessage(),"HangListServiceImpl");
|
||||
throw new Exception(e);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,205 @@
|
||||
package com.nmgs.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nmgs.entity.Consistent;
|
||||
import com.nmgs.entity.HangListTable;
|
||||
import com.nmgs.entity.HangTable;
|
||||
import com.nmgs.mapper.HangTableMapper;
|
||||
import com.nmgs.mapper.Mapper;
|
||||
import com.nmgs.service.IHangListService;
|
||||
import com.nmgs.service.IHangSerive;
|
||||
import com.nmgs.service.ISelectData;
|
||||
import com.nmgs.util.*;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Service
|
||||
public class HangSeriveImpl implements IHangSerive {
|
||||
@Autowired
|
||||
public HangTableMapper hangTableMapper;
|
||||
@Autowired
|
||||
public Mapper mapperI;
|
||||
@Autowired
|
||||
public ISelectData iSelectData;
|
||||
|
||||
IHangListService iHangListService;
|
||||
@Autowired
|
||||
public void setIHangListService(IHangListService iHangListService) {
|
||||
this.iHangListService = iHangListService;
|
||||
}
|
||||
SimpleDateFormat dateTimeFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
@Override
|
||||
public Page<HangTable> getHangTableByPage(Map<String, Object> params) {
|
||||
//从配置文件中读取数据库连接类型
|
||||
params.put("DBTYPE", PubTools.getDBType());
|
||||
//设置分页
|
||||
Integer pageNum = (Integer) params.get("pageNum");
|
||||
Integer pageSize = (Integer) params.get("pageSize");
|
||||
String whiteOutTimeT = PropertiesUtil.getValue("WhiteOutTime");
|
||||
params.put("CURRENTDATE",PubTools.getCurrentDate());
|
||||
params.put("CURRENTWILLDATE",PubTools.getAddNumDate(Integer.parseInt(whiteOutTimeT)));
|
||||
Page<HangTable> page = new Page<>(pageNum,pageSize);
|
||||
//到期数据条件需要做处理
|
||||
if(!PubTools.isEmpty(params.get("SPROMPOTY"))){
|
||||
String sprompoty = params.get("SPROMPOTY").toString();
|
||||
if("2".equals(sprompoty)){//将到期,从配置文件获取距离结束日期 还有几天算将到期
|
||||
String whiteOutTime = PropertiesUtil.getValue("WhiteOutTime");
|
||||
params.put("WILLDATE",PubTools.getAddNumDate(Integer.parseInt(whiteOutTime)));
|
||||
}else if("3".equals(sprompoty)){//已到期
|
||||
params.put("WILLDATE",PubTools.getCurrentDate());
|
||||
}else{
|
||||
|
||||
}
|
||||
}
|
||||
page = hangTableMapper.getHangByPage(page,params);
|
||||
return page;
|
||||
|
||||
}
|
||||
@Override
|
||||
public int batchDelDatas(Object params) throws Exception {
|
||||
int ret=-1;
|
||||
List<String> ids=new ArrayList<String>();
|
||||
List<HangListTable> listLog=new ArrayList<HangListTable>();
|
||||
try{
|
||||
JSONArray json=new JSONArray();
|
||||
if(!PubTools.isEmpty(params)){
|
||||
if(params instanceof ArrayList){
|
||||
List<Map<String,Object>> whiteCarnoList= (ArrayList<Map<String,Object>>) params;
|
||||
if(whiteCarnoList.size()>0){
|
||||
for(int i=0;i<whiteCarnoList.size();i++){
|
||||
HangTable wcl=(HangTable)PubTools.map2Object(whiteCarnoList.get(i), HangTable.class);
|
||||
ids.add(wcl.getCardid());
|
||||
HangListTable wclt=new HangListTable();
|
||||
BeanUtils.copyProperties(wcl,wclt,"id");
|
||||
listLog.add(wclt);
|
||||
}
|
||||
}
|
||||
}else if(params instanceof JSONArray){
|
||||
json=(JSONArray)params;
|
||||
if(json.size()>0){
|
||||
for(int i=0;i<json.size();i++){
|
||||
JSONObject jo=(JSONObject)json.get(i);
|
||||
HangTable wcl= jo.toJavaObject(HangTable.class);
|
||||
ids.add(wcl.getCardid());
|
||||
HangListTable wclt=new HangListTable();
|
||||
BeanUtils.copyProperties(wcl,wclt,"id");
|
||||
listLog.add(wclt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(ids.size()>0){
|
||||
ret= hangTableMapper.delDataBatch(ids);
|
||||
if(ret>0){
|
||||
iHangListService.saveBatch(listLog);
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
throw new Exception(e);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateById(HangTable params) throws Exception {
|
||||
int ret=-1;
|
||||
try{
|
||||
ret= hangTableMapper.updateById(params);
|
||||
HangListTable wclt=new HangListTable();
|
||||
BeanUtils.copyProperties(params,wclt,"id");
|
||||
wclt.setDt(dateTimeFormatter.parse(dateTimeFormatter.format(new Date())));
|
||||
wclt.setCreateflag(Consistent.UPDATE);
|
||||
iHangListService.save(wclt);
|
||||
}catch (Exception e){
|
||||
throw new Exception(e);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HangTable> getHangList(Map<String, Object> params) {
|
||||
//从配置文件中读取数据库连接类型
|
||||
params.put("DBTYPE", PubTools.getDBType());
|
||||
List<HangTable> records = hangTableMapper.getHangList(params);
|
||||
return records;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getIOCount() {
|
||||
String sql="select COUNT(1) from CARNO_TABLE where ACARNO like '%I%' or ACARNO like '%O%'";
|
||||
List selectforlist = this.mapperI.selectforlist(sql);
|
||||
return selectforlist.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int publishVersion(Map<String, Object> req) throws Exception {
|
||||
req.put("DBType",PubTools.getDBType());
|
||||
int ret= this.hangTableMapper.publishVersion(req);
|
||||
if(ret>-1){
|
||||
HangListTable wclt = new HangListTable();
|
||||
wclt.setDt(dateTimeFormatter.parse(dateTimeFormatter.format(new Date())));
|
||||
wclt.setCreateflag(Consistent.UPDATE_VERSION);
|
||||
wclt.setApname(req.get("opermaname").toString());
|
||||
wclt.setCardid("版本更新");
|
||||
wclt.setPlatecolor("蓝");
|
||||
wclt.setBegdt(dateTimeFormatter.parse(dateTimeFormatter.format(new Date())));
|
||||
iHangListService.save(wclt);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String,String> getVersion(Map<String, Object> req) throws Exception {
|
||||
req.put("DBType",PubTools.getDBType());
|
||||
String verN = "";
|
||||
String oldVerno = "0";
|
||||
Map<String,String> map=new HashMap<String,String>();
|
||||
//获取当前时间
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("yyMMdd");
|
||||
String nydm = sdf.format(new Date());
|
||||
int newymd = Integer.parseInt(nydm);
|
||||
if(PubTools.isEmpty(req)){
|
||||
req=new HashMap<String, Object>();
|
||||
}
|
||||
req.put("whereSql"," t.VERNO !='0' and VERNO is not null");
|
||||
List<HangTable> whiteCarno = this.getHangMaxVarnoBySql(req);
|
||||
//获取老版本数据
|
||||
if (whiteCarno.size() > 0 && !PubTools.isEmpty(whiteCarno.get(0))) {
|
||||
if ( !PubTools.isNull(whiteCarno.get(0).getVerno()) && whiteCarno.get(0).getVerno().length() > 6) {
|
||||
//获取老版本版本号
|
||||
oldVerno =whiteCarno.get(0).getVerno();
|
||||
//获取老版本时间
|
||||
String oymd = oldVerno.substring(0, 6);
|
||||
int oldymd = Integer.parseInt(oymd);
|
||||
if (oldymd == newymd) {//当天更改的 每次加 1
|
||||
int count = Integer.parseInt(oldVerno.substring(oldVerno.length() - 1));
|
||||
int i = count + 1;
|
||||
verN = nydm + (i+"");
|
||||
}
|
||||
else{
|
||||
verN = (nydm + "1");
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
verN = nydm + "1";
|
||||
}
|
||||
map.put("oldVerno",oldVerno);
|
||||
map.put("verno",verN);
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HangTable> getHangMaxVarnoBySql(Map<String, Object> params) {
|
||||
return this.hangTableMapper.getHangMaxVarnoBySql(params);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,110 +0,0 @@
|
||||
package com.nmgs.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nmgs.entity.WhiteAccountText;
|
||||
import com.nmgs.mapper.Mapper;
|
||||
import com.nmgs.mapper.WhiteAccountMapper;
|
||||
import com.nmgs.service.IWhiteAccountSerive;
|
||||
import com.nmgs.util.LogUtil;
|
||||
import com.nmgs.util.PropertiesUtil;
|
||||
import com.nmgs.util.PubTools;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Service
|
||||
public class WhiteAccountSeriveImpl implements IWhiteAccountSerive {
|
||||
@Autowired
|
||||
public WhiteAccountMapper whiteAccountMapper;
|
||||
@Autowired
|
||||
public Mapper mapperI;
|
||||
SimpleDateFormat dateTimeFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
@Override
|
||||
public Page<WhiteAccountText> getWhiteAccountTextByPage(Map<String, Object> params) {
|
||||
//从配置文件中读取数据库连接类型
|
||||
params.put("DBTYPE", PropertiesUtil.getValue("DBType"));
|
||||
//设置分页
|
||||
Integer pageNum = (Integer) params.get("pageNum");
|
||||
Integer pageSize = (Integer) params.get("pageSize");
|
||||
Page<WhiteAccountText> page = new Page<>(pageNum,pageSize);
|
||||
page = whiteAccountMapper.getWhiteAccountByPage(page,params);
|
||||
return page;
|
||||
|
||||
}
|
||||
@Override
|
||||
public int insertData(WhiteAccountText whiteAccountText) throws Exception {
|
||||
int ret=-1;
|
||||
try{
|
||||
//先根据车牌号与颜色判断是否已经存在
|
||||
Map<String,Object> params=new HashMap<String,Object>();
|
||||
params.put("id",whiteAccountText.getAcountid());
|
||||
List<WhiteAccountText> whiteCarnoList1 = whiteAccountMapper.getWhiteAccountText(params);
|
||||
if(whiteCarnoList1.size()>0){
|
||||
return -2;//白名单存在该信息!
|
||||
}
|
||||
ret= whiteAccountMapper.insert(whiteAccountText);
|
||||
}catch (Exception e){
|
||||
LogUtil.WriteLog_Error("新增单位信息出错:"+e.getMessage(),"WhiteAccountSeriveImpl");
|
||||
throw new Exception(e);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@Override
|
||||
public int batchDelDatas(Object params) throws Exception {
|
||||
int ret=-1;
|
||||
List<Integer> ids=new ArrayList<Integer>();
|
||||
try{
|
||||
if(!PubTools.isEmpty(params)){
|
||||
if(params instanceof ArrayList){
|
||||
List<Map<String,Object>> whiteAccount= (ArrayList<Map<String,Object>>) params;
|
||||
if(whiteAccount.size()>0){
|
||||
for(int i=0;i<whiteAccount.size();i++){
|
||||
WhiteAccountText wcl=(WhiteAccountText)PubTools.map2Object(whiteAccount.get(i),WhiteAccountText.class);
|
||||
ids.add(wcl.getAcountid());
|
||||
}
|
||||
}
|
||||
}else if(params instanceof JSONArray){
|
||||
JSONArray json=(JSONArray)params;
|
||||
if(json.size()>0){
|
||||
for(int i=0;i<json.size();i++){
|
||||
JSONObject jo=(JSONObject)json.get(i);
|
||||
WhiteAccountText wcl= jo.toJavaObject(WhiteAccountText.class);
|
||||
ids.add(wcl.getAcountid());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(ids.size()>0){
|
||||
ret= whiteAccountMapper.delDataById(ids);
|
||||
}
|
||||
}catch (Exception e){
|
||||
throw new Exception(e);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateById(WhiteAccountText params) throws Exception {
|
||||
int ret=-1;
|
||||
try{
|
||||
ret= whiteAccountMapper.updateById(params);
|
||||
}catch (Exception e){
|
||||
throw new Exception(e);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WhiteAccountText> getWhiteAccountText(Map<String, Object> params) {
|
||||
//从配置文件中读取数据库连接类型
|
||||
params.put("DBTYPE", PubTools.getDBType());
|
||||
List<WhiteAccountText> records = whiteAccountMapper.getWhiteAccountText(params);
|
||||
return records;
|
||||
}
|
||||
}
|
||||
@ -1,132 +0,0 @@
|
||||
package com.nmgs.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nmgs.entity.WhiteAccountText;
|
||||
import com.nmgs.entity.WhiteCarnoDic;
|
||||
import com.nmgs.mapper.Mapper;
|
||||
import com.nmgs.mapper.WhiteCarnoDicMapper;
|
||||
import com.nmgs.service.IWhiteCarnoDicService;
|
||||
import com.nmgs.util.LogUtil;
|
||||
import com.nmgs.util.PropertiesUtil;
|
||||
import com.nmgs.util.PubTools;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class WhiteCarnoDicSeviceImpl implements IWhiteCarnoDicService {
|
||||
@Autowired
|
||||
public WhiteCarnoDicMapper whiteCarnoDicMapper;
|
||||
@Autowired
|
||||
public Mapper mapperI;
|
||||
SimpleDateFormat dateTimeFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
@Override
|
||||
public Page<WhiteCarnoDic> getWhiteCarnoDicByPage(Map<String, Object> params) {
|
||||
//从配置文件中读取数据库连接类型
|
||||
params.put("DBTYPE", PubTools.getDBType());
|
||||
//设置分页
|
||||
Integer pageNum = (Integer) params.get("pageNum");
|
||||
Integer pageSize = (Integer) params.get("pageSize");
|
||||
Page<WhiteCarnoDic> page = new Page<>(pageNum,pageSize);
|
||||
page = whiteCarnoDicMapper.getWhiteCarnoDicByPage(page,params);
|
||||
return page;
|
||||
|
||||
}
|
||||
@Override
|
||||
public int insertData(Map<String, Object> params) throws Exception {
|
||||
int ret=-1;
|
||||
try{
|
||||
//先根据车牌号与颜色判断是否已经存在
|
||||
WhiteCarnoDic whiteAccountText=new WhiteCarnoDic();
|
||||
String memo=params.get("memo").toString();//免费路段的值
|
||||
String memoSS=params.get("memoSS").toString();//站站免费中的路段值
|
||||
String memoDb="";
|
||||
if (!PubTools.isNull(memo)){
|
||||
String[] ckgFree=memo.split(",");
|
||||
for (int i = 0; i < ckgFree.length; i++){
|
||||
String r = ckgFree[i]+"";
|
||||
if (!PubTools.isNull(ckgFree[i]+"")){
|
||||
//不足两位补0,
|
||||
if (Integer.parseInt(ckgFree[i]+"") < 10){
|
||||
memoDb += PubTools.GetHex("0" + ckgFree[i]+"" + "0" + ckgFree[i]+"" + "00" + "0" + ckgFree[i]+"" + "00");
|
||||
}else if(Integer.parseInt(ckgFree[i]+"") < 100 && Integer.parseInt(ckgFree[i]+"")>=10){//两位的
|
||||
memoDb += PubTools.GetHex(ckgFree[i]+"" + ckgFree[i]+"" + "00" + ckgFree[i]+"" + "00");
|
||||
}else{
|
||||
memoDb += PubTools.GetHex(ckgFree[i].substring(0,2)+ ckgFree[i].substring(0,2)+ ckgFree[i].substring(0,2)+ ckgFree[i].substring(0,2)+ ckgFree[i].substring(0,2));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!PubTools.isNull(memoSS)){
|
||||
String[] ckgFree=memoSS.split(",");
|
||||
for (int i = 0; i < ckgFree.length; i++){
|
||||
String r = ckgFree[i]+"";
|
||||
memoDb += PubTools.GetHex(r);
|
||||
}
|
||||
}
|
||||
whiteAccountText.setDicname(params.get("dicname").toString());
|
||||
whiteAccountText.setDiscrp(params.get("discrp").toString());
|
||||
whiteAccountText.setMemo(memoDb);
|
||||
Map<String,Object> paramsQuery=new HashMap<String,Object>();
|
||||
paramsQuery.put("memo",whiteAccountText.getMemo());
|
||||
List<WhiteCarnoDic> whiteCarnoList1 = whiteCarnoDicMapper.getWhiteCarnoDicList(paramsQuery);
|
||||
if(whiteCarnoList1.size()>0){
|
||||
return -2;//字典表中存在该信息!
|
||||
}
|
||||
ret= whiteCarnoDicMapper.insert(whiteAccountText);
|
||||
}catch (Exception e){
|
||||
LogUtil.WriteLog_Error("新增自定义白名单出错:"+e.getMessage(),"WhiteCarnoDicSeviceImpl");
|
||||
throw new Exception(e);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@Override
|
||||
public int batchDelDatas(Object params) throws Exception {
|
||||
int ret=-1;
|
||||
List<String> ids=new ArrayList<String>();
|
||||
try{
|
||||
if(!PubTools.isEmpty(params)){
|
||||
if(params instanceof ArrayList){
|
||||
List<Map<String,Object>> whiteAccount= (ArrayList<Map<String,Object>>) params;
|
||||
if(whiteAccount.size()>0){
|
||||
for(int i=0;i<whiteAccount.size();i++){
|
||||
WhiteCarnoDic wcl=(WhiteCarnoDic)PubTools.map2Object(whiteAccount.get(i),WhiteCarnoDic.class);
|
||||
ids.add(wcl.getMemo());
|
||||
}
|
||||
}
|
||||
}else if(params instanceof JSONArray){
|
||||
JSONArray json=(JSONArray)params;
|
||||
if(json.size()>0){
|
||||
for(int i=0;i<json.size();i++){
|
||||
JSONObject jo=(JSONObject)json.get(i);
|
||||
WhiteCarnoDic wcl= jo.toJavaObject(WhiteCarnoDic.class);
|
||||
ids.add(wcl.getMemo());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(ids.size()>0){
|
||||
ret= whiteCarnoDicMapper.delDataById(ids);
|
||||
}
|
||||
}catch (Exception e){
|
||||
throw new Exception(e);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@Override
|
||||
public List<WhiteCarnoDic> getWhiteCarnoDicList(Map<String, Object> params) {
|
||||
//从配置文件中读取数据库连接类型
|
||||
params.put("DBTYPE", PubTools.getDBType());
|
||||
List<WhiteCarnoDic> records = whiteCarnoDicMapper.getWhiteCarnoDicList(params);
|
||||
return records;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,416 +0,0 @@
|
||||
package com.nmgs.service.impl;
|
||||
|
||||
import cn.hutool.core.lang.UUID;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nmgs.entity.Consistent;
|
||||
import com.nmgs.entity.WhiteCarnoList;
|
||||
import com.nmgs.entity.WhiteCarnoLogTable;
|
||||
import com.nmgs.mapper.WhiteCarnoListMapper;
|
||||
import com.nmgs.mapper.Mapper;
|
||||
import com.nmgs.service.IWhiteCarnoListSerive;
|
||||
import com.nmgs.service.ISelectData;
|
||||
import com.nmgs.service.IWhiteCarnoLogService;
|
||||
import com.nmgs.util.*;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Service
|
||||
public class WhiteCarnoListSeriveImpl implements IWhiteCarnoListSerive {
|
||||
@Autowired
|
||||
public WhiteCarnoListMapper whiteCarnoListMapper;
|
||||
@Autowired
|
||||
public Mapper mapperI;
|
||||
@Autowired
|
||||
public ISelectData iSelectData;
|
||||
|
||||
IWhiteCarnoLogService iWhiteCarnoLogService;
|
||||
@Autowired
|
||||
public void setiWhiteCarnoLogService(IWhiteCarnoLogService iWhiteCarnoLogService) {
|
||||
this.iWhiteCarnoLogService = iWhiteCarnoLogService;
|
||||
}
|
||||
SimpleDateFormat dateTimeFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
@Override
|
||||
public Page<WhiteCarnoList> getWhiteCarnoListByPage(Map<String, Object> params) {
|
||||
//从配置文件中读取数据库连接类型
|
||||
params.put("DBTYPE", PubTools.getDBType());
|
||||
//设置分页
|
||||
Integer pageNum = (Integer) params.get("pageNum");
|
||||
Integer pageSize = (Integer) params.get("pageSize");
|
||||
String whiteOutTimeT = PropertiesUtil.getValue("WhiteOutTime");
|
||||
params.put("CURRENTDATE",PubTools.getCurrentDate());
|
||||
params.put("CURRENTWILLDATE",PubTools.getAddNumDate(Integer.parseInt(whiteOutTimeT)));
|
||||
Page<WhiteCarnoList> page = new Page<>(pageNum,pageSize);
|
||||
//到期数据条件需要做处理
|
||||
if(!PubTools.isEmpty(params.get("SPROMPOTY"))){
|
||||
String sprompoty = params.get("SPROMPOTY").toString();
|
||||
if("2".equals(sprompoty)){//将到期,从配置文件获取距离结束日期 还有几天算将到期
|
||||
String whiteOutTime = PropertiesUtil.getValue("WhiteOutTime");
|
||||
params.put("WILLDATE",PubTools.getAddNumDate(Integer.parseInt(whiteOutTime)));
|
||||
}else if("3".equals(sprompoty)){//已到期
|
||||
params.put("WILLDATE",PubTools.getCurrentDate());
|
||||
}else{
|
||||
|
||||
}
|
||||
}
|
||||
page = whiteCarnoListMapper.getWhiteCarnoListByPage(page,params);
|
||||
/* //获取数据
|
||||
List<WhiteCarnoList> records = page.getRecords();
|
||||
//解析里面字典数据
|
||||
for (WhiteCarnoList divOutPortDroad : records) {
|
||||
divOutPortDroad.setVehicleClassName(iSelectData.getSelect("VECHECLASS", divOutPortDroad.getVehicleClass()+""));
|
||||
divOutPortDroad.setVehicleTypeName(iSelectData.getSelect("VECHETYPE", divOutPortDroad.getVehicleType()+""));
|
||||
divOutPortDroad.setVehicleColorName(iSelectData.getSelect("PLATECOLOR", divOutPortDroad.getVehicleColor()+""));
|
||||
}
|
||||
page.setRecords(records);*/
|
||||
return page;
|
||||
|
||||
}
|
||||
@Override
|
||||
public int insertData(WhiteCarnoList whiteCarnoList) throws Exception {
|
||||
int ret=-1;
|
||||
try{
|
||||
//先根据车牌号与颜色判断是否已经存在
|
||||
Map<String,Object> params=new HashMap<String,Object>();
|
||||
params.put("acarNo",whiteCarnoList.getAcarno());
|
||||
params.put("color",whiteCarnoList.getColor());
|
||||
List<WhiteCarnoList> whiteCarnoList1 = whiteCarnoListMapper.getWhiteCarnoList(params);
|
||||
if(whiteCarnoList1.size()>0){
|
||||
return -2;//白名单存在该信息!
|
||||
}
|
||||
whiteCarnoList.setId(UUID.randomUUID().toString().replace("-","").substring(0,32));
|
||||
whiteCarnoList.setDt(dateTimeFormatter.parse(dateTimeFormatter.format(new Date())));
|
||||
String memoDb="";
|
||||
if(!PubTools.isNull(whiteCarnoList.getQm()) && "1".equals(whiteCarnoList.getQm())){//免费类型:全免的话默认为零
|
||||
memoDb="0000000000";
|
||||
whiteCarnoList.setDiscrp("");
|
||||
}else{
|
||||
//免费路段处理
|
||||
if (!PubTools.isNull(whiteCarnoList.getMfld())){
|
||||
String[] ckgFree=whiteCarnoList.getMfld().split(",");
|
||||
for (int i = 0; i < ckgFree.length; i++){
|
||||
String r = ckgFree[i]+"";
|
||||
if (!PubTools.isNull(ckgFree[i]+"")){
|
||||
//不足两位补0,
|
||||
if (Integer.parseInt(ckgFree[i]+"") < 10){
|
||||
memoDb += PubTools.GetHex("0" + ckgFree[i]+"" + "0" + ckgFree[i]+"" + "00" + "0" + ckgFree[i]+"" + "00");
|
||||
}else if(Integer.parseInt(ckgFree[i]+"") < 100 && Integer.parseInt(ckgFree[i]+"")>=10){//两位的
|
||||
memoDb += PubTools.GetHex(ckgFree[i]+"" + ckgFree[i]+"" + "00" + ckgFree[i]+"" + "00");
|
||||
}else{
|
||||
memoDb += PubTools.GetHex(ckgFree[i].substring(0,2)+ ckgFree[i].substring(0,2)+ ckgFree[i].substring(0,2)+ ckgFree[i].substring(0,2)+ ckgFree[i].substring(0,2));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//免费站站组合
|
||||
if (!PubTools.isNull(whiteCarnoList.getMfzzh())){
|
||||
String[] ckgFree=whiteCarnoList.getMfzzh().split(",");
|
||||
for (int i = 0; i < ckgFree.length; i++){
|
||||
String r = ckgFree[i]+"";
|
||||
memoDb += PubTools.GetHex(r);
|
||||
}
|
||||
}
|
||||
//自定义组合
|
||||
if (!PubTools.isNull(whiteCarnoList.getZdyzh())){
|
||||
String[] ckgFree=whiteCarnoList.getZdyzh().split(",");
|
||||
for (int i = 0; i < ckgFree.length; i++){
|
||||
String r = ckgFree[i]+"";
|
||||
memoDb += r;
|
||||
}
|
||||
}
|
||||
}
|
||||
whiteCarnoList.setMemo(memoDb);
|
||||
ret= whiteCarnoListMapper.insert(whiteCarnoList);
|
||||
if(ret>0){
|
||||
WhiteCarnoLogTable wclt=new WhiteCarnoLogTable();
|
||||
BeanUtils.copyProperties(whiteCarnoList,wclt,"id");
|
||||
wclt.setId(UUID.randomUUID().toString().replace("-","").substring(0,32));
|
||||
wclt.setOperdate(dateTimeFormatter.parse(dateTimeFormatter.format(new Date())));
|
||||
wclt.setOpertype(Consistent.ADD);
|
||||
wclt.setOpertypename(Consistent.ADD_NAME);
|
||||
wclt.setIdbusiness(whiteCarnoList.getId());
|
||||
iWhiteCarnoLogService.saveData(wclt);
|
||||
}
|
||||
}catch (Exception e){
|
||||
LogUtil.WriteLog_Error("新增白名单出错:"+e.getMessage(),"WhiteCarnoListSeriveImpl");
|
||||
throw new Exception(e);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@Override
|
||||
public int insertDataBatch(List<WhiteCarnoList> whiteCarnoList) throws Exception {
|
||||
int ret=-1;
|
||||
try{
|
||||
ret= whiteCarnoListMapper.insertDataBatch(whiteCarnoList);
|
||||
}catch (Exception e){
|
||||
throw new Exception(e);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@Override
|
||||
public int batchDelDatas(Object params) throws Exception {
|
||||
int ret=-1;
|
||||
List<String> ids=new ArrayList<String>();
|
||||
List<WhiteCarnoLogTable> listLog=new ArrayList<WhiteCarnoLogTable>();
|
||||
try{
|
||||
JSONArray json=new JSONArray();
|
||||
if(!PubTools.isEmpty(params)){
|
||||
if(params instanceof ArrayList){
|
||||
List<Map<String,Object>> whiteCarnoList= (ArrayList<Map<String,Object>>) params;
|
||||
if(whiteCarnoList.size()>0){
|
||||
for(int i=0;i<whiteCarnoList.size();i++){
|
||||
WhiteCarnoList wcl=(WhiteCarnoList)PubTools.map2Object(whiteCarnoList.get(i),WhiteCarnoList.class);
|
||||
ids.add(wcl.getId());
|
||||
WhiteCarnoLogTable wclt=new WhiteCarnoLogTable();
|
||||
BeanUtils.copyProperties(wcl,wclt,"id");
|
||||
wclt.setId(UUID.randomUUID().toString().replace("-","").substring(0,32));
|
||||
wclt.setOperdate(dateTimeFormatter.parse(dateTimeFormatter.format(new Date())));
|
||||
wclt.setOpertype(Consistent.DELETE);
|
||||
wclt.setOpertypename(Consistent.DELETE_NAME);
|
||||
wclt.setIdbusiness(wcl.getId());
|
||||
listLog.add(wclt);
|
||||
}
|
||||
}
|
||||
}else if(params instanceof JSONArray){
|
||||
json=(JSONArray)params;
|
||||
if(json.size()>0){
|
||||
for(int i=0;i<json.size();i++){
|
||||
JSONObject jo=(JSONObject)json.get(i);
|
||||
WhiteCarnoList wcl= jo.toJavaObject(WhiteCarnoList.class);
|
||||
ids.add(wcl.getId());
|
||||
WhiteCarnoLogTable wclt=new WhiteCarnoLogTable();
|
||||
BeanUtils.copyProperties(wcl,wclt,"id");
|
||||
wclt.setId(UUID.randomUUID().toString().replace("-","").substring(0,32));
|
||||
wclt.setOperdate(dateTimeFormatter.parse(dateTimeFormatter.format(new Date())));
|
||||
wclt.setOpertype(Consistent.DELETE);
|
||||
wclt.setOpertypename(Consistent.DELETE_NAME);
|
||||
wclt.setIdbusiness(wcl.getId());
|
||||
listLog.add(wclt);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(ids.size()>0){
|
||||
ret= whiteCarnoListMapper.delDataBatch(ids);
|
||||
if(ret>0){
|
||||
iWhiteCarnoLogService.saveBatch(listLog);
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
throw new Exception(e);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateById(WhiteCarnoList params) throws Exception {
|
||||
int ret=-1;
|
||||
try{
|
||||
String memoDb="";
|
||||
if(!PubTools.isNull(params.getQm()) && "1".equals(params.getQm())){//免费类型:全免的话默认为零
|
||||
memoDb="0000000000";
|
||||
}else{
|
||||
|
||||
//免费路段处理
|
||||
if (!PubTools.isNull(params.getMfld())){
|
||||
String[] ckgFree=params.getMfld().split(",");
|
||||
for (int i = 0; i < ckgFree.length; i++){
|
||||
String r = ckgFree[i]+"";
|
||||
if (!PubTools.isNull(ckgFree[i]+"")){
|
||||
//不足两位补0,
|
||||
if (Integer.parseInt(ckgFree[i]+"") < 10){
|
||||
memoDb += PubTools.GetHex("0" + ckgFree[i]+"" + "0" + ckgFree[i]+"" + "00" + "0" + ckgFree[i]+"" + "00");
|
||||
}else if(Integer.parseInt(ckgFree[i]+"") < 100 && Integer.parseInt(ckgFree[i]+"")>=10){//两位的
|
||||
memoDb += PubTools.GetHex(ckgFree[i]+"" + ckgFree[i]+"" + "00" + ckgFree[i]+"" + "00");
|
||||
}else{
|
||||
memoDb += PubTools.GetHex(ckgFree[i].substring(0,2)+ ckgFree[i].substring(0,2)+ ckgFree[i].substring(0,2)+ ckgFree[i].substring(0,2)+ ckgFree[i].substring(0,2));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//免费站站组合
|
||||
if (!PubTools.isNull(params.getMfzzh())){
|
||||
String[] ckgFree=params.getMfzzh().split(",");
|
||||
for (int i = 0; i < ckgFree.length; i++){
|
||||
String r = ckgFree[i]+"";
|
||||
memoDb += PubTools.GetHex(r);
|
||||
}
|
||||
}
|
||||
//自定义组合
|
||||
if (!PubTools.isNull(params.getZdyzh())){
|
||||
String[] ckgFree=params.getZdyzh().split(",");
|
||||
for (int i = 0; i < ckgFree.length; i++){
|
||||
String r = ckgFree[i]+"";
|
||||
memoDb += r;
|
||||
}
|
||||
}
|
||||
}
|
||||
params.setMemo(memoDb);
|
||||
ret= whiteCarnoListMapper.updateById(params);
|
||||
WhiteCarnoLogTable wclt=new WhiteCarnoLogTable();
|
||||
BeanUtils.copyProperties(params,wclt,"id");
|
||||
wclt.setId(UUID.randomUUID().toString().replace("-","").substring(0,32));
|
||||
wclt.setOperdate(dateTimeFormatter.parse(dateTimeFormatter.format(new Date())));
|
||||
wclt.setOpertype(Consistent.UPDATE);
|
||||
wclt.setOpertypename(Consistent.UPDATE_NAME);
|
||||
wclt.setIdbusiness(params.getId());
|
||||
iWhiteCarnoLogService.saveData(wclt);
|
||||
}catch (Exception e){
|
||||
throw new Exception(e);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WhiteCarnoList> getWhiteCarnoList(Map<String, Object> params) {
|
||||
//从配置文件中读取数据库连接类型
|
||||
params.put("DBTYPE", PubTools.getDBType());
|
||||
String whiteOutTimeT = PropertiesUtil.getValue("WhiteOutTime");
|
||||
params.put("CURRENTDATE",PubTools.getCurrentDate());
|
||||
params.put("CURRENTWILLDATE",PubTools.getAddNumDate(Integer.parseInt(whiteOutTimeT)));
|
||||
//到期数据条件需要做处理
|
||||
if(!PubTools.isEmpty(params.get("SPROMPOTY"))){
|
||||
String sprompoty = params.get("SPROMPOTY").toString();
|
||||
if("2".equals(sprompoty)){//将到期,从配置文件获取距离结束日期 还有几天算将到期
|
||||
String whiteOutTime = PropertiesUtil.getValue("WhiteOutTime");
|
||||
params.put("WILLDATE",PubTools.getAddNumDate(Integer.parseInt(whiteOutTime)));
|
||||
}else if("3".equals(sprompoty)){//已到期
|
||||
params.put("WILLDATE",PubTools.getCurrentDate());
|
||||
}else{
|
||||
|
||||
}
|
||||
}
|
||||
List<WhiteCarnoList> records = whiteCarnoListMapper.getWhiteCarnoList(params);
|
||||
//获取数据
|
||||
//解析里面字典数据
|
||||
/* for (WhiteCarnoList divOutPortDroad : records) {
|
||||
divOutPortDroad.setVehicleClassName(iSelectData.getSelect("VECHECLASS", divOutPortDroad.getVehicleClass()+""));
|
||||
divOutPortDroad.setVehicleTypeName(iSelectData.getSelect("VECHETYPE", divOutPortDroad.getVehicleType()+""));
|
||||
divOutPortDroad.setVehicleColorName(iSelectData.getSelect("PLATECOLOR", divOutPortDroad.getColor()+""));
|
||||
}*/
|
||||
return records;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int batchUpdateById(Map<String, Object> req) throws Exception {
|
||||
try{
|
||||
req.put("DBType",PubTools.getDBType());
|
||||
if(!PubTools.isEmpty(req.get("id"))){
|
||||
String[] ids = req.get("id").toString().split(",");
|
||||
int i = whiteCarnoListMapper.batchUpdateById(ids, req);
|
||||
if(i>0){
|
||||
for(String str:ids){
|
||||
Map<String,Object> params2=new HashMap<String,Object>();
|
||||
params2.put("id",str);
|
||||
List<WhiteCarnoList> whiteCarnoList1 = whiteCarnoListMapper.getWhiteCarnoList(params2);
|
||||
WhiteCarnoList params = whiteCarnoList1.get(0);
|
||||
WhiteCarnoLogTable wclt=new WhiteCarnoLogTable();
|
||||
BeanUtils.copyProperties(params,wclt,"id");
|
||||
wclt.setId(UUID.randomUUID().toString().replace("-","").substring(0,32));
|
||||
wclt.setOperdate(dateTimeFormatter.parse(dateTimeFormatter.format(new Date())));
|
||||
wclt.setOpertype(Consistent.UPDATE);
|
||||
wclt.setOpertypename(Consistent.UPDATE_NAME);
|
||||
wclt.setIdbusiness(params.getId());
|
||||
wclt.setOpermano(req.get("opermano").toString());
|
||||
wclt.setOpermaname(req.get("opermaname").toString());
|
||||
iWhiteCarnoLogService.saveData(wclt);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}catch (Exception e){
|
||||
throw new Exception(e);
|
||||
}
|
||||
return -1;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIOCount() {
|
||||
String sql="select COUNT(1) from CARNO_TABLE where ACARNO like '%I%' or ACARNO like '%O%'";
|
||||
List selectforlist = this.mapperI.selectforlist(sql);
|
||||
return selectforlist.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int publishVersion(Map<String, Object> req) throws Exception {
|
||||
req.put("DBType",PubTools.getDBType());
|
||||
int ret= this.whiteCarnoListMapper.publishVersion(req);
|
||||
if(ret>-1){
|
||||
WhiteCarnoLogTable wclt = new WhiteCarnoLogTable();
|
||||
wclt.setId(UUID.randomUUID().toString().replace("-","").substring(0,32));
|
||||
wclt.setOperdate(dateTimeFormatter.parse(dateTimeFormatter.format(new Date())));
|
||||
wclt.setOpertype(Consistent.UPDATE_VERSION);
|
||||
wclt.setOpertypename(Consistent.UPDATE_VERSION_NAME);
|
||||
wclt.setIdbusiness("0000000000000");
|
||||
wclt.setOpermano(req.get("opermano").toString());
|
||||
wclt.setOpermaname(req.get("opermaname").toString());
|
||||
wclt.setAcarno("版本更新");
|
||||
wclt.setColor(1);
|
||||
wclt.setBegdate(dateTimeFormatter.parse(dateTimeFormatter.format(new Date())));
|
||||
wclt.setBegdt(dateTimeFormatter.parse(dateTimeFormatter.format(new Date())));
|
||||
wclt.setEnddt(dateTimeFormatter.parse(dateTimeFormatter.format(new Date())));
|
||||
wclt.setDescrib("为版本更新时产生的日志");
|
||||
wclt.setDt(dateTimeFormatter.parse(dateTimeFormatter.format(new Date())));
|
||||
wclt.setAccount(0);
|
||||
wclt.setVerno(req.get("verno").toString());
|
||||
iWhiteCarnoLogService.saveData(wclt);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String,String> getVersion(Map<String, Object> req) throws Exception {
|
||||
req.put("DBType",PubTools.getDBType());
|
||||
String verN = "";
|
||||
String oldVerno = "0";
|
||||
Map<String,String> map=new HashMap<String,String>();
|
||||
//获取当前时间
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("yyMMdd");
|
||||
String nydm = sdf.format(new Date());
|
||||
int newymd = Integer.parseInt(nydm);
|
||||
if(PubTools.isEmpty(req)){
|
||||
req=new HashMap<String, Object>();
|
||||
}
|
||||
req.put("whereSql"," t.VERNO !='0' and VERNO is not null");
|
||||
List<WhiteCarnoList> whiteCarno = this.getWhiteCarno(req);
|
||||
//获取老版本数据
|
||||
if (whiteCarno.size() > 0 && !PubTools.isEmpty(whiteCarno.get(0))) {
|
||||
if ( !PubTools.isNull(whiteCarno.get(0).getVerno()) && whiteCarno.get(0).getVerno().length() > 6) {
|
||||
//获取老版本版本号
|
||||
oldVerno =whiteCarno.get(0).getVerno();
|
||||
//获取老版本时间
|
||||
String oymd = oldVerno.substring(0, 6);
|
||||
int oldymd = Integer.parseInt(oymd);
|
||||
if (oldymd == newymd) {//当天更改的 每次加 1
|
||||
int count = Integer.parseInt(oldVerno.substring(oldVerno.length() - 1));
|
||||
int i = count + 1;
|
||||
verN = nydm + (i+"");
|
||||
}
|
||||
else{
|
||||
verN = (nydm + "1");
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
verN = nydm + "1";
|
||||
}
|
||||
map.put("oldVerno",oldVerno);
|
||||
map.put("verno",verN);
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WhiteCarnoList> getWhiteCarno(Map<String, Object> params) {
|
||||
return this.whiteCarnoListMapper.getWhiteCarno(params);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,47 +0,0 @@
|
||||
package com.nmgs.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nmgs.entity.WhiteCarnoList;
|
||||
import com.nmgs.entity.WhiteCarnoLogTable;
|
||||
import com.nmgs.entity.WhiteOperationLog;
|
||||
import com.nmgs.mapper.WhiteCarnoLogMapper;
|
||||
import com.nmgs.mapper.WhiteOperationLogMapper;
|
||||
import com.nmgs.service.IOperationLogService;
|
||||
import com.nmgs.service.IWhiteCarnoLogService;
|
||||
import com.nmgs.util.PropertiesUtil;
|
||||
import com.nmgs.util.PubTools;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class WhiteCarnoLogServiceImpl extends ServiceImpl<WhiteCarnoLogMapper,WhiteCarnoLogTable> implements IWhiteCarnoLogService {
|
||||
|
||||
WhiteCarnoLogMapper whiteOperationLogMapper;
|
||||
@Autowired
|
||||
public void setWhiteOperationLogMapper(WhiteCarnoLogMapper whiteOperationLogMapper) {
|
||||
this.whiteOperationLogMapper = whiteOperationLogMapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int saveData(WhiteCarnoLogTable operationLog) {
|
||||
return whiteOperationLogMapper.insert(operationLog);
|
||||
}
|
||||
@Override
|
||||
public Page<WhiteCarnoLogTable> getWhiteCarnoLogByPage(Map<String, Object> params) {
|
||||
//从配置文件中读取数据库连接类型
|
||||
params.put("DBTYPE", PubTools.getDBType());
|
||||
//设置分页
|
||||
Integer pageNum = (Integer) params.get("pageNum");
|
||||
Integer pageSize = (Integer) params.get("pageSize");
|
||||
Page<WhiteCarnoLogTable> page = new Page<>(pageNum,pageSize);
|
||||
page = whiteOperationLogMapper.getWhiteCarnoLogByPage(page,params);
|
||||
return page;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue