forked from integrated_whb/integrated_whb
运营车辆 修改 车船税
parent
ece25c0daf
commit
a2576d4258
|
@ -35,9 +35,9 @@ public class OperatingVehiclesController extends BaseController {
|
|||
@RequestMapping(value="/add")
|
||||
@ResponseBody
|
||||
public Object add(
|
||||
@RequestParam(value="headstockFile",required=false) MultipartFile headstockFile,
|
||||
@RequestParam(value="drivinglicenseFile",required=false) MultipartFile drivinglicenseFile,
|
||||
@RequestParam(value="operatingCertificateFile",required=false) MultipartFile operatingCertificateFile
|
||||
/*@RequestParam(value="headstockphoto",required=false) MultipartFile headstockphoto,
|
||||
@RequestParam(value="drivinglicensephoto",required=false) MultipartFile drivinglicensephoto,
|
||||
@RequestParam(value="operatingcertificatephoto",required=false) MultipartFile operatingcertificatephoto*/
|
||||
) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -52,36 +52,36 @@ public class OperatingVehiclesController extends BaseController {
|
|||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
if (null != headstockFile && !headstockFile.isEmpty()) {
|
||||
/*if (null != headstockphoto && !headstockphoto.isEmpty()) {
|
||||
String ffile = DateUtil.getDays();
|
||||
//本地
|
||||
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile; //文件上传路径
|
||||
// String fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
||||
//服务器
|
||||
String fileName = this.get32UUID()+headstockFile.getOriginalFilename().substring(headstockFile.getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(headstockFile, fileName, Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||
String fileName = this.get32UUID()+headstockphoto.getOriginalFilename().substring(headstockphoto.getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(headstockphoto, fileName, Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||
pd.put("HEADSTOCK_PHOTO", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||
}
|
||||
if (null != drivinglicenseFile && !drivinglicenseFile.isEmpty()) {
|
||||
if (null != drivinglicensephoto && !drivinglicensephoto.isEmpty()) {
|
||||
String ffile = DateUtil.getDays();
|
||||
//本地
|
||||
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile; //文件上传路径
|
||||
// String fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
||||
//服务器
|
||||
String fileName = this.get32UUID()+drivinglicenseFile.getOriginalFilename().substring(drivinglicenseFile.getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(drivinglicenseFile, fileName, Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||
String fileName = this.get32UUID()+drivinglicensephoto.getOriginalFilename().substring(drivinglicensephoto.getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(drivinglicensephoto, fileName, Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||
pd.put("DRIVINGLICENSE_PHOTO", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||
}
|
||||
if (null != operatingCertificateFile && !operatingCertificateFile.isEmpty()) {
|
||||
if (null != operatingcertificatephoto && !operatingcertificatephoto.isEmpty()) {
|
||||
String ffile = DateUtil.getDays();
|
||||
//本地
|
||||
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile; //文件上传路径
|
||||
// String fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
||||
//服务器
|
||||
String fileName = this.get32UUID()+operatingCertificateFile.getOriginalFilename().substring(operatingCertificateFile.getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(operatingCertificateFile, fileName, Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||
String fileName = this.get32UUID()+operatingcertificatephoto.getOriginalFilename().substring(operatingcertificatephoto.getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(operatingcertificatephoto, fileName, Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||
pd.put("OPERATING_CERTIFICATE_PHOTO", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||
}
|
||||
}*/
|
||||
operatingVehiclesService.save(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
|
|
|
@ -0,0 +1,176 @@
|
|||
package com.zcloud.controller.taxationManage;
|
||||
|
||||
import com.alibaba.excel.util.DateUtils;
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.logs.LogAnno;
|
||||
import com.zcloud.service.assignedManage.AssignedManageService;
|
||||
import com.zcloud.service.system.DictionariesService;
|
||||
import com.zcloud.service.taxationManage.TaxationManageService;
|
||||
import com.zcloud.util.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/taxationmanage")
|
||||
public class TaxationManageController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private TaxationManageService taxationManageService;
|
||||
|
||||
@Autowired
|
||||
private Smb smb;
|
||||
|
||||
/**新增
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/add")
|
||||
@ResponseBody
|
||||
public Object add(
|
||||
@RequestParam(value="drivinglicenseFile",required=false) MultipartFile drivinglicenseFile
|
||||
) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("TAXATION_ID", this.get32UUID()); //车船税主键
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
if("".equals(pd.getString("EXPIRE_STATUS"))) {
|
||||
String expireDate = pd.getString("EXPIRE_DATE");
|
||||
String day = DateUtil.getDay();
|
||||
boolean flag = DateUtil.compareDate(expireDate, day);
|
||||
if(flag) {
|
||||
pd.put("EXPIRE_STATUS","未到期");
|
||||
}else{
|
||||
pd.put("EXPIRE_STATUS","已到期");
|
||||
}
|
||||
}
|
||||
if (null != drivinglicenseFile && !drivinglicenseFile.isEmpty()) {
|
||||
String ffile = DateUtil.getDays();
|
||||
//本地
|
||||
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile; //文件上传路径
|
||||
// String fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
||||
//服务器
|
||||
String fileName = this.get32UUID()+drivinglicenseFile.getOriginalFilename().substring(drivinglicenseFile.getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(drivinglicenseFile, fileName, Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||
pd.put("DRIVINGLICENSE_PHOTO", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||
}
|
||||
taxationManageService.save(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
@ResponseBody
|
||||
public Object delete() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("DELETOR", Jurisdiction.getUSER_ID());
|
||||
pd.put("DELETORNAME", Jurisdiction.getUsername());
|
||||
pd.put("DELETTIME", DateUtil.date2Str(new Date()));
|
||||
taxationManageService.delete(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/edit")
|
||||
@ResponseBody
|
||||
public Object edit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
String expireDate = pd.getString("EXPIRE_DATE");
|
||||
String day = DateUtil.getDay();
|
||||
boolean flag = DateUtil.compareDate(expireDate, day);
|
||||
if(flag) {
|
||||
pd.put("EXPIRE_STATUS","未到期");
|
||||
}else{
|
||||
pd.put("EXPIRE_STATUS","已到期");
|
||||
}
|
||||
taxationManageService.edit(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
/**去修改页面获取数据
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/goEdit")
|
||||
@ResponseBody
|
||||
public Object goEdit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd = taxationManageService.findById(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value="/list")
|
||||
@ResponseBody
|
||||
public Object list(Page page) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = taxationManageService.list(page); //列出MajorDangerSource列表
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/taxationList")
|
||||
@ResponseBody
|
||||
public Object taxationList() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
String corpId = Jurisdiction.getCORPINFO_ID();
|
||||
List<PageData> list = taxationManageService.taxationList(corpId); //列出Question列表
|
||||
map.put("list", list);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package com.zcloud.mapper.datasource.taxationManage;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TaxationManageMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
List<PageData> taxationList(String corpId);
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.zcloud.service.taxationManage;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TaxationManageService {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
public List<PageData> list(Page page);
|
||||
|
||||
public List<PageData> taxationList(String corpId) throws Exception;
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
package com.zcloud.service.taxationManage.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.operatingvehicles.OperatingVehiclesMapper;
|
||||
import com.zcloud.mapper.datasource.taxationManage.TaxationManageMapper;
|
||||
import com.zcloud.service.operatingvehicles.OperatingVehiclesService;
|
||||
import com.zcloud.service.taxationManage.TaxationManageService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class TaxationManageServiceImpl implements TaxationManageService {
|
||||
|
||||
@Autowired
|
||||
private TaxationManageMapper taxationManageMapper;
|
||||
|
||||
@Override
|
||||
public void save(PageData pd) throws Exception {
|
||||
taxationManageMapper.save(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(PageData pd) throws Exception {
|
||||
taxationManageMapper.delete(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(PageData pd) throws Exception {
|
||||
taxationManageMapper.edit(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData findById(PageData pd) throws Exception {
|
||||
return taxationManageMapper.findById(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> list(Page page) {
|
||||
return taxationManageMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> taxationList(String corpId) throws Exception {
|
||||
return taxationManageMapper.taxationList(corpId);
|
||||
}
|
||||
}
|
|
@ -16,6 +16,7 @@
|
|||
<sql id="Field">
|
||||
f.OPERATING_ID,
|
||||
f.GOODSSELFNUMBER,
|
||||
f.CORPINFO_ID,
|
||||
f.PLATE_NUMBER,
|
||||
f.VEHICLE_COLOR,
|
||||
f.FRAMES_NUMBER,
|
||||
|
@ -66,14 +67,14 @@
|
|||
f.OPERATTIME,
|
||||
f.DELETOR,
|
||||
f.DELETORNAME,
|
||||
f.DELETTIME,
|
||||
f.CORPINFO_ID
|
||||
f.DELETTIME
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
OPERATING_ID,
|
||||
GOODSSELFNUMBER,
|
||||
CORPINFO_ID,
|
||||
PLATE_NUMBER,
|
||||
VEHICLE_COLOR,
|
||||
FRAMES_NUMBER,
|
||||
|
@ -124,14 +125,14 @@
|
|||
OPERATTIME,
|
||||
DELETOR,
|
||||
DELETORNAME,
|
||||
DELETTIME,
|
||||
CORPINFO_ID
|
||||
DELETTIME
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{OPERATING_ID},
|
||||
#{GOODSSELFNUMBER},
|
||||
#{CORPINFO_ID},
|
||||
#{PLATE_NUMBER},
|
||||
#{VEHICLE_COLOR},
|
||||
#{FRAMES_NUMBER},
|
||||
|
@ -183,7 +184,6 @@
|
|||
#{DELETOR},
|
||||
#{DELETORNAME},
|
||||
#{DELETTIME}
|
||||
#{CORPINFO_ID}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
|
|
|
@ -0,0 +1,446 @@
|
|||
<?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.zcloud.mapper.datasource.taxationManage.TaxationManageMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
BUS_TRAFFIC_TAXATION_MANAGE
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.TAXATION_ID,
|
||||
f.RECORD_NUMBER,
|
||||
f.CORPINFO_ID,
|
||||
f.PLATE_NUMBER,
|
||||
f.VEHICLEOWNER,
|
||||
f.CONTACT_NUMBER,
|
||||
f.TRANSACTION_DATA,
|
||||
f.TAXESDUES_PERIOD,
|
||||
f.EXPIRE_DATE,
|
||||
f.REGISTRANT,
|
||||
f.TRANSPORT_ENTERPRISES,
|
||||
f.REMINDER_STATUS,
|
||||
f.EXPIRE_STATUS,
|
||||
f.RECORD_STATUS,
|
||||
f.TRAILER_VEHICLE,
|
||||
f.FRAMES_NUMBER,
|
||||
f.VEHICLE_TYPE,
|
||||
f.VEHICLEOWNER_NUMBER,
|
||||
f.FIRSTSHOW_DATE,
|
||||
f.PROVINCE,
|
||||
f.CITY,
|
||||
f.COUNTY,
|
||||
f.REMINDER_DAY,
|
||||
f.REMINDER_DATA,
|
||||
f.TAXESDUES_MATERIAL,
|
||||
f.REMARK,
|
||||
f.REGISTER_NUMBER,
|
||||
f.VEHICLE_MODEL,
|
||||
f.VEHICLE_BRAND,
|
||||
f.DRIVINGLICENSE_PHOTO,
|
||||
f.ISDELETE,
|
||||
f.CREATOR,
|
||||
f.CREATORNAME,
|
||||
f.CREATTIME,
|
||||
f.OPERATOR,
|
||||
f.OPERATORNAME,
|
||||
f.OPERATTIME,
|
||||
f.DELETOR,
|
||||
f.DELETORNAME,
|
||||
f.DELETTIME
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
TAXATION_ID,
|
||||
RECORD_NUMBER,
|
||||
CORPINFO_ID,
|
||||
PLATE_NUMBER,
|
||||
VEHICLEOWNER,
|
||||
CONTACT_NUMBER,
|
||||
TRANSACTION_DATA,
|
||||
TAXESDUES_PERIOD,
|
||||
EXPIRE_DATE,
|
||||
REGISTRANT,
|
||||
TRANSPORT_ENTERPRISES,
|
||||
REMINDER_STATUS,
|
||||
EXPIRE_STATUS,
|
||||
RECORD_STATUS,
|
||||
TRAILER_VEHICLE,
|
||||
FRAMES_NUMBER,
|
||||
VEHICLE_TYPE,
|
||||
VEHICLEOWNER_NUMBER,
|
||||
FIRSTSHOW_DATE,
|
||||
PROVINCE,
|
||||
CITY,
|
||||
COUNTY,
|
||||
REMINDER_DAY,
|
||||
REMINDER_DATA,
|
||||
TAXESDUES_MATERIAL,
|
||||
REMARK,
|
||||
REGISTER_NUMBER,
|
||||
VEHICLE_MODEL,
|
||||
VEHICLE_BRAND,
|
||||
DRIVINGLICENSE_PHOTO,
|
||||
ISDELETE,
|
||||
CREATOR,
|
||||
CREATORNAME,
|
||||
CREATTIME,
|
||||
OPERATOR,
|
||||
OPERATORNAME,
|
||||
OPERATTIME,
|
||||
DELETOR,
|
||||
DELETORNAME,
|
||||
DELETTIME
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{TAXATION_ID},
|
||||
#{RECORD_NUMBER},
|
||||
#{CORPINFO_ID,},
|
||||
#{PLATE_NUMBER},
|
||||
#{VEHICLEOWNER},
|
||||
#{CONTACT_NUMBER},
|
||||
#{TRANSACTION_DATA},
|
||||
#{TAXESDUES_PERIOD},
|
||||
#{EXPIRE_DATE},
|
||||
#{REGISTRANT},
|
||||
#{TRANSPORT_ENTERPRISES},
|
||||
#{REMINDER_STATUS},
|
||||
#{EXPIRE_STATUS},
|
||||
#{RECORD_STATUS},
|
||||
#{TRAILER_VEHICLE},
|
||||
#{FRAMES_NUMBER},
|
||||
#{VEHICLE_TYPE},
|
||||
#{VEHICLEOWNER_NUMBER},
|
||||
#{FIRSTSHOW_DATE},
|
||||
#{PROVINCE},
|
||||
#{CITY},
|
||||
#{COUNTY},
|
||||
#{REMINDER_DAY},
|
||||
#{REMINDER_DATA},
|
||||
#{TAXESDUES_MATERIAL},
|
||||
#{REMARK},
|
||||
#{REGISTER_NUMBER},
|
||||
#{VEHICLE_MODEL},
|
||||
#{VEHICLE_BRAND},
|
||||
#{DRIVINGLICENSE_PHOTO},
|
||||
#{ISDELETE},
|
||||
#{CREATOR},
|
||||
#{CREATORNAME},
|
||||
#{CREATTIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATORNAME},
|
||||
#{OPERATTIME},
|
||||
#{DELETOR},
|
||||
#{DELETORNAME},
|
||||
#{DELETTIME}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
TAXATION_ID = #{TAXATION_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
TAXATION_ID = #{TAXATION_ID},
|
||||
RECORD_NUMBER = #{RECORD_NUMBER},
|
||||
CORPINFO_ID = #{CORPINFO_ID},
|
||||
PLATE_NUMBER = #{PLATE_NUMBER},
|
||||
VEHICLEOWNER = #{VEHICLEOWNER},
|
||||
CONTACT_NUMBER = #{CONTACT_NUMBER},
|
||||
TRANSACTION_DATA = #{TRANSACTION_DATA},
|
||||
TAXESDUES_PERIOD = #{TAXESDUES_PERIOD},
|
||||
EXPIRE_DATE = #{EXPIRE_DATE},
|
||||
REGISTRANT = #{REGISTRANT},
|
||||
TRANSPORT_ENTERPRISES = #{TRANSPORT_ENTERPRISES},
|
||||
REMINDER_STATUS = #{REMINDER_STATUS},
|
||||
EXPIRE_STATUS = #{EXPIRE_STATUS},
|
||||
RECORD_STATUS = #{RECORD_STATUS},
|
||||
TRAILER_VEHICLE = #{TRAILER_VEHICLE},
|
||||
FRAMES_NUMBER = #{FRAMES_NUMBER},
|
||||
VEHICLE_TYPE = #{VEHICLE_TYPE},
|
||||
VEHICLEOWNER_NUMBER = #{VEHICLEOWNER_NUMBER},
|
||||
FIRSTSHOW_DATE = #{FIRSTSHOW_DATE},
|
||||
PROVINCE = #{PROVINCE},
|
||||
CITY = #{CITY},
|
||||
COUNTY = #{COUNTY},
|
||||
REMINDER_DAY = #{REMINDER_DAY},
|
||||
REMINDER_DATA = #{REMINDER_DATA},
|
||||
TAXESDUES_MATERIAL = #{TAXESDUES_MATERIAL},
|
||||
REMARK = #{REMARK},
|
||||
REGISTER_NUMBER = #{REGISTER_NUMBER},
|
||||
VEHICLE_MODEL = #{VEHICLE_MODEL},
|
||||
VEHICLE_BRAND = #{VEHICLE_BRAND},
|
||||
DRIVINGLICENSE_PHOTO = #{DRIVINGLICENSE_PHOTO},
|
||||
ISDELETE = #{ISDELETE},
|
||||
CREATOR = #{CREATOR},
|
||||
CREATORNAME = #{CREATORNAME},
|
||||
CREATTIME = #{CREATTIME},
|
||||
OPERATOR = #{OPERATOR},
|
||||
OPERATORNAME = #{OPERATORNAME},
|
||||
OPERATTIME = #{OPERATTIME},
|
||||
DELETOR = #{DELETOR},
|
||||
DELETORNAME = #{DELETORNAME},
|
||||
DELETTIME = #{DELETTIME}
|
||||
where
|
||||
TAXATION_ID = #{TAXATION_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.TAXATION_ID = #{TAXATION_ID}
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<!--<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join sys_user u on u.USER_ID = f.USER_ID
|
||||
left join oa_department d on d.DEPARTMENT_ID = u.DEPARTMENT_ID
|
||||
left join sys_post p on p.POST_ID = u.POST_ID
|
||||
left join sys_user ru on ru.USER_ID = f.REVIEW_USER_ID
|
||||
left join oa_department rd on rd.DEPARTMENT_ID = ru.DEPARTMENT_ID
|
||||
where (f.ISDELETE = '0' or (f.ISDELETE = '1' and f.REVIEW_STATUS = '-1'))
|
||||
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!– 关键词检索 –>
|
||||
and
|
||||
(
|
||||
u.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
)
|
||||
</if>
|
||||
<if test="pd.REVIEW_STATUS != null and pd.REVIEW_STATUS != ''"><!– 关键词检索 –>
|
||||
<choose>
|
||||
<when test="pd.REVIEW_STATUS == 0">
|
||||
and f.REVIEW_STATUS = '0'
|
||||
</when>
|
||||
<when test="pd.REVIEW_STATUS == 1">
|
||||
and f.REVIEW_STATUS = '1'
|
||||
</when>
|
||||
<when test="pd.REVIEW_STATUS == 2">
|
||||
and f.REVIEW_STATUS = '2'
|
||||
</when>
|
||||
<when test="pd.REVIEW_STATUS == -1">
|
||||
and f.ISDELETE = '0' and f.REVIEW_STATUS = '-1'
|
||||
</when>
|
||||
<when test="pd.REVIEW_STATUS == 3">
|
||||
and f.CREATOR = f.OPERATOR and f.ISDELETE = '1' and f.REVIEW_STATUS = '-1'
|
||||
</when>
|
||||
<when test="pd.REVIEW_STATUS == 4">
|
||||
and f.CREATOR != f.OPERATOR and f.ISDELETE = '1' and f.REVIEW_STATUS = '-1'
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
<if test="pd.REVIEW_USER_NAME != null and pd.REVIEW_USER_NAME != ''"><!– 关键词检索 –>
|
||||
and ru.NAME LIKE CONCAT(CONCAT('%', #{pd.REVIEW_USER_NAME}),'%')
|
||||
</if>
|
||||
<if test="pd.DEPT_DOWN_ARR != null and pd.DEPT_DOWN_ARR.size() > 0">
|
||||
AND d.DEPARTMENT_ID IN
|
||||
<foreach item="item" collection="pd.DEPT_DOWN_ARR" open="(" separator="," close=")">
|
||||
'${item}'
|
||||
</foreach>
|
||||
</if>
|
||||
<!– <if test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''">关键词检索
|
||||
and d.DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
|
||||
</if>
|
||||
–>
|
||||
|
||||
<choose>
|
||||
<when test='pd.ISMAIN != null and pd.ISMAIN != "" and pd.ISMAIN == "1"'>
|
||||
<if test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
|
||||
and
|
||||
d.DEPARTMENT_ID in
|
||||
<foreach item="item" index="index"
|
||||
collection="pd.DEPT_IDS" open="(" separator="," close=")">
|
||||
'${item}'
|
||||
</foreach>
|
||||
</if>
|
||||
</when>
|
||||
<otherwise>
|
||||
<choose>
|
||||
<when test='pd.ISSUPERVISE != null and pd.ISSUPERVISE != "" and pd.ISSUPERVISE == "1"'>
|
||||
<choose>
|
||||
<when test='pd.ISLEADER != null and pd.ISLEADER != "" and pd.ISLEADER == "1"'>
|
||||
<choose>
|
||||
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
|
||||
and
|
||||
d.DEPARTMENT_ID in
|
||||
<foreach item="item" index="index"
|
||||
collection="pd.DEPT_IDS" open="(" separator="," close=")">
|
||||
'${item}'
|
||||
</foreach>
|
||||
</when>
|
||||
<otherwise>
|
||||
and
|
||||
((d.DEPARTMENT_ID in (
|
||||
select
|
||||
SUB_DEPARTMENT_ID
|
||||
from
|
||||
oa_supervision_department osd
|
||||
where
|
||||
osd.SUP_DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
|
||||
and osd.ISDELETE = '0'
|
||||
and osd.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
)) or (
|
||||
d.DEPARTMENT_ID in
|
||||
<foreach item="item" index="index"
|
||||
collection="pd.DEPARTMENT_IDS" open="(" separator="," close=")">
|
||||
'${item}'
|
||||
</foreach>
|
||||
))
|
||||
</otherwise>
|
||||
</choose>
|
||||
</when>
|
||||
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
|
||||
or f.REVIEW_USER_ID = #{pd.USER_ID}
|
||||
and
|
||||
d.DEPARTMENT_ID in
|
||||
<foreach item="item" index="index"
|
||||
collection="pd.DEPT_IDS" open="(" separator="," close=")">
|
||||
'${item}'
|
||||
</foreach>
|
||||
</when>
|
||||
<otherwise>
|
||||
|
||||
and
|
||||
d.DEPARTMENT_ID in (
|
||||
select
|
||||
SUB_DEPARTMENT_ID
|
||||
from
|
||||
oa_supervision_department osd
|
||||
where
|
||||
osd.SUP_DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
|
||||
and osd.ISDELETE = '0'
|
||||
and osd.CORPINFO_ID = #{pd.CORPINFO_ID})
|
||||
or f.REVIEW_USER_ID = #{pd.USER_ID}
|
||||
</otherwise>
|
||||
</choose>
|
||||
</when>
|
||||
<when test='pd.ISLEADER != null and pd.ISLEADER != "" and pd.ISLEADER == "1"'>
|
||||
<choose>
|
||||
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
|
||||
and
|
||||
d.DEPARTMENT_ID in
|
||||
<foreach item="item" index="index"
|
||||
collection="pd.DEPT_IDS" open="(" separator="," close=")">
|
||||
'${item}'
|
||||
</foreach>
|
||||
</when>
|
||||
<otherwise>
|
||||
and
|
||||
d.DEPARTMENT_ID in
|
||||
<foreach item="item" index="index"
|
||||
collection="pd.DEPARTMENT_IDS" open="(" separator="," close=")">
|
||||
'${item}'
|
||||
</foreach>
|
||||
</otherwise>
|
||||
</choose>
|
||||
</when>
|
||||
<when test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''">
|
||||
and d.DEPARTMENT_ID=#{pd.DEPARTMENT_ID}
|
||||
and f.REVIEW_USER_ID = #{pd.USER_ID}
|
||||
</when>
|
||||
<otherwise>
|
||||
</otherwise>
|
||||
</choose>
|
||||
</otherwise>
|
||||
</choose>
|
||||
<choose>
|
||||
<when test="pd.STARTTIME != null and pd.STARTTIME != '' and pd.ENDTIME != null and pd.ENDTIME != ''">
|
||||
and DATE_FORMAT(#{pd.STARTTIME},'%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(f.STARTTIME,'%Y-%m-%d %H:%i:%s')
|
||||
and DATE_FORMAT(#{pd.ENDTIME},'%Y-%m-%d %H:%i:%s') >= DATE_FORMAT(f.ENDTIME,'%Y-%m-%d %H:%i:%s')
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="pd.STARTTIME != null and pd.STARTTIME != ''">
|
||||
and DATE_FORMAT(#{pd.STARTTIME},'%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(f.ENDTIME,'%Y-%m-%d %H:%i:%s')
|
||||
</if>
|
||||
<if test="pd.ENDTIME != null and pd.ENDTIME != ''">
|
||||
and DATE_FORMAT(#{pd.ENDTIME},'%Y-%m-%d %H:%i:%s') >= DATE_FORMAT(f.STARTTIME,'%Y-%m-%d %H:%i:%s')
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
order by f.OPERATTIME desc
|
||||
</select>-->
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.PLATE_NUMBER != null and pd.PLATE_NUMBER != ''"><!-- 关键词检索 -->
|
||||
and f.PLATE_NUMBER LIKE CONCAT(CONCAT('%', #{pd.PLATE_NUMBER}),'%')
|
||||
</if>
|
||||
<if test="pd.VEHICLEOWNER != null and pd.VEHICLEOWNER != ''"><!-- 关键词检索 -->
|
||||
and f.VEHICLEOWNER LIKE CONCAT(CONCAT('%', #{pd.VEHICLEOWNER}),'%')
|
||||
</if>
|
||||
<if test="pd.REGISTRANT != null and pd.REGISTRANT != ''"><!-- 关键词检索 -->
|
||||
and f.REGISTRANT LIKE CONCAT(CONCAT('%', #{pd.REGISTRANT}),'%')
|
||||
</if>
|
||||
<if test="pd.EXPIRE_DATE != null and pd.EXPIRE_DATE != ''"><!-- 关键词检索 -->
|
||||
and f.EXPIRE_DATE = #{pd.EXPIRE_DATE}
|
||||
</if>
|
||||
<if test="pd.EXPIRE_STATUS != null and pd.EXPIRE_STATUS != ''"><!-- 关键词检索 -->
|
||||
and f.EXPIRE_STATUS = #{pd.EXPIRE_STATUS}
|
||||
</if>
|
||||
<if test="pd.REMINDER_STATUS != null and pd.REMINDER_STATUS != ''"><!-- 关键词检索 -->
|
||||
and f.REMINDER_STATUS = #{pd.REMINDER_STATUS}
|
||||
</if>
|
||||
<if test="pd.TRANSPORT_ENTERPRISES != null and pd.TRANSPORT_ENTERPRISES != ''"><!-- 关键词检索 -->
|
||||
and f.TRANSPORT_ENTERPRISES = #{pd.TRANSPORT_ENTERPRISES}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.TAXATION_ID = '0'
|
||||
</select>
|
||||
|
||||
<select id="taxationList" parameterType="page" resultType="pd">
|
||||
select
|
||||
*
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.CORPINFO_ID = #{corpId}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue