开发OTA备案工具-车辆升级
This commit is contained in:
+15
@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.system.query.QueryGenerator;
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
|
import com.jero.modules.ota.entity.OtaBaCxAqcs;
|
||||||
import com.jero.modules.ota.entity.OtaBaSjJssj;
|
import com.jero.modules.ota.entity.OtaBaSjJssj;
|
||||||
import com.jero.modules.ota.service.IOtaBaSjJssjService;
|
import com.jero.modules.ota.service.IOtaBaSjJssjService;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
@@ -144,6 +145,20 @@ public class OtaBaSjJssjController extends JeroController<OtaBaSjJssj, IOtaBaSjJ
|
|||||||
return Result.OK(otaBaSjJssj);
|
return Result.OK(otaBaSjJssj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过otaId查询
|
||||||
|
*
|
||||||
|
* @param otaId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "升级备案-结束升级-通过otaId查询")
|
||||||
|
@ApiOperation(value = "升级备案-结束升级-通过otaId查询", notes = "升级备案-结束升级-通过otaId查询")
|
||||||
|
@GetMapping(value = "/queryByOtaId")
|
||||||
|
public Result<?> queryByOtaId(@RequestParam(name = "otaId", required = true) String otaId) {
|
||||||
|
OtaBaSjJssj otaBaSjJssj = otaBaSjJssjService.queryByOtaId(otaId);
|
||||||
|
return Result.OK(otaBaSjJssj);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出excel
|
* 导出excel
|
||||||
*
|
*
|
||||||
|
|||||||
+52
-26
@@ -1,21 +1,20 @@
|
|||||||
package com.jero.modules.ota.entity;
|
package com.jero.modules.ota.entity;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
|
||||||
import com.jero.common.aspect.annotation.Dict;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -28,67 +27,94 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
|||||||
@TableName("ota_ba_sj_jssj")
|
@TableName("ota_ba_sj_jssj")
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@ApiModel(value="ota_ba_sj_jssj对象", description="升级备案-结束升级")
|
@ApiModel(value = "ota_ba_sj_jssj对象", description = "升级备案-结束升级")
|
||||||
public class OtaBaSjJssj implements Serializable {
|
public class OtaBaSjJssj implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**主键*/
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
@ApiModelProperty(value = "主键")
|
@ApiModelProperty(value = "主键")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
/**创建人*/
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
@ApiModelProperty(value = "创建人")
|
@ApiModelProperty(value = "创建人")
|
||||||
private String createBy;
|
private String createBy;
|
||||||
|
|
||||||
/**创建日期*/
|
/**
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
* 创建日期
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
*/
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty(value = "创建日期")
|
@ApiModelProperty(value = "创建日期")
|
||||||
private java.util.Date createTime;
|
private java.util.Date createTime;
|
||||||
|
|
||||||
/**更新人*/
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
@ApiModelProperty(value = "更新人")
|
@ApiModelProperty(value = "更新人")
|
||||||
private String updateBy;
|
private String updateBy;
|
||||||
|
|
||||||
/**更新日期*/
|
/**
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
* 更新日期
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
*/
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty(value = "更新日期")
|
@ApiModelProperty(value = "更新日期")
|
||||||
private java.util.Date updateTime;
|
private java.util.Date updateTime;
|
||||||
|
|
||||||
/**所属部门*/
|
/**
|
||||||
|
* 所属部门
|
||||||
|
*/
|
||||||
@ApiModelProperty(value = "所属部门")
|
@ApiModelProperty(value = "所属部门")
|
||||||
private String sysOrgCode;
|
private String sysOrgCode;
|
||||||
|
|
||||||
/**otaId*/
|
/**
|
||||||
|
* otaId
|
||||||
|
*/
|
||||||
@Excel(name = "otaId", width = 15)
|
@Excel(name = "otaId", width = 15)
|
||||||
@ApiModelProperty(value = "otaId")
|
@ApiModelProperty(value = "otaId")
|
||||||
private String otaid;
|
private String otaId;
|
||||||
|
|
||||||
/**实施的升级是否和备案一致*/
|
/**
|
||||||
|
* 实施的升级是否和备案一致
|
||||||
|
*/
|
||||||
@Excel(name = "实施的升级是否和备案一致", width = 15)
|
@Excel(name = "实施的升级是否和备案一致", width = 15)
|
||||||
@ApiModelProperty(value = "实施的升级是否和备案一致")
|
@ApiModelProperty(value = "实施的升级是否和备案一致")
|
||||||
private Integer sfyz;
|
private Integer sfyz;
|
||||||
|
|
||||||
/**完成升级的车辆数*/
|
/**
|
||||||
|
* 完成升级的车辆数
|
||||||
|
*/
|
||||||
@Excel(name = "完成升级的车辆数", width = 15)
|
@Excel(name = "完成升级的车辆数", width = 15)
|
||||||
@ApiModelProperty(value = "完成升级的车辆数")
|
@ApiModelProperty(value = "完成升级的车辆数")
|
||||||
private String wccls;
|
private String wccls;
|
||||||
|
|
||||||
/**VIN码清单*/
|
/**
|
||||||
|
* VIN码清单
|
||||||
|
*/
|
||||||
@Excel(name = "VIN码清单", width = 15)
|
@Excel(name = "VIN码清单", width = 15)
|
||||||
@ApiModelProperty(value = "VIN码清单")
|
@ApiModelProperty(value = "VIN码清单")
|
||||||
private String csv;
|
private String csv;
|
||||||
|
|
||||||
/**故障处置措施和应急响应实施记录*/
|
/**
|
||||||
|
* 故障处置措施和应急响应实施记录
|
||||||
|
*/
|
||||||
@Excel(name = "故障处置措施和应急响应实施记录", width = 15)
|
@Excel(name = "故障处置措施和应急响应实施记录", width = 15)
|
||||||
@ApiModelProperty(value = "故障处置措施和应急响应实施记录")
|
@ApiModelProperty(value = "故障处置措施和应急响应实施记录")
|
||||||
private String ssjl;
|
private String ssjl;
|
||||||
|
|
||||||
/**故障处置措施和应急响应实施记录附件*/
|
/**
|
||||||
|
* 故障处置措施和应急响应实施记录附件
|
||||||
|
*/
|
||||||
@Excel(name = "故障处置措施和应急响应实施记录附件", width = 15)
|
@Excel(name = "故障处置措施和应急响应实施记录附件", width = 15)
|
||||||
@ApiModelProperty(value = "故障处置措施和应急响应实施记录附件")
|
@ApiModelProperty(value = "故障处置措施和应急响应实施记录附件")
|
||||||
private String ssjlfj;
|
private String ssjlfj;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<OtaBaSjJssjyy> list;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -64,7 +64,7 @@ public class OtaBaSjJssjyy implements Serializable {
|
|||||||
/**otaId*/
|
/**otaId*/
|
||||||
@Excel(name = "otaId", width = 15)
|
@Excel(name = "otaId", width = 15)
|
||||||
@ApiModelProperty(value = "otaId")
|
@ApiModelProperty(value = "otaId")
|
||||||
private String otaid;
|
private String otaId;
|
||||||
|
|
||||||
/**未完成原因*/
|
/**未完成原因*/
|
||||||
@Excel(name = "未完成原因", width = 15)
|
@Excel(name = "未完成原因", width = 15)
|
||||||
|
|||||||
+2
@@ -58,4 +58,6 @@ public interface IOtaBaSjJssjService extends IService<OtaBaSjJssj> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<OtaBaSjJssj> queryList();
|
List<OtaBaSjJssj> queryList();
|
||||||
|
|
||||||
|
OtaBaSjJssj queryByOtaId(String otaId);
|
||||||
}
|
}
|
||||||
|
|||||||
+5
@@ -2,6 +2,7 @@ package com.jero.modules.ota.service;
|
|||||||
|
|
||||||
import com.jero.modules.ota.entity.OtaBaSjJssjyy;
|
import com.jero.modules.ota.entity.OtaBaSjJssjyy;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -36,6 +37,8 @@ public interface IOtaBaSjJssjyyService extends IService<OtaBaSjJssjyy> {
|
|||||||
*/
|
*/
|
||||||
void deleteById(String id);
|
void deleteById(String id);
|
||||||
|
|
||||||
|
void deleteByOtaId(String otaId)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
*
|
*
|
||||||
@@ -58,4 +61,6 @@ public interface IOtaBaSjJssjyyService extends IService<OtaBaSjJssjyy> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<OtaBaSjJssjyy> queryList();
|
List<OtaBaSjJssjyy> queryList();
|
||||||
|
|
||||||
|
List<OtaBaSjJssjyy> queryByOtaId(String otaId);
|
||||||
}
|
}
|
||||||
|
|||||||
+31
@@ -1,11 +1,23 @@
|
|||||||
package com.jero.modules.ota.service.impl;
|
package com.jero.modules.ota.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.jero.modules.ota.entity.AttachmentEO;
|
||||||
|
import com.jero.modules.ota.entity.OtaBaCxAqcs;
|
||||||
import com.jero.modules.ota.entity.OtaBaSjJssj;
|
import com.jero.modules.ota.entity.OtaBaSjJssj;
|
||||||
|
import com.jero.modules.ota.entity.OtaBaSjJssjyy;
|
||||||
import com.jero.modules.ota.mapper.OtaBaSjJssjMapper;
|
import com.jero.modules.ota.mapper.OtaBaSjJssjMapper;
|
||||||
|
import com.jero.modules.ota.service.IOtaBaCxTxjlService;
|
||||||
import com.jero.modules.ota.service.IOtaBaSjJssjService;
|
import com.jero.modules.ota.service.IOtaBaSjJssjService;
|
||||||
|
import com.jero.modules.ota.service.IOtaBaSjJssjyyService;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -17,6 +29,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
@Service
|
@Service
|
||||||
public class OtaBaSjJssjServiceImpl extends ServiceImpl<OtaBaSjJssjMapper, OtaBaSjJssj> implements IOtaBaSjJssjService {
|
public class OtaBaSjJssjServiceImpl extends ServiceImpl<OtaBaSjJssjMapper, OtaBaSjJssj> implements IOtaBaSjJssjService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IOtaBaSjJssjyyService otaBaSjJssjyyService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*
|
*
|
||||||
@@ -29,6 +45,7 @@ public class OtaBaSjJssjServiceImpl extends ServiceImpl<OtaBaSjJssjMapper, OtaBa
|
|||||||
otaBaSjJssj.setCreateTime(now);
|
otaBaSjJssj.setCreateTime(now);
|
||||||
otaBaSjJssj.setUpdateTime(now);
|
otaBaSjJssj.setUpdateTime(now);
|
||||||
save(otaBaSjJssj);
|
save(otaBaSjJssj);
|
||||||
|
otaBaSjJssjyyService.saveBatch(otaBaSjJssj.getList());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -42,6 +59,8 @@ public class OtaBaSjJssjServiceImpl extends ServiceImpl<OtaBaSjJssjMapper, OtaBa
|
|||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
otaBaSjJssj.setUpdateTime(now);
|
otaBaSjJssj.setUpdateTime(now);
|
||||||
saveOrUpdate(otaBaSjJssj);
|
saveOrUpdate(otaBaSjJssj);
|
||||||
|
otaBaSjJssjyyService.deleteByOtaId(otaBaSjJssj.getOtaId());
|
||||||
|
otaBaSjJssjyyService.saveBatch(otaBaSjJssj.getList());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -86,4 +105,16 @@ public class OtaBaSjJssjServiceImpl extends ServiceImpl<OtaBaSjJssjMapper, OtaBa
|
|||||||
public List<OtaBaSjJssj> queryList() {
|
public List<OtaBaSjJssj> queryList() {
|
||||||
return list();
|
return list();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OtaBaSjJssj queryByOtaId(String otaId) {
|
||||||
|
LambdaQueryWrapper<OtaBaSjJssj> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(OtaBaSjJssj::getOtaId, otaId);
|
||||||
|
OtaBaSjJssj res = this.getOne(queryWrapper, false);
|
||||||
|
|
||||||
|
List<OtaBaSjJssjyy> list = otaBaSjJssjyyService.queryByOtaId(otaId);
|
||||||
|
res.setList(list);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+23
@@ -1,11 +1,16 @@
|
|||||||
package com.jero.modules.ota.service.impl;
|
package com.jero.modules.ota.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.jero.modules.ota.entity.OtaBaSjJssj;
|
||||||
import com.jero.modules.ota.entity.OtaBaSjJssjyy;
|
import com.jero.modules.ota.entity.OtaBaSjJssjyy;
|
||||||
import com.jero.modules.ota.mapper.OtaBaSjJssjyyMapper;
|
import com.jero.modules.ota.mapper.OtaBaSjJssjyyMapper;
|
||||||
import com.jero.modules.ota.service.IOtaBaSjJssjyyService;
|
import com.jero.modules.ota.service.IOtaBaSjJssjyyService;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -55,6 +60,16 @@ public class OtaBaSjJssjyyServiceImpl extends ServiceImpl<OtaBaSjJssjyyMapper, O
|
|||||||
removeById(id);
|
removeById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteByOtaId(String otaId) {
|
||||||
|
if(StringUtils.isNotEmpty(otaId)){
|
||||||
|
LambdaQueryWrapper<OtaBaSjJssjyy> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(OtaBaSjJssjyy::getOtaId, otaId);
|
||||||
|
remove(queryWrapper);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
*
|
*
|
||||||
@@ -86,4 +101,12 @@ public class OtaBaSjJssjyyServiceImpl extends ServiceImpl<OtaBaSjJssjyyMapper, O
|
|||||||
public List<OtaBaSjJssjyy> queryList() {
|
public List<OtaBaSjJssjyy> queryList() {
|
||||||
return list();
|
return list();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<OtaBaSjJssjyy> queryByOtaId(String otaId) {
|
||||||
|
LambdaQueryWrapper<OtaBaSjJssjyy> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(OtaBaSjJssjyy::getOtaId, otaId);
|
||||||
|
return this.list(queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user