生产过程检验+手持发版记录
parent
7329c54eab
commit
9d55da3a0b
@ -0,0 +1,108 @@
|
||||
package com.op.system.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.op.common.core.utils.DateUtils;
|
||||
import com.op.common.core.utils.StringUtils;
|
||||
import com.op.common.core.utils.uuid.IdUtils;
|
||||
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.op.common.log.annotation.Log;
|
||||
import com.op.common.log.enums.BusinessType;
|
||||
import com.op.common.security.annotation.RequiresPermissions;
|
||||
import com.op.system.domain.BaseApkFile;
|
||||
import com.op.system.service.IBaseApkFileService;
|
||||
import com.op.common.core.web.controller.BaseController;
|
||||
import com.op.common.core.web.domain.AjaxResult;
|
||||
import com.op.common.core.utils.poi.ExcelUtil;
|
||||
import com.op.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 手持apk版本控制Controller
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/apkFile")
|
||||
public class BaseApkFileController extends BaseController {
|
||||
@Autowired
|
||||
private IBaseApkFileService baseApkFileService;
|
||||
|
||||
/**
|
||||
* 查询手持apk版本控制列表
|
||||
*/
|
||||
@RequiresPermissions("system:apkFile:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BaseApkFile baseApkFile) {
|
||||
startPage();
|
||||
List<BaseApkFile> list = baseApkFileService.selectBaseApkFileList(baseApkFile);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出手持apk版本控制列表
|
||||
*/
|
||||
@RequiresPermissions("system:apkFile:export")
|
||||
@Log(title = "手持apk版本控制", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BaseApkFile baseApkFile) {
|
||||
List<BaseApkFile> list = baseApkFileService.selectBaseApkFileList(baseApkFile);
|
||||
ExcelUtil<BaseApkFile> util = new ExcelUtil<BaseApkFile>(BaseApkFile.class);
|
||||
util.exportExcel(response, list, "手持apk版本控制数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取手持apk版本控制详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:apkFile:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id) {
|
||||
return success(baseApkFileService.selectBaseApkFileById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增手持apk版本控制
|
||||
*/
|
||||
@RequiresPermissions("system:apkFile:add")
|
||||
@Log(title = "手持apk版本控制", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BaseApkFile baseApkFile) {
|
||||
return toAjax(baseApkFileService.insertBaseApkFile(baseApkFile));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改手持apk版本控制
|
||||
*/
|
||||
@RequiresPermissions("system:apkFile:edit")
|
||||
@Log(title = "手持apk版本控制", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BaseApkFile baseApkFile) {
|
||||
return toAjax(baseApkFileService.updateBaseApkFile(baseApkFile));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除手持apk版本控制
|
||||
*/
|
||||
@RequiresPermissions("system:apkFile:remove")
|
||||
@Log(title = "手持apk版本控制", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids) {
|
||||
return toAjax(baseApkFileService.deleteBaseApkFileByIds(ids));
|
||||
}
|
||||
|
||||
/**手持请求**/
|
||||
@PostMapping("/getLastApkVersion")
|
||||
public AjaxResult getLastApkVersion(@RequestBody BaseApkFile baseApkFile) {
|
||||
|
||||
return success(baseApkFileService.getLastApkVersion(baseApkFile));
|
||||
}
|
||||
}
|
@ -0,0 +1,123 @@
|
||||
package com.op.system.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.op.common.core.annotation.Excel;
|
||||
import com.op.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 手持apk版本控制对象 base_apk_file
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-24
|
||||
*/
|
||||
public class BaseApkFile extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ID */
|
||||
private String id;
|
||||
|
||||
/** 文件名称 */
|
||||
@Excel(name = "文件名称")
|
||||
private String fileName;
|
||||
|
||||
/** 文件地址 */
|
||||
@Excel(name = "文件地址")
|
||||
private String fileAddress;
|
||||
|
||||
/** 版本号 */
|
||||
@Excel(name = "版本号")
|
||||
private String version;
|
||||
|
||||
/** 备用1 */
|
||||
@Excel(name = "备用1")
|
||||
private String attr1;
|
||||
|
||||
/** 备用2 */
|
||||
@Excel(name = "备用2")
|
||||
private String attr2;
|
||||
|
||||
/** 备用3 */
|
||||
@Excel(name = "备用3")
|
||||
private String attr3;
|
||||
|
||||
/** 备用4 */
|
||||
@Excel(name = "备用4")
|
||||
private String attr4;
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
public void setFileName(String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
public void setFileAddress(String fileAddress) {
|
||||
this.fileAddress = fileAddress;
|
||||
}
|
||||
|
||||
public String getFileAddress() {
|
||||
return fileAddress;
|
||||
}
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
public void setAttr1(String attr1) {
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
|
||||
public String getAttr1() {
|
||||
return attr1;
|
||||
}
|
||||
public void setAttr2(String attr2) {
|
||||
this.attr2 = attr2;
|
||||
}
|
||||
|
||||
public String getAttr2() {
|
||||
return attr2;
|
||||
}
|
||||
public void setAttr3(String attr3) {
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public String getAttr3() {
|
||||
return attr3;
|
||||
}
|
||||
public void setAttr4(String attr4) {
|
||||
this.attr4 = attr4;
|
||||
}
|
||||
|
||||
public String getAttr4() {
|
||||
return attr4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("fileName", getFileName())
|
||||
.append("fileAddress", getFileAddress())
|
||||
.append("version", getVersion())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("attr4", getAttr4())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.op.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.op.system.domain.BaseApkFile;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 手持apk版本控制Mapper接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-24
|
||||
*/
|
||||
@Mapper
|
||||
public interface BaseApkFileMapper {
|
||||
/**
|
||||
* 查询手持apk版本控制
|
||||
*
|
||||
* @param id 手持apk版本控制主键
|
||||
* @return 手持apk版本控制
|
||||
*/
|
||||
public BaseApkFile selectBaseApkFileById(String id);
|
||||
|
||||
/**
|
||||
* 查询手持apk版本控制列表
|
||||
*
|
||||
* @param baseApkFile 手持apk版本控制
|
||||
* @return 手持apk版本控制集合
|
||||
*/
|
||||
public List<BaseApkFile> selectBaseApkFileList(BaseApkFile baseApkFile);
|
||||
|
||||
/**
|
||||
* 新增手持apk版本控制
|
||||
*
|
||||
* @param baseApkFile 手持apk版本控制
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseApkFile(BaseApkFile baseApkFile);
|
||||
|
||||
/**
|
||||
* 修改手持apk版本控制
|
||||
*
|
||||
* @param baseApkFile 手持apk版本控制
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseApkFile(BaseApkFile baseApkFile);
|
||||
|
||||
/**
|
||||
* 删除手持apk版本控制
|
||||
*
|
||||
* @param id 手持apk版本控制主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseApkFileById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除手持apk版本控制
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseApkFileByIds(String[] ids);
|
||||
|
||||
BaseApkFile getLastApkVersion(BaseApkFile baseApkFile);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.op.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.op.system.domain.BaseApkFile;
|
||||
|
||||
/**
|
||||
* 手持apk版本控制Service接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-24
|
||||
*/
|
||||
public interface IBaseApkFileService {
|
||||
/**
|
||||
* 查询手持apk版本控制
|
||||
*
|
||||
* @param id 手持apk版本控制主键
|
||||
* @return 手持apk版本控制
|
||||
*/
|
||||
public BaseApkFile selectBaseApkFileById(String id);
|
||||
|
||||
/**
|
||||
* 查询手持apk版本控制列表
|
||||
*
|
||||
* @param baseApkFile 手持apk版本控制
|
||||
* @return 手持apk版本控制集合
|
||||
*/
|
||||
public List<BaseApkFile> selectBaseApkFileList(BaseApkFile baseApkFile);
|
||||
|
||||
/**
|
||||
* 新增手持apk版本控制
|
||||
*
|
||||
* @param baseApkFile 手持apk版本控制
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseApkFile(BaseApkFile baseApkFile);
|
||||
|
||||
/**
|
||||
* 修改手持apk版本控制
|
||||
*
|
||||
* @param baseApkFile 手持apk版本控制
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseApkFile(BaseApkFile baseApkFile);
|
||||
|
||||
/**
|
||||
* 批量删除手持apk版本控制
|
||||
*
|
||||
* @param ids 需要删除的手持apk版本控制主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseApkFileByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除手持apk版本控制信息
|
||||
*
|
||||
* @param id 手持apk版本控制主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseApkFileById(String id);
|
||||
|
||||
BaseApkFile getLastApkVersion(BaseApkFile baseApkFile);
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
package com.op.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.op.common.core.utils.DateUtils;
|
||||
import com.op.common.core.utils.uuid.IdUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.op.system.mapper.BaseApkFileMapper;
|
||||
import com.op.system.domain.BaseApkFile;
|
||||
import com.op.system.service.IBaseApkFileService;
|
||||
|
||||
/**
|
||||
* 手持apk版本控制Service业务层处理
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-24
|
||||
*/
|
||||
@Service
|
||||
public class BaseApkFileServiceImpl implements IBaseApkFileService {
|
||||
@Autowired
|
||||
private BaseApkFileMapper baseApkFileMapper;
|
||||
|
||||
/**
|
||||
* 查询手持apk版本控制
|
||||
*
|
||||
* @param id 手持apk版本控制主键
|
||||
* @return 手持apk版本控制
|
||||
*/
|
||||
@Override
|
||||
public BaseApkFile selectBaseApkFileById(String id) {
|
||||
return baseApkFileMapper.selectBaseApkFileById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询手持apk版本控制列表
|
||||
*
|
||||
* @param baseApkFile 手持apk版本控制
|
||||
* @return 手持apk版本控制
|
||||
*/
|
||||
@Override
|
||||
public List<BaseApkFile> selectBaseApkFileList(BaseApkFile baseApkFile) {
|
||||
return baseApkFileMapper.selectBaseApkFileList(baseApkFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增手持apk版本控制
|
||||
*
|
||||
* @param baseApkFile 手持apk版本控制
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBaseApkFile(BaseApkFile baseApkFile) {
|
||||
baseApkFile.setId(IdUtils.fastSimpleUUID());
|
||||
baseApkFile.setCreateTime(DateUtils.getNowDate());
|
||||
return baseApkFileMapper.insertBaseApkFile(baseApkFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改手持apk版本控制
|
||||
*
|
||||
* @param baseApkFile 手持apk版本控制
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBaseApkFile(BaseApkFile baseApkFile) {
|
||||
baseApkFile.setUpdateTime(DateUtils.getNowDate());
|
||||
return baseApkFileMapper.updateBaseApkFile(baseApkFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除手持apk版本控制
|
||||
*
|
||||
* @param ids 需要删除的手持apk版本控制主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseApkFileByIds(String[] ids) {
|
||||
return baseApkFileMapper.deleteBaseApkFileByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除手持apk版本控制信息
|
||||
*
|
||||
* @param id 手持apk版本控制主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseApkFileById(String id) {
|
||||
return baseApkFileMapper.deleteBaseApkFileById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseApkFile getLastApkVersion(BaseApkFile baseApkFile) {
|
||||
return baseApkFileMapper.getLastApkVersion(baseApkFile);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,117 @@
|
||||
<?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.op.system.mapper.BaseApkFileMapper">
|
||||
|
||||
<resultMap type="BaseApkFile" id="BaseApkFileResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="fileName" column="file_name" />
|
||||
<result property="fileAddress" column="file_address" />
|
||||
<result property="version" column="version" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseApkFileVo">
|
||||
select id, file_name, file_address, version, attr1, attr2, attr3, attr4,
|
||||
create_by, create_time, update_by, update_time, remark
|
||||
from base_apk_file
|
||||
</sql>
|
||||
|
||||
<select id="selectBaseApkFileList" parameterType="BaseApkFile" resultMap="BaseApkFileResult">
|
||||
<include refid="selectBaseApkFileVo"/>
|
||||
<where>
|
||||
<if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
|
||||
<if test="fileAddress != null and fileAddress != ''"> and file_address = #{fileAddress}</if>
|
||||
<if test="version != null and version != ''"> and version like concat('%', #{version}, '%')</if>
|
||||
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
||||
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
||||
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
|
||||
<if test="attr4 != null and attr4 != ''"> and attr4 = #{attr4}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectBaseApkFileById" parameterType="String" resultMap="BaseApkFileResult">
|
||||
<include refid="selectBaseApkFileVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="getLastApkVersion" resultType="com.op.system.domain.BaseApkFile">
|
||||
select top 1 id, file_name, file_address, version, attr1, attr2, attr3, attr4,
|
||||
create_by, create_time, update_by, update_time, remark
|
||||
from base_apk_file
|
||||
order by create_by create_by desc
|
||||
</select>
|
||||
|
||||
<insert id="insertBaseApkFile" parameterType="BaseApkFile" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into base_apk_file
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="fileName != null">file_name,</if>
|
||||
<if test="fileAddress != null">file_address,</if>
|
||||
<if test="version != null">version,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="fileName != null">#{fileName},</if>
|
||||
<if test="fileAddress != null">#{fileAddress},</if>
|
||||
<if test="version != null">#{version},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBaseApkFile" parameterType="BaseApkFile">
|
||||
update base_apk_file
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="fileName != null">file_name = #{fileName},</if>
|
||||
<if test="fileAddress != null">file_address = #{fileAddress},</if>
|
||||
<if test="version != null">version = #{version},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBaseApkFileById" parameterType="String">
|
||||
delete from base_apk_file where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBaseApkFileByIds" parameterType="String">
|
||||
delete from base_apk_file where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue