diff --git a/jianshui-admin/src/main/java/com/jianshui/web/controller/platform/VehicleCodeController.java b/jianshui-admin/src/main/java/com/jianshui/web/controller/platform/VehicleCodeController.java new file mode 100644 index 0000000..fab1072 --- /dev/null +++ b/jianshui-admin/src/main/java/com/jianshui/web/controller/platform/VehicleCodeController.java @@ -0,0 +1,104 @@ +package com.jianshui.web.controller.platform; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.jianshui.common.annotation.Log; +import com.jianshui.common.core.controller.BaseController; +import com.jianshui.common.core.domain.AjaxResult; +import com.jianshui.common.enums.BusinessType; +import com.jianshui.platform.domain.VehicleCode; +import com.jianshui.platform.service.IVehicleCodeService; +import com.jianshui.common.utils.poi.ExcelUtil; +import com.jianshui.common.core.page.TableDataInfo; + +/** + * 车辆编码Controller + * + * @author kk + * @date 2023-06-28 + */ +@RestController +@RequestMapping("/platform/vehiclecode") +public class VehicleCodeController extends BaseController +{ + @Autowired + private IVehicleCodeService vehicleCodeService; + + /** + * 查询车辆编码列表 + */ + @PreAuthorize("@ss.hasPermi('platform:vehiclecode:list')") + @GetMapping("/list") + public TableDataInfo list(VehicleCode vehicleCode) + { + startPage(); + List list = vehicleCodeService.selectVehicleCodeList(vehicleCode); + return getDataTable(list); + } + + /** + * 导出车辆编码列表 + */ + @PreAuthorize("@ss.hasPermi('platform:vehiclecode:export')") + @Log(title = "车辆编码", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, VehicleCode vehicleCode) + { + List list = vehicleCodeService.selectVehicleCodeList(vehicleCode); + ExcelUtil util = new ExcelUtil(VehicleCode.class); + util.exportExcel(response, list, "车辆编码数据"); + } + + /** + * 获取车辆编码详细信息 + */ + @PreAuthorize("@ss.hasPermi('platform:vehiclecode:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return AjaxResult.success(vehicleCodeService.selectVehicleCodeById(id)); + } + + /** + * 新增车辆编码 + */ + @PreAuthorize("@ss.hasPermi('platform:vehiclecode:add')") + @Log(title = "车辆编码", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody VehicleCode vehicleCode) + { + return toAjax(vehicleCodeService.insertVehicleCode(vehicleCode)); + } + + /** + * 修改车辆编码 + */ + @PreAuthorize("@ss.hasPermi('platform:vehiclecode:edit')") + @Log(title = "车辆编码", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody VehicleCode vehicleCode) + { + return toAjax(vehicleCodeService.updateVehicleCode(vehicleCode)); + } + + /** + * 删除车辆编码 + */ + @PreAuthorize("@ss.hasPermi('platform:vehiclecode:remove')") + @Log(title = "车辆编码", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(vehicleCodeService.deleteVehicleCodeByIds(ids)); + } +} diff --git a/jianshui-platform/src/main/java/com/jianshui/platform/domain/VehicleCode.java b/jianshui-platform/src/main/java/com/jianshui/platform/domain/VehicleCode.java new file mode 100644 index 0000000..79c274c --- /dev/null +++ b/jianshui-platform/src/main/java/com/jianshui/platform/domain/VehicleCode.java @@ -0,0 +1,196 @@ +package com.jianshui.platform.domain; + +import com.jianshui.common.annotation.Excel; +import com.jianshui.common.core.domain.BaseEntity; +import net.logstash.logback.encoder.org.apache.commons.lang3.builder.ToStringBuilder; +import net.logstash.logback.encoder.org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 车辆编码对象 vehicle_code + * + * @author kk + * @date 2023-06-28 + */ +public class VehicleCode extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** ID */ + private Long id; + + /** 车辆编码 */ + @Excel(name = "车辆编码") + private String vehicleCode; + + /** 车辆类型 */ + @Excel(name = "车辆类型") + private String vehicleType; + + /** 厂牌型号 */ + @Excel(name = "厂牌型号") + private String brandModel; + + /** 产地 */ + @Excel(name = "产地") + private String origin; + + /** 生产企业名称 */ + @Excel(name = "生产企业名称") + private String manufacturerName; + + /** 税收分类编码 */ + @Excel(name = "税收分类编码") + private String taxCategoryCode; + + /** 税收分类编码ID */ + @Excel(name = "税收分类编码ID") + private Long taxCategoryCodeId; + + /** 税收分类编码简称 */ + @Excel(name = "税收分类编码简称") + private String taxCategoryAbbreviation; + + /** 是否享受优惠政策 */ + @Excel(name = "是否享受优惠政策") + private String isQualifiedForDiscount; + + /** 优惠政策类型 */ + @Excel(name = "优惠政策类型") + private String discountPolicyType; + + /** 状态 */ + @Excel(name = "状态") + private String status; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setVehicleCode(String vehicleCode) + { + this.vehicleCode = vehicleCode; + } + + public String getVehicleCode() + { + return vehicleCode; + } + public void setVehicleType(String vehicleType) + { + this.vehicleType = vehicleType; + } + + public String getVehicleType() + { + return vehicleType; + } + public void setBrandModel(String brandModel) + { + this.brandModel = brandModel; + } + + public String getBrandModel() + { + return brandModel; + } + public void setOrigin(String origin) + { + this.origin = origin; + } + + public String getOrigin() + { + return origin; + } + public void setManufacturerName(String manufacturerName) + { + this.manufacturerName = manufacturerName; + } + + public String getManufacturerName() + { + return manufacturerName; + } + public void setTaxCategoryCode(String taxCategoryCode) + { + this.taxCategoryCode = taxCategoryCode; + } + + public String getTaxCategoryCode() + { + return taxCategoryCode; + } + public void setTaxCategoryCodeId(Long taxCategoryCodeId) + { + this.taxCategoryCodeId = taxCategoryCodeId; + } + + public Long getTaxCategoryCodeId() + { + return taxCategoryCodeId; + } + public void setTaxCategoryAbbreviation(String taxCategoryAbbreviation) + { + this.taxCategoryAbbreviation = taxCategoryAbbreviation; + } + + public String getTaxCategoryAbbreviation() + { + return taxCategoryAbbreviation; + } + public void setIsQualifiedForDiscount(String isQualifiedForDiscount) + { + this.isQualifiedForDiscount = isQualifiedForDiscount; + } + + public String getIsQualifiedForDiscount() + { + return isQualifiedForDiscount; + } + public void setDiscountPolicyType(String discountPolicyType) + { + this.discountPolicyType = discountPolicyType; + } + + public String getDiscountPolicyType() + { + return discountPolicyType; + } + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("vehicleCode", getVehicleCode()) + .append("vehicleType", getVehicleType()) + .append("brandModel", getBrandModel()) + .append("origin", getOrigin()) + .append("manufacturerName", getManufacturerName()) + .append("taxCategoryCode", getTaxCategoryCode()) + .append("taxCategoryCodeId", getTaxCategoryCodeId()) + .append("taxCategoryAbbreviation", getTaxCategoryAbbreviation()) + .append("isQualifiedForDiscount", getIsQualifiedForDiscount()) + .append("discountPolicyType", getDiscountPolicyType()) + .append("status", getStatus()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/jianshui-platform/src/main/java/com/jianshui/platform/mapper/VehicleCodeMapper.java b/jianshui-platform/src/main/java/com/jianshui/platform/mapper/VehicleCodeMapper.java new file mode 100644 index 0000000..e83a53c --- /dev/null +++ b/jianshui-platform/src/main/java/com/jianshui/platform/mapper/VehicleCodeMapper.java @@ -0,0 +1,61 @@ +package com.jianshui.platform.mapper; + +import java.util.List; +import com.jianshui.platform.domain.VehicleCode; + +/** + * 车辆编码Mapper接口 + * + * @author kk + * @date 2023-06-28 + */ +public interface VehicleCodeMapper +{ + /** + * 查询车辆编码 + * + * @param id 车辆编码主键 + * @return 车辆编码 + */ + public VehicleCode selectVehicleCodeById(Long id); + + /** + * 查询车辆编码列表 + * + * @param vehicleCode 车辆编码 + * @return 车辆编码集合 + */ + public List selectVehicleCodeList(VehicleCode vehicleCode); + + /** + * 新增车辆编码 + * + * @param vehicleCode 车辆编码 + * @return 结果 + */ + public int insertVehicleCode(VehicleCode vehicleCode); + + /** + * 修改车辆编码 + * + * @param vehicleCode 车辆编码 + * @return 结果 + */ + public int updateVehicleCode(VehicleCode vehicleCode); + + /** + * 删除车辆编码 + * + * @param id 车辆编码主键 + * @return 结果 + */ + public int deleteVehicleCodeById(Long id); + + /** + * 批量删除车辆编码 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteVehicleCodeByIds(Long[] ids); +} diff --git a/jianshui-platform/src/main/java/com/jianshui/platform/service/IVehicleCodeService.java b/jianshui-platform/src/main/java/com/jianshui/platform/service/IVehicleCodeService.java new file mode 100644 index 0000000..bbf2d16 --- /dev/null +++ b/jianshui-platform/src/main/java/com/jianshui/platform/service/IVehicleCodeService.java @@ -0,0 +1,61 @@ +package com.jianshui.platform.service; + +import java.util.List; +import com.jianshui.platform.domain.VehicleCode; + +/** + * 车辆编码Service接口 + * + * @author kk + * @date 2023-06-28 + */ +public interface IVehicleCodeService +{ + /** + * 查询车辆编码 + * + * @param id 车辆编码主键 + * @return 车辆编码 + */ + public VehicleCode selectVehicleCodeById(Long id); + + /** + * 查询车辆编码列表 + * + * @param vehicleCode 车辆编码 + * @return 车辆编码集合 + */ + public List selectVehicleCodeList(VehicleCode vehicleCode); + + /** + * 新增车辆编码 + * + * @param vehicleCode 车辆编码 + * @return 结果 + */ + public int insertVehicleCode(VehicleCode vehicleCode); + + /** + * 修改车辆编码 + * + * @param vehicleCode 车辆编码 + * @return 结果 + */ + public int updateVehicleCode(VehicleCode vehicleCode); + + /** + * 批量删除车辆编码 + * + * @param ids 需要删除的车辆编码主键集合 + * @return 结果 + */ + public int deleteVehicleCodeByIds(Long[] ids); + + /** + * 删除车辆编码信息 + * + * @param id 车辆编码主键 + * @return 结果 + */ + public int deleteVehicleCodeById(Long id); +} diff --git a/jianshui-platform/src/main/java/com/jianshui/platform/service/impl/VehicleCodeServiceImpl.java b/jianshui-platform/src/main/java/com/jianshui/platform/service/impl/VehicleCodeServiceImpl.java new file mode 100644 index 0000000..5698be1 --- /dev/null +++ b/jianshui-platform/src/main/java/com/jianshui/platform/service/impl/VehicleCodeServiceImpl.java @@ -0,0 +1,98 @@ +package com.jianshui.platform.service.impl; + +import java.util.List; +import com.jianshui.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.jianshui.platform.mapper.VehicleCodeMapper; +import com.jianshui.platform.domain.VehicleCode; +import com.jianshui.platform.service.IVehicleCodeService; + +/** + * 车辆编码Service业务层处理 + * + * @author kk + * @date 2023-06-28 + */ +@Service +public class VehicleCodeServiceImpl implements IVehicleCodeService +{ + @Autowired + private VehicleCodeMapper vehicleCodeMapper; + + /** + * 查询车辆编码 + * + * @param id 车辆编码主键 + * @return 车辆编码 + */ + @Override + public VehicleCode selectVehicleCodeById(Long id) + { + return vehicleCodeMapper.selectVehicleCodeById(id); + } + + /** + * 查询车辆编码列表 + * + * @param vehicleCode 车辆编码 + * @return 车辆编码 + */ + @Override + public List selectVehicleCodeList(VehicleCode vehicleCode) + { + List vehicleCodeList = vehicleCodeMapper.selectVehicleCodeList(vehicleCode); + + return vehicleCodeMapper.selectVehicleCodeList(vehicleCode); + } + + /** + * 新增车辆编码 + * + * @param vehicleCode 车辆编码 + * @return 结果 + */ + @Override + public int insertVehicleCode(VehicleCode vehicleCode) + { + vehicleCode.setCreateTime(DateUtils.getNowDate()); + return vehicleCodeMapper.insertVehicleCode(vehicleCode); + } + + /** + * 修改车辆编码 + * + * @param vehicleCode 车辆编码 + * @return 结果 + */ + @Override + public int updateVehicleCode(VehicleCode vehicleCode) + { + vehicleCode.setUpdateTime(DateUtils.getNowDate()); + return vehicleCodeMapper.updateVehicleCode(vehicleCode); + } + + /** + * 批量删除车辆编码 + * + * @param ids 需要删除的车辆编码主键 + * @return 结果 + */ + @Override + public int deleteVehicleCodeByIds(Long[] ids) + { + return vehicleCodeMapper.deleteVehicleCodeByIds(ids); + } + + /** + * 删除车辆编码信息 + * + * @param id 车辆编码主键 + * @return 结果 + */ + @Override + public int deleteVehicleCodeById(Long id) + { + return vehicleCodeMapper.deleteVehicleCodeById(id); + } +} diff --git a/jianshui-platform/src/main/resources/com/jianshui/platform/mapper/VehicleCodeMapper.xml b/jianshui-platform/src/main/resources/com/jianshui/platform/mapper/VehicleCodeMapper.xml new file mode 100644 index 0000000..e4b4d07 --- /dev/null +++ b/jianshui-platform/src/main/resources/com/jianshui/platform/mapper/VehicleCodeMapper.xml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + select id, vehicle_code, vehicle_type, brand_model, origin, manufacturer_name, tax_category_code, tax_category_code_id, tax_category_abbreviation, is_qualified_for_discount, discount_policy_type, status, create_by, create_time, update_by, update_time, remark from vehicle_code + + + + + + + + insert into vehicle_code + + vehicle_code, + vehicle_type, + brand_model, + origin, + manufacturer_name, + tax_category_code, + tax_category_code_id, + tax_category_abbreviation, + is_qualified_for_discount, + discount_policy_type, + status, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{vehicleCode}, + #{vehicleType}, + #{brandModel}, + #{origin}, + #{manufacturerName}, + #{taxCategoryCode}, + #{taxCategoryCodeId}, + #{taxCategoryAbbreviation}, + #{isQualifiedForDiscount}, + #{discountPolicyType}, + #{status}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update vehicle_code + + vehicle_code = #{vehicleCode}, + vehicle_type = #{vehicleType}, + brand_model = #{brandModel}, + origin = #{origin}, + manufacturer_name = #{manufacturerName}, + tax_category_code = #{taxCategoryCode}, + tax_category_code_id = #{taxCategoryCodeId}, + tax_category_abbreviation = #{taxCategoryAbbreviation}, + is_qualified_for_discount = #{isQualifiedForDiscount}, + discount_policy_type = #{discountPolicyType}, + status = #{status}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where id = #{id} + + + + delete from vehicle_code where id = #{id} + + + + delete from vehicle_code where id in + + #{id} + + + \ No newline at end of file diff --git a/jianshui-ui/src/api/platform/vehiclecode.js b/jianshui-ui/src/api/platform/vehiclecode.js new file mode 100644 index 0000000..a3e8cfe --- /dev/null +++ b/jianshui-ui/src/api/platform/vehiclecode.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询车辆编码列表 +export function listVehiclecode(query) { + return request({ + url: '/platform/vehiclecode/list', + method: 'get', + params: query + }) +} + +// 查询车辆编码详细 +export function getVehiclecode(id) { + return request({ + url: '/platform/vehiclecode/' + id, + method: 'get' + }) +} + +// 新增车辆编码 +export function addVehiclecode(data) { + return request({ + url: '/platform/vehiclecode', + method: 'post', + data: data + }) +} + +// 修改车辆编码 +export function updateVehiclecode(data) { + return request({ + url: '/platform/vehiclecode', + method: 'put', + data: data + }) +} + +// 删除车辆编码 +export function delVehiclecode(id) { + return request({ + url: '/platform/vehiclecode/' + id, + method: 'delete' + }) +} diff --git a/jianshui-ui/src/views/platform/vehiclecode/index.vue b/jianshui-ui/src/views/platform/vehiclecode/index.vue new file mode 100644 index 0000000..78ccfa2 --- /dev/null +++ b/jianshui-ui/src/views/platform/vehiclecode/index.vue @@ -0,0 +1,409 @@ + + +