Compare commits

...

3 Commits

Author SHA1 Message Date
xiepeng 3d1f7acc6d Merge remote-tracking branch 'origin/dev' into dev 2024-03-25 10:20:29 +08:00
xiepeng 1a61b3f9ab Merge remote-tracking branch 'origin/dev' into dev
# Conflicts:
#	src/main/java/com/zcloud/controller/taxationManage/TaxationManageController.java
2024-03-25 09:06:59 +08:00
xiepeng 85f4d83469 修改车船税过户显示 营运车辆车牌号唯一 2024-03-25 08:55:44 +08:00
17 changed files with 263 additions and 52 deletions

View File

@ -4,6 +4,8 @@ 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.freighttrailer.FreightTrailerService;
import com.zcloud.service.operatingvehicles.OperatingVehiclesService;
import com.zcloud.service.system.ImgFilesService;
import com.zcloud.service.taxationManage.TaxationManageService;
import com.zcloud.util.*;
@ -32,6 +34,12 @@ public class AssignedManageController extends BaseController {
@Autowired
private ImgFilesService imgfilesService;
@Autowired
private OperatingVehiclesService operatingVehiclesService;
@Autowired
private FreightTrailerService freightTrailerService;
/**
* @param
* @throws Exception
@ -165,4 +173,56 @@ public class AssignedManageController extends BaseController {
map.put("result", errInfo);
return map;
}
@RequestMapping(value = "/assignedList")
@ResponseBody
public Object assignedList() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
String corpId = Jurisdiction.getCORPINFO_ID();
List<PageData> list = assignedManageService.assignedList(corpId); //列出Question列表
map.put("list", list);
map.put("result", errInfo);
return map;
}
@RequestMapping(value = "/getassignedoperationvehiclelist")
@ResponseBody
public Object getAssignedOperationVehicleList() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
String corpId = Jurisdiction.getCORPINFO_ID();
List<PageData> operationList = operatingVehiclesService.operationVehicleList(corpId); //列出Question列表
List<PageData> assignedList = assignedManageService.assignedList(corpId);
for (int i = 0; i < assignedList.size(); i++) {
for (int j = 0; j < operationList.size(); j++) {
if(assignedList.get(i).get("RAW_PLATE_NUMBER").equals(operationList.get(j).get("PLATE_NUMBER"))) {
operationList.remove(j);
}
}
}
map.put("varList", operationList);
map.put("result", errInfo);
return map;
}
@RequestMapping(value = "/getassignedfreighttrailerlist")
@ResponseBody
public Object getAssignedFreightTrailerList() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
String corpId = Jurisdiction.getCORPINFO_ID();
List<PageData> freightList = freightTrailerService.trailerList(corpId);
List<PageData> assignedList = assignedManageService.assignedList(corpId);
for (int i = 0; i < assignedList.size(); i++) {
for (int j = 0; j < freightList.size(); j++) {
if(assignedList.get(i).get("RAW_PLATE_NUMBER").equals(freightList.get(j).get("PLATE_NUMBER"))) {
freightList.remove(j);
}
}
}
map.put("varList", freightList);
map.put("result", errInfo);
return map;
}
}

View File

@ -4,9 +4,11 @@ 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.freighttrailer.FreightTrailerService;
import com.zcloud.service.scrapManage.ScrapManageService;
import com.zcloud.service.system.ImgFilesService;
import com.zcloud.service.taxationManage.TaxationManageService;
import com.zcloud.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -30,6 +32,12 @@ public class FreighttTrailerController extends BaseController {
@Autowired
private ScrapManageService scrapManageService;
@Autowired
private TaxationManageService taxationManageService;
@Autowired
private AssignedManageService assignedManageService;
/**
*
*
@ -123,6 +131,23 @@ public class FreighttTrailerController extends BaseController {
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
pd.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
PageData freightTrailer = freightTrailerService.findById(pd);
List<PageData> taxationList = taxationManageService.taxationList(pd.getString("CORPINFO_ID")); // 更新车船税数据
List<PageData> assignedList = assignedManageService.assignedList(pd.getString("CORPINFO_ID")); // 更新过户数据
for (PageData taxation : taxationList) {
if(taxation.get("PLATE_NUMBER").equals(freightTrailer.get("PLATE_NUMBER"))) {
taxation.put("PLATE_NUMBER", pd.get("PLATE_NUMBER"));
taxationManageService.edit(taxation);
}
}
for (PageData assigned : assignedList) {
if(assigned.get("RAW_PLATE_NUMBER").equals(freightTrailer.get("PLATE_NUMBER"))) {
assigned.put("RAW_PLATE_NUMBER", pd.get("PLATE_NUMBER"));
assigned.put("RAW_OWNERS", pd.get("CAR_OWNERS"));
assignedManageService.edit(assigned);
}
}
freightTrailerService.edit(pd);
map.put("pd", pd);
map.put("result", errInfo);

View File

@ -4,12 +4,14 @@ 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.operatingvehicles.OperatingVehiclesService;
import com.zcloud.service.scrapManage.ScrapManageService;
import com.zcloud.service.system.ImgFilesService;
import com.zcloud.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
@ -36,6 +38,9 @@ public class OperatingVehiclesController extends BaseController {
@Autowired
private ScrapManageService scrapManageService;
@Autowired
private AssignedManageService assignedManageService;
/**
* @param
* @throws Exception
@ -146,11 +151,7 @@ public class OperatingVehiclesController extends BaseController {
*/
@RequestMapping(value="/edit")
@ResponseBody
public Object edit(
@RequestParam(value="headstockFile",required=false) MultipartFile headstockFile,
@RequestParam(value="drivinglicenseFile",required=false) MultipartFile drivinglicenseFile,
@RequestParam(value="operatingCertificateFile",required=false) MultipartFile operatingCertificateFile
) throws Exception{
public Object edit() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
@ -158,35 +159,14 @@ public class OperatingVehiclesController extends BaseController {
pd.put("OPERATOR", Jurisdiction.getCORPINFO_ID());
pd.put("OPERATORNAME", Jurisdiction.getUsername());
pd.put("OPERATTIME", DateUtil.date2Str(new Date()));
if (null != headstockFile && !headstockFile.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);
pd.put("HEADSTOCK_PHOTO", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
}
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);
}
if (null != operatingCertificateFile && !operatingCertificateFile.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);
pd.put("OPERATING_CERTIFICATE_PHOTO", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
PageData operation = operatingVehiclesService.findById(pd);
List<PageData> assignedList = assignedManageService.assignedList(pd.getString("CORPINFO_ID"));
for (PageData assigned : assignedList) {
if(operation.get("PLATE_NUMBER").equals(assigned.get("RAW_PLATE_NUMBER"))) {
assigned.put("RAW_PLATE_NUMBER", pd.get("PLATE_NUMBER"));
assigned.put("RAW_OWNERS", pd.get("VEHICLEOWNER"));
assignedManageService.edit(assigned);
}
}
operatingVehiclesService.edit(pd);
map.put("pd", pd);
@ -289,4 +269,20 @@ public class OperatingVehiclesController extends BaseController {
map.put("result", errInfo);
return map;
}
@RequestMapping(value="/findByPlateNumber")
@ResponseBody
public Object findByPlateNumber() 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());
pd.put("PLATE_NUMBER", pd.getString("vehicleNumber"));
pd = operatingVehiclesService.findByfindByPlateNumber(pd);
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
}

View File

@ -165,5 +165,45 @@ public class ScrapManageController extends BaseController {
return map;
}
@RequestMapping(value = "/getscrapoperationvehiclelist")
@ResponseBody
public Object getScrapOperationVehicleList() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
String corpId = Jurisdiction.getCORPINFO_ID();
List<PageData> operationList = operatingVehiclesService.operationVehicleList(corpId); //列出Question列表
List<PageData> scrapList = scrapManageService.scrapListAll(corpId);
for (int i = 0; i < scrapList.size(); i++) {
for (int j = 0; j < operationList.size(); j++) {
if(scrapList.get(i).get("PLATE_NUMBER").equals(operationList.get(j).get("PLATE_NUMBER"))) {
operationList.remove(j);
}
}
}
map.put("varList", operationList);
map.put("result", errInfo);
return map;
}
@RequestMapping(value = "/getscrapfreighttrailerlist")
@ResponseBody
public Object getScrapFreightTrailerList() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
String corpId = Jurisdiction.getCORPINFO_ID();
List<PageData> freightList = freightTrailerService.trailerList(corpId);
List<PageData> scrapList = scrapManageService.scrapListAll(corpId);
for (int i = 0; i < scrapList.size(); i++) {
for (int j = 0; j < freightList.size(); j++) {
if(scrapList.get(i).get("PLATE_NUMBER").equals(freightList.get(j).get("PLATE_NUMBER"))) {
freightList.remove(j);
}
}
}
map.put("varList", freightList);
map.put("result", errInfo);
return map;
}
}

View File

@ -1,8 +1,13 @@
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.freighttrailer.FreightTrailerService;
import com.zcloud.service.system.DictionariesService;
import com.zcloud.service.taxationManage.TaxationManageService;
import com.zcloud.util.*;
import org.springframework.beans.factory.annotation.Autowired;
@ -12,10 +17,7 @@ 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;
import java.util.*;
@Controller
@RequestMapping("/taxationmanage")
@ -27,15 +29,19 @@ public class TaxationManageController extends BaseController {
@Autowired
private Smb smb;
@Autowired
private AssignedManageService assignedManageService;
@Autowired
private FreightTrailerService freightTrailerService;
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/add")
@ResponseBody
public Object add(
@RequestParam(value="drivinglicenseFile",required=false) MultipartFile drivinglicenseFile
) throws Exception{
public Object add() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
@ -58,16 +64,6 @@ public class TaxationManageController extends BaseController {
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);
}
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
taxationManageService.save(pd);
map.put("pd", pd);
@ -152,7 +148,18 @@ public class TaxationManageController extends BaseController {
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
page.setPd(pd);
List<PageData> varList = taxationManageService.list(page); //列出MajorDangerSource列表
List<PageData> taxationList = taxationManageService.list(page); //列出MajorDangerSource列表
List<PageData> assignedList = assignedManageService.assignedList(Jurisdiction.getCORPINFO_ID());
List<PageData> varList = new ArrayList<>();
for (int i = 0; i < taxationList.size(); i++) {
for (int j = 0; j < assignedList.size(); j++) {
if(taxationList.get(i).get("PLATE_NUMBER").equals(assignedList.get(j).get("RAW_PLATE_NUMBER"))) {
taxationList.get(i).put("RECORD_STATUS","过户");
taxationList.get(i).put("ASSIGNEDSTATUS","1");
}
}
varList.add(taxationList.get(i));
}
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
@ -170,4 +177,28 @@ public class TaxationManageController extends BaseController {
map.put("result", errInfo);
return map;
}
@RequestMapping(value = "/choicetrailerlist")
@ResponseBody
public Object choiceTrailerList(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 = freightTrailerService.list(page); // 列出所有挂车列表
List<PageData> taxationList = taxationManageService.list(page); // 列出车船税列表
for (int i = 0; i < taxationList.size(); i++) {
for (int j = 0; j < varList.size(); j++) {
if(taxationList.get(i).get("PLATE_NUMBER").equals(varList.get(j).get("PLATE_NUMBER"))){
varList.remove(j);
}
}
}
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
}

View File

@ -35,4 +35,6 @@ public interface AssignedManageMapper {
List<PageData> datalistPage(Page page);
List<PageData> operationvehicleList(String corpId);
List<PageData> assignedList(String corpId);
}

View File

@ -37,4 +37,6 @@ public interface OperatingVehiclesMapper {
List<PageData> operationVehicleList(String corpId);
List<PageData> corpList(String corpId);
PageData findByfindByPlateNumber(PageData pd);
}

View File

@ -32,4 +32,6 @@ public interface ScrapManageMapper{
PageData findById(PageData pd);
List<PageData> datalistPage(Page page);
List<PageData> scrapListAll(String corpId);
}

View File

@ -35,4 +35,6 @@ public interface AssignedManageService {
public List<PageData> list(Page page);
List<PageData> operationVehicleList(String corpId);
List<PageData> assignedList(String corpId);
}

View File

@ -48,4 +48,9 @@ public class AssignedManageServiceImpl implements AssignedManageService {
public List<PageData> operationVehicleList(String corpId) {
return assignedManageMapper.operationvehicleList(corpId);
}
@Override
public List<PageData> assignedList(String corpId) {
return assignedManageMapper.assignedList(corpId);
}
}

View File

@ -37,4 +37,6 @@ public interface OperatingVehiclesService {
List<PageData> corpList(String corpId);
PageData findByfindByPlateNumber(PageData pd);
}

View File

@ -51,4 +51,9 @@ public class OperatingVehiclesServiceImpl implements OperatingVehiclesService {
public List<PageData> corpList(String corpId) {
return operatingVehiclesMapper.corpList(corpId);
}
@Override
public PageData findByfindByPlateNumber(PageData pd) {
return operatingVehiclesMapper.findByfindByPlateNumber(pd);
}
}

View File

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

View File

@ -43,4 +43,9 @@ public class ScrapManageServiceImpl implements ScrapManageService {
public List<PageData> list(Page page) {
return scrapManageMapper.datalistPage(page);
}
@Override
public List<PageData> scrapListAll(String corpId) {
return scrapManageMapper.scrapListAll(corpId);
}
}

View File

@ -472,5 +472,15 @@
where f.CORPINFO_ID = #{corpId}
</select>
<select id="assignedList" parameterType="page" resultType="pd">
select
*
from
<include refid="tableName"></include> f
where f.CORPINFO_ID = #{corpId}
AND
f.ISDELETE = '0'
</select>
</mapper>

View File

@ -282,6 +282,19 @@
f.CORPINFO_ID = #{CORPINFO_ID}
</select>
<!-- 通过ID获取数据 -->
<select id="findByfindByPlateNumber" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.PLATE_NUMBER = #{PLATE_NUMBER} AND
f.ISDELETE = '0' AND
f.CORPINFO_ID = #{CORPINFO_ID}
</select>
<!-- 列表 -->
<!--<select id="datalistPage" parameterType="page" resultType="pd">
select

View File

@ -391,6 +391,15 @@
</if>
</select>
<select id="scrapListAll" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.ISDELETE = '0'
AND f.CORPINFO_ID = #{corpId}
</select>
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>