过户管理

dev
xiepeng 2024-03-08 17:43:31 +08:00
parent 14674ea26c
commit 5bd22ec032
10 changed files with 811 additions and 8 deletions

View File

@ -0,0 +1,155 @@
package com.zcloud.controller.assignedManage;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.assignedManage.AssignedManageService;
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("/assignedmanage")
public class AssignedManageController extends BaseController {
@Autowired
private AssignedManageService assignedManageService;
@Autowired
private Smb smb;
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/add")
@ResponseBody
public Object add() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("ASSIGNED_ID", this.get32UUID()); //车船税主键
pd.put("ISDELETE", "0"); //是否删除(0:有效 1删除)
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
pd.put("ASSIGNED_DATE", pd.get("TRANSACTION_DATE"));
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd.put("VEHICLE_TYPE",pd.get("ASSIGNED_VEHICLE_MODEL"));
pd.put("NOW_CONTACT_NUMBER",pd.get("NOW_OWNERS_NUMBER"));
assignedManageService.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()));
assignedManageService.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","expirestatus_01");
}else{
pd.put("EXPIRE_STATUS","expirestatus_02");
}
assignedManageService.edit(pd);
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/goEdit")
@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 = assignedManageService.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 = assignedManageService.list(page); //列出MajorDangerSource列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
@RequestMapping(value = "/operationvehicleList")
@ResponseBody
public Object operationVehicleList() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
String corpId = Jurisdiction.getCORPINFO_ID();
List<PageData> list = assignedManageService.operationVehicleList(corpId); //列出Question列表
map.put("list", list);
map.put("result", errInfo);
return map;
}
}

View File

@ -178,20 +178,48 @@ public class OperatingVehiclesController extends BaseController {
} }
@RequestMapping(value = "/list") @RequestMapping(value = "/list")
// @RequiresPermissions( value = {"question:list" , "courseware:list"}, logical = Logical.OR)
@ResponseBody
@LogAnno(menuType = "基础信息管理", menuServer = "货运挂车", instructionsOperate = "货运挂车", instructionsType = "列表")
public Object list(Page page) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
page.setPd(pd);
List<PageData> varList = operatingVehiclesService.list(page); //列出Question列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
@RequestMapping(value = "/operationvehicleList")
@ResponseBody
public Object operationVehicleList() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
String corpId = Jurisdiction.getCORPINFO_ID();
List<PageData> list = operatingVehiclesService.operationVehicleList(corpId); //列出Question列表
map.put("list", list);
map.put("result", errInfo);
return map;
}
/*@RequestMapping(value = "/list")
@ResponseBody @ResponseBody
public Object list(Page page) throws Exception { public Object list(Page page) throws Exception {
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success"; String errInfo = "success";
PageData pd = new PageData(); PageData pd = new PageData();
pd = this.getPageData(); pd = this.getPageData();
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
page.setPd(pd); page.setPd(pd);
List<PageData> varList = operatingVehiclesService.list(page); //列出MajorDangerSource列表 List<PageData> varList = operatingVehiclesService.list(page); //列出Question列表
map.put("varList", varList); map.put("varList", varList);
map.put("page", page); map.put("page", page);
map.put("result", errInfo); map.put("result", errInfo);
System.out.println();
return map; return map;
} }*/
} }

View File

@ -0,0 +1,38 @@
package com.zcloud.mapper.datasource.assignedManage;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
public interface AssignedManageMapper {
/**
* @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> operationvehicleList(String corpId);
}

View File

@ -33,4 +33,6 @@ public interface OperatingVehiclesMapper {
List<PageData> datalistPage(Page page); List<PageData> datalistPage(Page page);
List<PageData> operationVehicleList(String corpId);
} }

View File

@ -0,0 +1,38 @@
package com.zcloud.service.assignedManage;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
public interface AssignedManageService {
/**
* @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);
List<PageData> operationVehicleList(String corpId);
}

View File

@ -0,0 +1,51 @@
package com.zcloud.service.assignedManage.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.assignedManage.AssignedManageMapper;
import com.zcloud.mapper.datasource.taxationManage.TaxationManageMapper;
import com.zcloud.service.assignedManage.AssignedManageService;
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 AssignedManageServiceImpl implements AssignedManageService {
@Autowired
private AssignedManageMapper assignedManageMapper;
@Override
public void save(PageData pd) throws Exception {
assignedManageMapper.save(pd);
}
@Override
public void delete(PageData pd) throws Exception {
assignedManageMapper.delete(pd);
}
@Override
public void edit(PageData pd) throws Exception {
assignedManageMapper.edit(pd);
}
@Override
public PageData findById(PageData pd) throws Exception {
return assignedManageMapper.findById(pd);
}
@Override
public List<PageData> list(Page page) {
return assignedManageMapper.datalistPage(page);
}
@Override
public List<PageData> operationVehicleList(String corpId) {
return assignedManageMapper.operationvehicleList(corpId);
}
}

View File

@ -32,4 +32,8 @@ public interface OperatingVehiclesService {
public PageData findById(PageData pd)throws Exception; public PageData findById(PageData pd)throws Exception;
public List<PageData> list(Page page); public List<PageData> list(Page page);
List<PageData> operationVehicleList(String corpId);
} }

View File

@ -41,4 +41,9 @@ public class OperatingVehiclesServiceImpl implements OperatingVehiclesService {
public List<PageData> list(Page page) { public List<PageData> list(Page page) {
return operatingVehiclesMapper.datalistPage(page); return operatingVehiclesMapper.datalistPage(page);
} }
@Override
public List<PageData> operationVehicleList(String corpId) {
return operatingVehiclesMapper.operationVehicleList(corpId);
}
} }

View File

@ -0,0 +1,472 @@
<?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.assignedManage.AssignedManageMapper">
<!--表名 -->
<sql id="tableName">
BUS_TRAFFIC_ASSIGNED
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.ASSIGNED_ID,
f.RECORD_NUMBER,
f.CORPINFO_ID,
f.ASSIGNED_TYPE,
f.RAW_PLATE_NUMBER,
f.NOW_PLATE_NUMBER,
f.RAW_OWNERS,
f.NOW_OWNERS,
f.ASSIGNED_DATE,
f.REGISTRANT,
f.RAW_TRANSPORT_ENTERPRISES,
f.ASSIGNED_VEHICLE_MODEL,
f.ASSIGNED_VEHICLE,
f.RAW_OWNERS_NUMBER,
f.RAW_VEHICLE_OPERATION_CERTIFICATE,
f.FRAMES_NUMBER,
f.RAW_DRIVINGLICENSE_IMG,
f.ASSIGNED_WAY,
f.TRANSACTION_DATE,
f.NOW_OWNERS_NUMBER,
f.NOW_DRIVINGLICENSE_IMG,
f.NOW_VEHICLE_OPERATION_CERTIFICATE,
f.ASSIGNED_MATERIAL,
f.REMARK,
f.VEHICLE_TYPE,
f.VEHICLE_BRAND,
f.VEHICLE_MODEL,
f.ENGINE_NUMBER,
f.POWER_TYPE,
f.EMISSION_STANDARD,
f.RAW_CONTACT_NUMBER,
f.NOW_CONTACT_NUMBER,
f.RAW_OPERATION_CERTIFICATE,
f.NOW_OPERATION_CERTIFICATE,
f.TRANSPORT_ENTERPRISES,
f.ISDELETE,
f.CREATOR,
f.CREATORNAME,
f.CREATTIME,
f.OPERATOR,
f.OPERATORNAME,
f.OPERATTIME,
f.DELETOR,
f.DELETORNAME,
f.DELETTIME
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
ASSIGNED_ID,
RECORD_NUMBER,
CORPINFO_ID,
ASSIGNED_TYPE,
RAW_PLATE_NUMBER,
NOW_PLATE_NUMBER,
RAW_OWNERS,
NOW_OWNERS,
ASSIGNED_DATE,
REGISTRANT,
RAW_TRANSPORT_ENTERPRISES,
ASSIGNED_VEHICLE_MODEL,
ASSIGNED_VEHICLE,
RAW_OWNERS_NUMBER,
RAW_VEHICLE_OPERATION_CERTIFICATE,
FRAMES_NUMBER,
RAW_DRIVINGLICENSE_IMG,
ASSIGNED_WAY,
TRANSACTION_DATE,
NOW_OWNERS_NUMBER,
NOW_DRIVINGLICENSE_IMG,
NOW_VEHICLE_OPERATION_CERTIFICATE,
ASSIGNED_MATERIAL,
REMARK,
VEHICLE_TYPE,
VEHICLE_BRAND,
VEHICLE_MODEL,
ENGINE_NUMBER,
POWER_TYPE,
EMISSION_STANDARD,
RAW_CONTACT_NUMBER,
NOW_CONTACT_NUMBER,
RAW_OPERATION_CERTIFICATE,
NOW_OPERATION_CERTIFICATE,
TRANSPORT_ENTERPRISES,
ISDELETE,
CREATOR,
CREATORNAME,
CREATTIME,
OPERATOR,
OPERATORNAME,
OPERATTIME,
DELETOR,
DELETORNAME,
DELETTIME
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{ASSIGNED_ID},
#{RECORD_NUMBER},
#{CORPINFO_ID},
#{ASSIGNED_TYPE},
#{RAW_PLATE_NUMBER},
#{NOW_PLATE_NUMBER},
#{RAW_OWNERS},
#{NOW_OWNERS},
#{ASSIGNED_DATE},
#{REGISTRANT},
#{RAW_TRANSPORT_ENTERPRISES},
#{ASSIGNED_VEHICLE_MODEL},
#{ASSIGNED_VEHICLE},
#{RAW_OWNERS_NUMBER},
#{RAW_VEHICLE_OPERATION_CERTIFICATE},
#{FRAMES_NUMBER},
#{RAW_DRIVINGLICENSE_IMG},
#{ASSIGNED_WAY},
#{TRANSACTION_DATE},
#{NOW_OWNERS_NUMBER},
#{NOW_DRIVINGLICENSE_IMG},
#{NOW_VEHICLE_OPERATION_CERTIFICATE},
#{ASSIGNED_MATERIAL},
#{REMARK},
#{VEHICLE_TYPE},
#{VEHICLE_BRAND},
#{VEHICLE_MODEL},
#{ENGINE_NUMBER},
#{POWER_TYPE},
#{EMISSION_STANDARD},
#{RAW_CONTACT_NUMBER},
#{NOW_CONTACT_NUMBER},
#{RAW_OPERATION_CERTIFICATE},
#{NOW_OPERATION_CERTIFICATE},
#{TRANSPORT_ENTERPRISES},
#{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
ASSIGNED_ID = #{ASSIGNED_ID}
</delete>
<!-- 修改 -->
<update id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
ASSIGNED_ID = #{ASSIGNED_ID},
RECORD_NUMBER = #{RECORD_NUMBER},
CORPINFO_ID = #{CORPINFO_ID},
ASSIGNED_TYPE = #{ASSIGNED_TYPE},
RAW_PLATE_NUMBER = #{RAW_PLATE_NUMBER},
NOW_PLATE_NUMBER = #{NOW_PLATE_NUMBER},
RAW_OWNERS = #{RAW_OWNERS},
NOW_OWNERS = #{NOW_OWNERS},
ASSIGNED_DATE = #{ASSIGNED_DATE},
REGISTRANT = #{REGISTRANT},
REGISTRANT = #{REGISTRANT},
ASSIGNED_VEHICLE_MODEL = #{ASSIGNED_VEHICLE_MODEL},
ASSIGNED_VEHICLE = #{ASSIGNED_VEHICLE},
RAW_OWNERS_NUMBER = #{RAW_OWNERS_NUMBER},
RAW_VEHICLE_OPERATION_CERTIFICATE = #{RAW_VEHICLE_OPERATION_CERTIFICATE},
FRAMES_NUMBER = #{FRAMES_NUMBER},
RAW_DRIVINGLICENSE_IMG = #{RAW_DRIVINGLICENSE_IMG},
ASSIGNED_WAY = #{ASSIGNED_WAY},
TRANSACTION_DATE = #{TRANSACTION_DATE},
NOW_OWNERS_NUMBER = #{NOW_OWNERS_NUMBER},
NOW_DRIVINGLICENSE_IMG = #{NOW_DRIVINGLICENSE_IMG},
NOW_VEHICLE_OPERATION_CERTIFICATE = #{NOW_VEHICLE_OPERATION_CERTIFICATE},
ASSIGNED_MATERIAL = #{ASSIGNED_MATERIAL},
REMARK = #{REMARK},
VEHICLE_TYPE = #{VEHICLE_TYPE},
VEHICLE_BRAND = #{VEHICLE_BRAND},
VEHICLE_MODEL = #{VEHICLE_MODEL},
ENGINE_NUMBER = #{ENGINE_NUMBER},
POWER_TYPE = #{POWER_TYPE},
EMISSION_STANDARD = #{EMISSION_STANDARD},
RAW_CONTACT_NUMBER = #{RAW_CONTACT_NUMBER},
NOW_CONTACT_NUMBER = #{NOW_CONTACT_NUMBER},
RAW_OPERATION_CERTIFICATE = #{RAW_OPERATION_CERTIFICATE},
NOW_OPERATION_CERTIFICATE = #{NOW_OPERATION_CERTIFICATE},
TRANSPORT_ENTERPRISES = #{TRANSPORT_ENTERPRISES},
ISDELETE = #{ISDELETE},
CREATOR = #{CREATOR},
CREATORNAME = #{CREATORNAME},
CREATTIME = #{CREATTIME},
OPERATOR = #{OPERATOR},
OPERATORNAME = #{OPERATORNAME},
OPERATTIME = #{OPERATTIME},
DELETOR = #{DELETOR},
DELETORNAME = #{DELETORNAME},
DELETTIME = #{DELETTIME}
where
ASSIGNED_ID = #{ASSIGNED_ID}
</update>
<!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.ASSIGNED_ID = #{ASSIGNED_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 != ''">&lt;!&ndash; 关键词检索 &ndash;&gt;
and
(
u.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
)
</if>
<if test="pd.REVIEW_STATUS != null and pd.REVIEW_STATUS != ''">&lt;!&ndash; 关键词检索 &ndash;&gt;
<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 != ''">&lt;!&ndash; 关键词检索 &ndash;&gt;
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>
&lt;!&ndash; <if test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''">关键词检索
and d.DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
</if>
&ndash;&gt;
<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') &lt;= DATE_FORMAT(f.STARTTIME,'%Y-%m-%d %H:%i:%s')
and DATE_FORMAT(#{pd.ENDTIME},'%Y-%m-%d %H:%i:%s') &gt;= 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') &lt;= 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') &gt;= 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.ASSIGNED_TYPE != null and pd.ASSIGNED_TYPE != ''"><!-- 关键词检索 -->
and f.ASSIGNED_TYPE = #{pd.ASSIGNED_TYPE}
</if>
<if test="pd.ASSIGNED_WAY != null and pd.ASSIGNED_WAY != ''"><!-- 关键词检索 -->
and f.ASSIGNED_WAY = #{pd.ASSIGNED_WAY}
</if>
<if test="pd.ASSIGNED_VEHICLE_MODEL != null and pd.ASSIGNED_VEHICLE_MODEL != ''"><!-- 关键词检索 -->
and f.ASSIGNED_VEHICLE_MODEL = #{pd.ASSIGNED_VEHICLE_MODEL}
</if>
<if test="pd.RAW_PLATE_NUMBER != null and pd.RAW_PLATE_NUMBER != ''"><!-- 关键词检索 -->
and f.RAW_PLATE_NUMBER LIKE CONCAT(CONCAT('%', #{pd.RAW_PLATE_NUMBER}),'%')
</if>
<if test="pd.NOW_PLATE_NUMBER != null and pd.NOW_PLATE_NUMBER != ''"><!-- 关键词检索 -->
and f.NOW_PLATE_NUMBER LIKE CONCAT(CONCAT('%', #{pd.NOW_PLATE_NUMBER}),'%')
</if>
<if test="pd.NOW_OWNERS != null and pd.NOW_OWNERS != ''"><!-- 关键词检索 -->
and f.NOW_OWNERS LIKE CONCAT(CONCAT('%', #{pd.NOW_OWNERS}),'%')
</if>
<if test="pd.REGISTRANT != null and pd.REGISTRANT != ''"><!-- 关键词检索 -->
and f.REGISTRANT LIKE CONCAT(CONCAT('%', #{pd.REGISTRANT}),'%')
</if>
<if test="pd.ASSIGNED_DATE != null and pd.ASSIGNED_DATE != ''"><!-- 关键词检索 -->
and f.ASSIGNED_DATE LIKE CONCAT(CONCAT('%', #{pd.ASSIGNED_DATE}),'%')
</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.ASSIGNED_ID = '0'
</select>
<select id="operationvehicleList" parameterType="page" resultType="pd">
select
*
from
<include refid="tableName"></include> f
where f.CORPINFO_ID = #{corpId}
</select>
</mapper>

View File

@ -458,7 +458,7 @@
<include refid="Field"></include> <include refid="Field"></include>
from from
<include refid="tableName"></include> f <include refid="tableName"></include> f
where f.ISDELETE = '0' where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
<if test="pd.PLATE_NUMBER != null and pd.PLATE_NUMBER != ''"><!-- 关键词检索 --> <if test="pd.PLATE_NUMBER != null and pd.PLATE_NUMBER != ''"><!-- 关键词检索 -->
and f.PLATE_NUMBER LIKE CONCAT(CONCAT('%', #{pd.PLATE_NUMBER}),'%') and f.PLATE_NUMBER LIKE CONCAT(CONCAT('%', #{pd.PLATE_NUMBER}),'%')
</if> </if>
@ -499,5 +499,15 @@
where f.ISDELETE = '0' where f.ISDELETE = '0'
</select> </select>
<select id="operationVehicleList" parameterType="page" resultType="pd">
select
*
from
<include refid="tableName"></include>
f
where f.CORPINFO_ID = #{corpId}
and f.ISDELETE = '0'
</select>
</mapper> </mapper>