1.硬件版本

2.软件版本
This commit is contained in:
邱贞招 2024-07-22 17:17:58 +08:00
parent ae5b9ea9e8
commit 5d87204bbe
19 changed files with 934 additions and 23 deletions

View File

@ -0,0 +1,104 @@
package com.ruoyi.web.controller.system;
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.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.EtHardwareVersion;
import com.ruoyi.system.service.IEtHardwareVersionService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 硬件版本Controller
*
* @author qiuzhenzhao
* @date 2024-07-22
*/
@RestController
@RequestMapping("/system/hardwareVersion")
public class EtHardwareVersionController extends BaseController
{
@Autowired
private IEtHardwareVersionService etHardwareVersionService;
/**
* 查询硬件版本列表
*/
@PreAuthorize("@ss.hasPermi('system:hardwareVersion:list')")
@GetMapping("/list")
public TableDataInfo list(EtHardwareVersion etHardwareVersion)
{
startPage();
List<EtHardwareVersion> list = etHardwareVersionService.selectEtHardwareVersionList(etHardwareVersion);
return getDataTable(list);
}
/**
* 导出硬件版本列表
*/
@PreAuthorize("@ss.hasPermi('system:hardwareVersion:export')")
@Log(title = "硬件版本", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EtHardwareVersion etHardwareVersion)
{
List<EtHardwareVersion> list = etHardwareVersionService.selectEtHardwareVersionList(etHardwareVersion);
ExcelUtil<EtHardwareVersion> util = new ExcelUtil<EtHardwareVersion>(EtHardwareVersion.class);
util.exportExcel(response, list, "硬件版本数据");
}
/**
* 获取硬件版本详细信息
*/
@PreAuthorize("@ss.hasPermi('system:hardwareVersion:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(etHardwareVersionService.selectEtHardwareVersionById(id));
}
/**
* 新增硬件版本
*/
@PreAuthorize("@ss.hasPermi('system:hardwareVersion:add')")
@Log(title = "硬件版本", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EtHardwareVersion etHardwareVersion)
{
return toAjax(etHardwareVersionService.insertEtHardwareVersion(etHardwareVersion));
}
/**
* 修改硬件版本
*/
@PreAuthorize("@ss.hasPermi('system:hardwareVersion:edit')")
@Log(title = "硬件版本", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EtHardwareVersion etHardwareVersion)
{
return toAjax(etHardwareVersionService.updateEtHardwareVersion(etHardwareVersion));
}
/**
* 删除硬件版本
*/
@PreAuthorize("@ss.hasPermi('system:hardwareVersion:remove')")
@Log(title = "硬件版本", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(etHardwareVersionService.deleteEtHardwareVersionByIds(ids));
}
}

View File

@ -9,7 +9,9 @@ import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.EtModel;
import com.ruoyi.system.domain.EtOperatingArea;
import com.ruoyi.system.mapper.EtModelMapper;
import com.ruoyi.system.service.IEtFeeRuleService;
import com.ruoyi.system.service.IEtOperatingAreaService;
import com.ruoyi.system.service.IWxPayService;
@ -17,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@ -39,6 +42,9 @@ public class EtOperatingAreaController extends BaseController
@Autowired
private IWxPayService wxPayService;
@Resource
private EtModelMapper etModelMapper;
/**
* 查询运营区列表
@ -136,4 +142,34 @@ public class EtOperatingAreaController extends BaseController
List<EtOperatingArea> etOperatingAreas = etOperatingAreaService.selectAreaAll();
return success(etOperatingAreas);
}
/**
* 根据运营商id获取运营商列表
*/
@GetMapping("/selectAreaListByDeptId/{deptId}")
public AjaxResult selectAreaListByDeptId(@PathVariable("deptId") Long deptId)
{
AjaxResult ajax = AjaxResult.success();
ajax.put("areaList", etOperatingAreaService.selectAreaListByDeptId2(deptId));
EtModel model = new EtModel();
model.setOperator(deptId);
ajax.put("modelList", etModelMapper.selectEtModelList(model));
return success(ajax);
}
/**
* 根据运营区id获取运营商
*/
@GetMapping("/selectDeptByAreaId/{areaId}")
public AjaxResult selectDeptByAreaId(@PathVariable("areaId") Long areaId)
{
AjaxResult ajax = AjaxResult.success();
SysDept sysDept = wxPayService.getDeptObjByAreaId(areaId);
ajax.put("sysDept",sysDept);
EtModel model = new EtModel();
model.setOperator(sysDept.getDeptId());
ajax.put("modelList", etModelMapper.selectEtModelList(model));
return success(ajax);
}
}

View File

@ -0,0 +1,104 @@
package com.ruoyi.web.controller.system;
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.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.EtSoftwareVersion;
import com.ruoyi.system.service.IEtSoftwareVersionService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 软件版本Controller
*
* @author qiuzhenzhao
* @date 2024-07-22
*/
@RestController
@RequestMapping("/system/softwareVersion")
public class EtSoftwareVersionController extends BaseController
{
@Autowired
private IEtSoftwareVersionService etSoftwareVersionService;
/**
* 查询软件版本列表
*/
@PreAuthorize("@ss.hasPermi('system:softwareVersion:list')")
@GetMapping("/list")
public TableDataInfo list(EtSoftwareVersion etSoftwareVersion)
{
startPage();
List<EtSoftwareVersion> list = etSoftwareVersionService.selectEtSoftwareVersionList(etSoftwareVersion);
return getDataTable(list);
}
/**
* 导出软件版本列表
*/
@PreAuthorize("@ss.hasPermi('system:softwareVersion:export')")
@Log(title = "软件版本", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EtSoftwareVersion etSoftwareVersion)
{
List<EtSoftwareVersion> list = etSoftwareVersionService.selectEtSoftwareVersionList(etSoftwareVersion);
ExcelUtil<EtSoftwareVersion> util = new ExcelUtil<EtSoftwareVersion>(EtSoftwareVersion.class);
util.exportExcel(response, list, "软件版本数据");
}
/**
* 获取软件版本详细信息
*/
@PreAuthorize("@ss.hasPermi('system:softwareVersion:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(etSoftwareVersionService.selectEtSoftwareVersionById(id));
}
/**
* 新增软件版本
*/
@PreAuthorize("@ss.hasPermi('system:softwareVersion:add')")
@Log(title = "软件版本", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EtSoftwareVersion etSoftwareVersion)
{
return toAjax(etSoftwareVersionService.insertEtSoftwareVersion(etSoftwareVersion));
}
/**
* 修改软件版本
*/
@PreAuthorize("@ss.hasPermi('system:softwareVersion:edit')")
@Log(title = "软件版本", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EtSoftwareVersion etSoftwareVersion)
{
return toAjax(etSoftwareVersionService.updateEtSoftwareVersion(etSoftwareVersion));
}
/**
* 删除软件版本
*/
@PreAuthorize("@ss.hasPermi('system:softwareVersion:remove')")
@Log(title = "软件版本", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(etSoftwareVersionService.deleteEtSoftwareVersionByIds(ids));
}
}

View File

@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="remark" column="remark" />
<collection property="columns" javaType="java.util.List" resultMap="GenTableColumnResult" />
</resultMap>
<resultMap type="GenTableColumn" id="GenTableColumnResult">
<id property="columnId" column="column_id" />
<result property="tableId" column="table_id" />
@ -53,11 +53,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectGenTableVo">
select table_id, table_name, table_comment, sub_table_name, sub_table_fk_name, class_name, tpl_category, tpl_web_type, package_name, module_name, business_name, function_name, function_author, gen_type, gen_path, options, create_by, create_time, update_by, update_time, remark from gen_table
</sql>
<select id="selectGenTableList" parameterType="GenTable" resultMap="GenTableResult">
<include refid="selectGenTableVo"/>
<where>
@ -73,7 +73,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
AND date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if>
</where>
</where>内容
order by create_time desc
</select>
<select id="selectDbTableList" parameterType="GenTable" resultMap="GenTableResult">
@ -95,22 +96,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
order by create_time desc
</select>
<select id="selectDbTableListByNames" resultMap="GenTableResult">
select table_name, table_comment, create_time, update_time from information_schema.tables
where table_name NOT LIKE 'qrtz_%' and table_name NOT LIKE 'gen_%' and table_schema = (select database())
and table_name in
<foreach collection="array" item="name" open="(" separator="," close=")">
#{name}
</foreach>
</foreach>
</select>
<select id="selectTableByName" parameterType="String" resultMap="GenTableResult">
select table_name, table_comment, create_time, update_time from information_schema.tables
where table_comment <![CDATA[ <> ]]> '' and table_schema = (select database())
and table_name = #{tableName}
</select>
<select id="selectGenTableById" parameterType="Long" resultMap="GenTableResult">
SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.tpl_web_type, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark,
c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort
@ -118,7 +119,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN gen_table_column c ON t.table_id = c.table_id
where t.table_id = #{tableId} order by c.sort
</select>
<select id="selectGenTableByName" parameterType="String" resultMap="GenTableResult">
SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.tpl_web_type, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark,
c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort
@ -126,7 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN gen_table_column c ON t.table_id = c.table_id
where t.table_name = #{tableName} order by c.sort
</select>
<select id="selectGenTableAll" parameterType="String" resultMap="GenTableResult">
SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.tpl_web_type, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.options, t.remark,
c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort
@ -134,7 +135,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN gen_table_column c ON t.table_id = c.table_id
order by c.sort
</select>
<insert id="insertGenTable" parameterType="GenTable" useGeneratedKeys="true" keyProperty="tableId">
insert into gen_table (
<if test="tableName != null">table_name,</if>
@ -170,11 +171,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sysdate()
)
</insert>
<update id="createTable">
${sql}
</update>
<update id="updateGenTable" parameterType="GenTable">
update gen_table
<set>
@ -199,12 +200,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</set>
where table_id = #{tableId}
</update>
<delete id="deleteGenTableByIds" parameterType="Long">
delete from gen_table where table_id in
delete from gen_table where table_id in
<foreach collection="array" item="tableId" open="(" separator="," close=")">
#{tableId}
</foreach>
</delete>
</mapper>
</mapper>

View File

@ -154,6 +154,10 @@ public class AsDevice extends BaseEntityPlus implements Serializable {
@Excel(name = "车辆型号")
private Long modelId;
/** 硬件版本id */
@Excel(name = "硬件版本id")
private Long hardwareVersionId;
/** 型号 */
@Excel(name = "型号")
@TableField(exist = false)

View File

@ -0,0 +1,39 @@
package com.ruoyi.system.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import java.util.Date;
/**
* 硬件版本对象 et_hardware_version
*
* @author qiuzhenzhao
* @date 2024-07-22
*/
@Data
public class EtHardwareVersion extends BaseEntity{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 版本号 */
@Excel(name = "版本号")
private String version;
/** 生产时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "生产时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date productionTime;
/** 数量 */
@Excel(name = "数量")
private Integer quantity;
/** 版本说明 */
@Excel(name = "版本说明")
private String instructions;
}

View File

@ -0,0 +1,27 @@
package com.ruoyi.system.domain;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
/**
* 软件版本对象 et_software_version
*
* @author qiuzhenzhao
* @date 2024-07-22
*/
@Data
public class EtSoftwareVersion extends BaseEntity{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 版本号 */
@Excel(name = "版本号")
private String version;
/** 更新内容 */
@Excel(name = "更新内容")
private String content;
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.EtHardwareVersion;
/**
* 硬件版本Mapper接口
*
* @author qiuzhenzhao
* @date 2024-07-22
*/
public interface EtHardwareVersionMapper
{
/**
* 查询硬件版本
*
* @param id 硬件版本主键
* @return 硬件版本
*/
public EtHardwareVersion selectEtHardwareVersionById(Long id);
/**
* 查询硬件版本列表
*
* @param etHardwareVersion 硬件版本
* @return 硬件版本集合
*/
public List<EtHardwareVersion> selectEtHardwareVersionList(EtHardwareVersion etHardwareVersion);
/**
* 新增硬件版本
*
* @param etHardwareVersion 硬件版本
* @return 结果
*/
public int insertEtHardwareVersion(EtHardwareVersion etHardwareVersion);
/**
* 修改硬件版本
*
* @param etHardwareVersion 硬件版本
* @return 结果
*/
public int updateEtHardwareVersion(EtHardwareVersion etHardwareVersion);
/**
* 删除硬件版本
*
* @param id 硬件版本主键
* @return 结果
*/
public int deleteEtHardwareVersionById(Long id);
/**
* 批量删除硬件版本
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteEtHardwareVersionByIds(Long[] ids);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.EtSoftwareVersion;
/**
* 软件版本Mapper接口
*
* @author qiuzhenzhao
* @date 2024-07-22
*/
public interface EtSoftwareVersionMapper
{
/**
* 查询软件版本
*
* @param id 软件版本主键
* @return 软件版本
*/
public EtSoftwareVersion selectEtSoftwareVersionById(Long id);
/**
* 查询软件版本列表
*
* @param etSoftwareVersion 软件版本
* @return 软件版本集合
*/
public List<EtSoftwareVersion> selectEtSoftwareVersionList(EtSoftwareVersion etSoftwareVersion);
/**
* 新增软件版本
*
* @param etSoftwareVersion 软件版本
* @return 结果
*/
public int insertEtSoftwareVersion(EtSoftwareVersion etSoftwareVersion);
/**
* 修改软件版本
*
* @param etSoftwareVersion 软件版本
* @return 结果
*/
public int updateEtSoftwareVersion(EtSoftwareVersion etSoftwareVersion);
/**
* 删除软件版本
*
* @param id 软件版本主键
* @return 结果
*/
public int deleteEtSoftwareVersionById(Long id);
/**
* 批量删除软件版本
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteEtSoftwareVersionByIds(Long[] ids);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.EtHardwareVersion;
/**
* 硬件版本Service接口
*
* @author qiuzhenzhao
* @date 2024-07-22
*/
public interface IEtHardwareVersionService
{
/**
* 查询硬件版本
*
* @param id 硬件版本主键
* @return 硬件版本
*/
public EtHardwareVersion selectEtHardwareVersionById(Long id);
/**
* 查询硬件版本列表
*
* @param etHardwareVersion 硬件版本
* @return 硬件版本集合
*/
public List<EtHardwareVersion> selectEtHardwareVersionList(EtHardwareVersion etHardwareVersion);
/**
* 新增硬件版本
*
* @param etHardwareVersion 硬件版本
* @return 结果
*/
public int insertEtHardwareVersion(EtHardwareVersion etHardwareVersion);
/**
* 修改硬件版本
*
* @param etHardwareVersion 硬件版本
* @return 结果
*/
public int updateEtHardwareVersion(EtHardwareVersion etHardwareVersion);
/**
* 批量删除硬件版本
*
* @param ids 需要删除的硬件版本主键集合
* @return 结果
*/
public int deleteEtHardwareVersionByIds(Long[] ids);
/**
* 删除硬件版本信息
*
* @param id 硬件版本主键
* @return 结果
*/
public int deleteEtHardwareVersionById(Long id);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.EtSoftwareVersion;
/**
* 软件版本Service接口
*
* @author qiuzhenzhao
* @date 2024-07-22
*/
public interface IEtSoftwareVersionService
{
/**
* 查询软件版本
*
* @param id 软件版本主键
* @return 软件版本
*/
public EtSoftwareVersion selectEtSoftwareVersionById(Long id);
/**
* 查询软件版本列表
*
* @param etSoftwareVersion 软件版本
* @return 软件版本集合
*/
public List<EtSoftwareVersion> selectEtSoftwareVersionList(EtSoftwareVersion etSoftwareVersion);
/**
* 新增软件版本
*
* @param etSoftwareVersion 软件版本
* @return 结果
*/
public int insertEtSoftwareVersion(EtSoftwareVersion etSoftwareVersion);
/**
* 修改软件版本
*
* @param etSoftwareVersion 软件版本
* @return 结果
*/
public int updateEtSoftwareVersion(EtSoftwareVersion etSoftwareVersion);
/**
* 批量删除软件版本
*
* @param ids 需要删除的软件版本主键集合
* @return 结果
*/
public int deleteEtSoftwareVersionByIds(Long[] ids);
/**
* 删除软件版本信息
*
* @param id 软件版本主键
* @return 结果
*/
public int deleteEtSoftwareVersionById(Long id);
}

View File

@ -0,0 +1,95 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.EtHardwareVersionMapper;
import com.ruoyi.system.domain.EtHardwareVersion;
import com.ruoyi.system.service.IEtHardwareVersionService;
/**
* 硬件版本Service业务层处理
*
* @author qiuzhenzhao
* @date 2024-07-22
*/
@Service
public class EtHardwareVersionServiceImpl implements IEtHardwareVersionService
{
@Autowired
private EtHardwareVersionMapper etHardwareVersionMapper;
/**
* 查询硬件版本
*
* @param id 硬件版本主键
* @return 硬件版本
*/
@Override
public EtHardwareVersion selectEtHardwareVersionById(Long id)
{
return etHardwareVersionMapper.selectEtHardwareVersionById(id);
}
/**
* 查询硬件版本列表
*
* @param etHardwareVersion 硬件版本
* @return 硬件版本
*/
@Override
public List<EtHardwareVersion> selectEtHardwareVersionList(EtHardwareVersion etHardwareVersion)
{
return etHardwareVersionMapper.selectEtHardwareVersionList(etHardwareVersion);
}
/**
* 新增硬件版本
*
* @param etHardwareVersion 硬件版本
* @return 结果
*/
@Override
public int insertEtHardwareVersion(EtHardwareVersion etHardwareVersion)
{
etHardwareVersion.setCreateTime(DateUtils.getNowDate());
return etHardwareVersionMapper.insertEtHardwareVersion(etHardwareVersion);
}
/**
* 修改硬件版本
*
* @param etHardwareVersion 硬件版本
* @return 结果
*/
@Override
public int updateEtHardwareVersion(EtHardwareVersion etHardwareVersion)
{
return etHardwareVersionMapper.updateEtHardwareVersion(etHardwareVersion);
}
/**
* 批量删除硬件版本
*
* @param ids 需要删除的硬件版本主键
* @return 结果
*/
@Override
public int deleteEtHardwareVersionByIds(Long[] ids)
{
return etHardwareVersionMapper.deleteEtHardwareVersionByIds(ids);
}
/**
* 删除硬件版本信息
*
* @param id 硬件版本主键
* @return 结果
*/
@Override
public int deleteEtHardwareVersionById(Long id)
{
return etHardwareVersionMapper.deleteEtHardwareVersionById(id);
}
}

View File

@ -1416,7 +1416,7 @@ public class EtOrderServiceImpl implements IEtOrderService
}
SysDept sysDept = wxPayService.getDeptObjByAreaId(etOrder1.getAreaId());
BigDecimal subtract = sysDept.getBalance().subtract(etOrder1.getTotalFee());
if(subtract.compareTo(BigDecimal.ZERO) <= 0){
if(subtract.compareTo(BigDecimal.ZERO) <= 0 && sysDept.getSeparateAccount().equals("N")){
throw new ServiceException("余额不足,不能退款");
}
/** 1.退款*/

View File

@ -0,0 +1,96 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.EtSoftwareVersionMapper;
import com.ruoyi.system.domain.EtSoftwareVersion;
import com.ruoyi.system.service.IEtSoftwareVersionService;
/**
* 软件版本Service业务层处理
*
* @author qiuzhenzhao
* @date 2024-07-22
*/
@Service
public class EtSoftwareVersionServiceImpl implements IEtSoftwareVersionService
{
@Autowired
private EtSoftwareVersionMapper etSoftwareVersionMapper;
/**
* 查询软件版本
*
* @param id 软件版本主键
* @return 软件版本
*/
@Override
public EtSoftwareVersion selectEtSoftwareVersionById(Long id)
{
return etSoftwareVersionMapper.selectEtSoftwareVersionById(id);
}
/**
* 查询软件版本列表
*
* @param etSoftwareVersion 软件版本
* @return 软件版本
*/
@Override
public List<EtSoftwareVersion> selectEtSoftwareVersionList(EtSoftwareVersion etSoftwareVersion)
{
return etSoftwareVersionMapper.selectEtSoftwareVersionList(etSoftwareVersion);
}
/**
* 新增软件版本
*
* @param etSoftwareVersion 软件版本
* @return 结果
*/
@Override
public int insertEtSoftwareVersion(EtSoftwareVersion etSoftwareVersion)
{
etSoftwareVersion.setCreateTime(DateUtils.getNowDate());
return etSoftwareVersionMapper.insertEtSoftwareVersion(etSoftwareVersion);
}
/**
* 修改软件版本
*
* @param etSoftwareVersion 软件版本
* @return 结果
*/
@Override
public int updateEtSoftwareVersion(EtSoftwareVersion etSoftwareVersion)
{
etSoftwareVersion.setUpdateTime(DateUtils.getNowDate());
return etSoftwareVersionMapper.updateEtSoftwareVersion(etSoftwareVersion);
}
/**
* 批量删除软件版本
*
* @param ids 需要删除的软件版本主键
* @return 结果
*/
@Override
public int deleteEtSoftwareVersionByIds(Long[] ids)
{
return etSoftwareVersionMapper.deleteEtSoftwareVersionByIds(ids);
}
/**
* 删除软件版本信息
*
* @param id 软件版本主键
* @return 结果
*/
@Override
public int deleteEtSoftwareVersionById(Long id)
{
return etSoftwareVersionMapper.deleteEtSoftwareVersionById(id);
}
}

View File

@ -169,7 +169,12 @@ public class SysDeptServiceImpl implements ISysDeptService
@Override
public SysDept selectDeptById(Long deptId)
{
return deptMapper.selectDeptById(deptId);
SysDept sysDept = deptMapper.selectDeptById(deptId);
if(ObjectUtil.isNotNull(sysDept.getAppUserId())){
AsUser asUser = asUserService.selectUserById(sysDept.getAppUserId());
sysDept.setUserName(asUser.getUserName());
}
return sysDept;
}
/**

View File

@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="mac" column="mac" />
<result property="sn" column="sn" />
<result property="modelId" column="model_id" />
<result property="hardwareVersionId" column="hardware_version_id" />
<result property="vehicleNum" column="vehicle_num" />
<result property="version" column="version" />
<result property="areaId" column="area_id" />
@ -37,11 +38,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectAsDeviceVo">
select device_id, picture, device_name, mac, sn, model_id, vehicle_num, area_id, activation_time, online_status, create_by, create_time, update_by, update_time, last_time, last_location_time, gps, remark, status, lock_status, location, remaining_power, voltage, qrcode, longitude, latitude, is_area_out_outage, is_admin_unlocking from et_device
select device_id, picture, device_name, mac, sn, model_id, hardware_version_id, vehicle_num, area_id, activation_time, online_status, create_by, create_time, update_by, update_time, last_time, last_location_time, gps, remark, status, lock_status, location, remaining_power, voltage, qrcode, longitude, latitude, is_area_out_outage, is_admin_unlocking from et_device
</sql>
<select id="selectAsDeviceList" parameterType="AsDevice" resultMap="AsDeviceResult">
select de.device_id, de.picture, de.device_name, de.mac, de.sn, de.model_id, de.vehicle_num, de.area_id,
select de.device_id, de.picture, de.device_name, de.mac, de.sn, de.model_id, de.hardware_version_id, de.vehicle_num, de.area_id,
de.activation_time, de.online_status, de.create_by, de.create_time, de.update_by,
de.update_time, de.last_time, de.last_location_time, de.gps, de.remark, de.status, de.lock_status, de.location,
de.remaining_power, de.voltage, de.qrcode, de.longitude, de.latitude, de.is_area_out_outage, de.is_admin_unlocking from et_device de
@ -63,7 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectAsDeviceListWithIsolate" parameterType="AsDevice" resultMap="AsDeviceResult">
select de.device_id, de.picture, de.device_name, de.mac, de.sn, de.model_id, de.vehicle_num, de.area_id,
select de.device_id, de.picture, de.device_name, de.mac, de.sn, de.model_id, de.hardware_version_id, de.vehicle_num, de.area_id,
de.activation_time, de.online_status, de.create_by, de.create_time, de.update_by,
de.update_time, de.last_time, de.last_location_time, de.gps, de.remark, de.status, de.lock_status, de.location,
de.remaining_power, de.voltage, de.version, de.qrcode, de.longitude, de.latitude, de.is_area_out_outage, de.is_admin_unlocking, de.signal_strength, de.satellites, de.quality from et_device de
@ -163,6 +164,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="mac != null">mac,</if>
<if test="sn != null">sn,</if>
<if test="modelId != null">model_id,</if>
<if test="hardwareVersionId != null">hardware_version_id,</if>
<if test="vehicleNum != null">vehicle_num,</if>
<if test="version != null">version,</if>
<if test="areaId != null">area_id,</if>
@ -192,6 +194,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="mac != null">#{mac},</if>
<if test="sn != null">#{sn},</if>
<if test="modelId != null">#{modelId},</if>
<if test="hardwareVersionId != null">#{hardwareVersionId},</if>
<if test="vehicleNum != null">#{vehicleNum},</if>
<if test="version != null">#{version},</if>
<if test="areaId != null">#{areaId},</if>
@ -225,6 +228,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="mac != null">mac = #{mac},</if>
<if test="sn != null">sn = #{sn},</if>
<if test="modelId != null">model_id = #{modelId},</if>
<if test="hardwareVersionId != null">hardware_version_id = #{hardwareVersionId},</if>
<if test="vehicleNum != null">vehicle_num = #{vehicleNum},</if>
<if test="version != null">version = #{version},</if>
<if test="areaId != null">area_id = #{areaId},</if>
@ -260,6 +264,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="mac != null">mac = #{mac},</if>
<if test="sn != null">sn = #{sn},</if>
model_id = #{modelId},
hardware_version_id = #{hardwareVersionId},
<if test="vehicleNum != null">vehicle_num = #{vehicleNum},</if>
<if test="version != null">version = #{version},</if>
area_id = #{areaId},
@ -294,6 +299,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deviceName != null">device_name = #{deviceName},</if>
<if test="mac != null">mac = #{mac},</if>
<if test="modelId != null">model_id = #{modelId},</if>
<if test="hardwareVersionId != null">hardware_version_id = #{hardwareVersionId},</if>
<if test="vehicleNum != null">vehicle_num = #{vehicleNum},</if>
<if test="version != null">version = #{version},</if>
<if test="areaId != null">area_id = #{areaId},</if>

View File

@ -0,0 +1,76 @@
<?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.ruoyi.system.mapper.EtHardwareVersionMapper">
<resultMap type="EtHardwareVersion" id="EtHardwareVersionResult">
<result property="id" column="id" />
<result property="version" column="version" />
<result property="productionTime" column="production_time" />
<result property="quantity" column="quantity" />
<result property="instructions" column="instructions" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectEtHardwareVersionVo">
select id, version, production_time, quantity, instructions, create_time from et_hardware_version
</sql>
<select id="selectEtHardwareVersionList" parameterType="EtHardwareVersion" resultMap="EtHardwareVersionResult">
<include refid="selectEtHardwareVersionVo"/>
<where>
<if test="version != null and version != ''"> and version = #{version}</if>
<if test="productionTime != null "> and production_time = #{productionTime}</if>
<if test="instructions != null and instructions != ''"> and instructions = #{instructions}</if>
</where>
</select>
<select id="selectEtHardwareVersionById" parameterType="Long" resultMap="EtHardwareVersionResult">
<include refid="selectEtHardwareVersionVo"/>
where id = #{id}
</select>
<insert id="insertEtHardwareVersion" parameterType="EtHardwareVersion">
insert into et_hardware_version
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="version != null">version,</if>
<if test="productionTime != null">production_time,</if>
<if test="quantity != null">quantity,</if>
<if test="instructions != null">instructions,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="version != null">#{version},</if>
<if test="productionTime != null">#{productionTime},</if>
<if test="quantity != null">#{quantity},</if>
<if test="instructions != null">#{instructions},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateEtHardwareVersion" parameterType="EtHardwareVersion">
update et_hardware_version
<trim prefix="SET" suffixOverrides=",">
<if test="version != null">version = #{version},</if>
<if test="productionTime != null">production_time = #{productionTime},</if>
<if test="quantity != null">quantity = #{quantity},</if>
<if test="instructions != null">instructions = #{instructions},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEtHardwareVersionById" parameterType="Long">
delete from et_hardware_version where id = #{id}
</delete>
<delete id="deleteEtHardwareVersionByIds" parameterType="String">
delete from et_hardware_version where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -38,8 +38,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectEtModelByModelId" parameterType="Long" resultMap="EtModelResult">
<include refid="selectEtModelVo"/>
where model_id = #{modelId}
select m.model_id, m.model, m.brand, m.operator, d.dept_name, m.full_voltage, m.low_voltage,
m.full_endurance, m.low_battery_reminder, m.create_by, m.create_time,
m.update_by, m.update_time, m.remark from et_model m
left join sys_dept d on d.dept_id = m.operator
where m.model_id = #{modelId}
</select>
<select id="selectAllCount" resultType="java.lang.Integer">

View File

@ -0,0 +1,71 @@
<?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.ruoyi.system.mapper.EtSoftwareVersionMapper">
<resultMap type="EtSoftwareVersion" id="EtSoftwareVersionResult">
<result property="id" column="id" />
<result property="version" column="version" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="content" column="content" />
</resultMap>
<sql id="selectEtSoftwareVersionVo">
select id, version, create_time, update_time, content from et_software_version
</sql>
<select id="selectEtSoftwareVersionList" parameterType="EtSoftwareVersion" resultMap="EtSoftwareVersionResult">
<include refid="selectEtSoftwareVersionVo"/>
<where>
<if test="version != null and version != ''"> and version = #{version}</if>
<if test="content != null and content != ''"> and content = #{content}</if>
</where>
</select>
<select id="selectEtSoftwareVersionById" parameterType="Long" resultMap="EtSoftwareVersionResult">
<include refid="selectEtSoftwareVersionVo"/>
where id = #{id}
</select>
<insert id="insertEtSoftwareVersion" parameterType="EtSoftwareVersion">
insert into et_software_version
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="version != null">version,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="content != null">content,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="version != null">#{version},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="content != null">#{content},</if>
</trim>
</insert>
<update id="updateEtSoftwareVersion" parameterType="EtSoftwareVersion">
update et_software_version
<trim prefix="SET" suffixOverrides=",">
<if test="version != null">version = #{version},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="content != null">content = #{content},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEtSoftwareVersionById" parameterType="Long">
delete from et_software_version where id = #{id}
</delete>
<delete id="deleteEtSoftwareVersionByIds" parameterType="String">
delete from et_software_version where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>