Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH
This commit is contained in:
+28
-14
@@ -1,28 +1,29 @@
|
||||
package com.jero.modules.ota.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.ota.entity.OtaBaCxList;
|
||||
import com.jero.modules.ota.service.IOtaBaCxListService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.ota.entity.OtaBaCxList;
|
||||
import com.jero.modules.ota.service.IOtaBaCxListService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* @Description: 车型及功能备案列表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-03-17
|
||||
@@ -167,4 +168,17 @@ public class OtaBaCxListController extends JeroController<OtaBaCxList, IOtaBaCxL
|
||||
return super.importExcel(request, response, OtaBaCxList.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 备案维护
|
||||
*
|
||||
*/
|
||||
@AutoLog(value = "车型及功能备案列表-备案维护")
|
||||
@ApiOperation(value="车型及功能备案列表-备案维护", notes="车型及功能备案列表-备案维护")
|
||||
@PutMapping(value = "/batchRecord")
|
||||
public Result<?> batchRecord(@RequestBody List<OtaBaCxList> recordList) {
|
||||
otaBaCxListService.batchRecord(recordList);
|
||||
return Result.OK("备案维护成功!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+26
-13
@@ -1,28 +1,29 @@
|
||||
package com.jero.modules.ota.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.ota.entity.OtaBaSjList;
|
||||
import com.jero.modules.ota.service.IOtaBaSjListService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.ota.entity.OtaBaSjList;
|
||||
import com.jero.modules.ota.service.IOtaBaSjListService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* @Description: 升级备案-升级活动备案列表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-03-17
|
||||
@@ -167,4 +168,16 @@ public class OtaBaSjListController extends JeroController<OtaBaSjList, IOtaBaSjL
|
||||
return super.importExcel(request, response, OtaBaSjList.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 备案维护
|
||||
*
|
||||
*/
|
||||
@AutoLog(value = "升级备案-备案维护")
|
||||
@ApiOperation(value="升级备案-备案维护", notes="升级备案-备案维护")
|
||||
@PutMapping(value = "/batchRecord")
|
||||
public Result<?> batchRecord(@RequestBody List<OtaBaSjList> recordList) {
|
||||
otaBaSjListService.batchRecord(recordList);
|
||||
return Result.OK("备案维护成功!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+8
-1
@@ -1,7 +1,8 @@
|
||||
package com.jero.modules.ota.service;
|
||||
|
||||
import com.jero.modules.ota.entity.OtaBaCxList;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.ota.entity.OtaBaCxList;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -58,4 +59,10 @@ public interface IOtaBaCxListService extends IService<OtaBaCxList> {
|
||||
* @return
|
||||
*/
|
||||
List<OtaBaCxList> queryList();
|
||||
|
||||
/**
|
||||
* 备案维护
|
||||
*
|
||||
*/
|
||||
void batchRecord(List<OtaBaCxList> recordList);
|
||||
}
|
||||
|
||||
+8
-1
@@ -1,7 +1,8 @@
|
||||
package com.jero.modules.ota.service;
|
||||
|
||||
import com.jero.modules.ota.entity.OtaBaSjList;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.ota.entity.OtaBaSjList;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -58,4 +59,10 @@ public interface IOtaBaSjListService extends IService<OtaBaSjList> {
|
||||
* @return
|
||||
*/
|
||||
List<OtaBaSjList> queryList();
|
||||
|
||||
/**
|
||||
* 备案维护
|
||||
*
|
||||
*/
|
||||
void batchRecord(List<OtaBaSjList> recordList);
|
||||
}
|
||||
|
||||
+82
-45
@@ -1,29 +1,40 @@
|
||||
package com.jero.modules.ota.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.modules.ota.entity.OtaBaCxList;
|
||||
import com.jero.modules.ota.entity.OtaBaCxLsjl;
|
||||
import com.jero.modules.ota.mapper.OtaBaCxListMapper;
|
||||
import com.jero.modules.ota.service.IOtaBaCxListService;
|
||||
import com.jero.modules.ota.service.IOtaBaCxLsjlService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 车型及功能备案列表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-03-17
|
||||
* @Date: 2023-03-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class OtaBaCxListServiceImpl extends ServiceImpl<OtaBaCxListMapper, OtaBaCxList> implements IOtaBaCxListService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param otaBaCxList
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
@Autowired
|
||||
private IOtaBaCxLsjlService otaBaCxLsjlService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param otaBaCxList
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(OtaBaCxList otaBaCxList) {
|
||||
Date now = new Date();
|
||||
otaBaCxList.setCreateTime(now);
|
||||
@@ -31,59 +42,85 @@ public class OtaBaCxListServiceImpl extends ServiceImpl<OtaBaCxListMapper, OtaBa
|
||||
save(otaBaCxList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param otaBaCxList
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param otaBaCxList
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(OtaBaCxList otaBaCxList) {
|
||||
Date now = new Date();
|
||||
Date now = new Date();
|
||||
otaBaCxList.setUpdateTime(now);
|
||||
saveOrUpdate(otaBaCxList);
|
||||
saveOrUpdate(otaBaCxList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public OtaBaCxList queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<OtaBaCxList> queryList() {
|
||||
return list();
|
||||
}
|
||||
|
||||
/**
|
||||
* 备案维护
|
||||
*/
|
||||
@Override
|
||||
public void batchRecord(List<OtaBaCxList> recordList) {
|
||||
try {
|
||||
if (null != recordList && recordList.size() > 0) {
|
||||
for (OtaBaCxList obc : recordList) {
|
||||
String id = obc.getId();
|
||||
OtaBaCxList otaBaCxList = this.queryById(id);
|
||||
otaBaCxList.setBatjsj(obc.getBatjsj());
|
||||
otaBaCxList.setBz(obc.getBz());
|
||||
this.saveOrUpdate(otaBaCxList);
|
||||
//添加历史记录数据
|
||||
OtaBaCxLsjl lsjl = new OtaBaCxLsjl();
|
||||
lsjl.setOtaId(id);
|
||||
lsjl.setSjzt(obc.getBz());
|
||||
otaBaCxLsjlService.add(lsjl);
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
throw new JeroBootException(ex.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+82
-45
@@ -1,29 +1,40 @@
|
||||
package com.jero.modules.ota.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.modules.ota.entity.OtaBaSjList;
|
||||
import com.jero.modules.ota.entity.OtaBaSjLsjl;
|
||||
import com.jero.modules.ota.mapper.OtaBaSjListMapper;
|
||||
import com.jero.modules.ota.service.IOtaBaSjListService;
|
||||
import com.jero.modules.ota.service.IOtaBaSjLsjlService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 升级备案-升级活动备案列表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-03-17
|
||||
* @Date: 2023-03-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class OtaBaSjListServiceImpl extends ServiceImpl<OtaBaSjListMapper, OtaBaSjList> implements IOtaBaSjListService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param otaBaSjList
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
@Autowired
|
||||
private IOtaBaSjLsjlService otaBaSjLsjlService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param otaBaSjList
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(OtaBaSjList otaBaSjList) {
|
||||
Date now = new Date();
|
||||
otaBaSjList.setCreateTime(now);
|
||||
@@ -31,59 +42,85 @@ public class OtaBaSjListServiceImpl extends ServiceImpl<OtaBaSjListMapper, OtaBa
|
||||
save(otaBaSjList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param otaBaSjList
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param otaBaSjList
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(OtaBaSjList otaBaSjList) {
|
||||
Date now = new Date();
|
||||
Date now = new Date();
|
||||
otaBaSjList.setUpdateTime(now);
|
||||
saveOrUpdate(otaBaSjList);
|
||||
saveOrUpdate(otaBaSjList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public OtaBaSjList queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<OtaBaSjList> queryList() {
|
||||
return list();
|
||||
}
|
||||
|
||||
/**
|
||||
* 备案维护
|
||||
*/
|
||||
@Override
|
||||
public void batchRecord(List<OtaBaSjList> recordList) {
|
||||
try {
|
||||
if (null != recordList && recordList.size() > 0) {
|
||||
for (OtaBaSjList obs : recordList) {
|
||||
String id = obs.getId();
|
||||
OtaBaSjList otaBaSjList = this.queryById(id);
|
||||
otaBaSjList.setBatjsj(obs.getBatjsj());
|
||||
otaBaSjList.setBz(obs.getBz());
|
||||
this.saveOrUpdate(otaBaSjList);
|
||||
//添加历史记录数据
|
||||
OtaBaSjLsjl lsjl = new OtaBaSjLsjl();
|
||||
lsjl.setOtaId(id);
|
||||
lsjl.setSjzt(obs.getBz());
|
||||
otaBaSjLsjlService.add(lsjl);
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
throw new JeroBootException(ex.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user