开发OTA备案工具 修改备案历史接口
This commit is contained in:
+8
-4
@@ -174,10 +174,14 @@ public class OtaBaCxListController extends JeroController<OtaBaCxList, IOtaBaCxL
|
||||
*
|
||||
*/
|
||||
@AutoLog(value = "车型及功能备案列表-备案维护")
|
||||
@ApiOperation(value="车型及功能备案列表-备案维护", notes="车型及功能备案列表-备案维护")
|
||||
@PutMapping(value = "/batchRecord")
|
||||
public Result<?> batchRecord(@RequestBody List<OtaBaCxList> recordList) {
|
||||
otaBaCxListService.batchRecord(recordList);
|
||||
@ApiOperation(value = "车型及功能备案列表-备案维护", notes = "车型及功能备案列表-备案维护")
|
||||
@PostMapping(value = "/batchRecord")
|
||||
public Result<?> batchRecord(@RequestParam(name = "ids", required = true) String ids,
|
||||
@RequestParam(name = "bazt", required = true) String bazt,
|
||||
@RequestParam(name = "batjsj", required = true) String batjsj,
|
||||
@RequestParam(name = "bz", required = true) String bz,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
otaBaCxListService.batchRecord(ids, bazt, batjsj, bz, cut);
|
||||
return Result.OK("备案维护成功!");
|
||||
}
|
||||
|
||||
|
||||
+8
-4
@@ -173,10 +173,14 @@ public class OtaBaSjListController extends JeroController<OtaBaSjList, IOtaBaSjL
|
||||
*
|
||||
*/
|
||||
@AutoLog(value = "升级备案-备案维护")
|
||||
@ApiOperation(value="升级备案-备案维护", notes="升级备案-备案维护")
|
||||
@PutMapping(value = "/batchRecord")
|
||||
public Result<?> batchRecord(@RequestBody List<OtaBaSjList> recordList) {
|
||||
otaBaSjListService.batchRecord(recordList);
|
||||
@ApiOperation(value = "升级备案-备案维护", notes = "升级备案-备案维护")
|
||||
@PostMapping(value = "/batchRecord")
|
||||
public Result<?> batchRecord(@RequestParam(name = "ids", required = true) String ids,
|
||||
@RequestParam(name = "bazt", required = true) String bazt,
|
||||
@RequestParam(name = "batjsj", required = true) String batjsj,
|
||||
@RequestParam(name = "bz", required = true) String bz,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
otaBaSjListService.batchRecord(ids, bazt, batjsj, bz, cut);
|
||||
return Result.OK("备案维护成功!");
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -64,5 +64,5 @@ public interface IOtaBaCxListService extends IService<OtaBaCxList> {
|
||||
* 备案维护
|
||||
*
|
||||
*/
|
||||
void batchRecord(List<OtaBaCxList> recordList);
|
||||
void batchRecord(String ids, String bazt, String batjsj, String bz, String cut);
|
||||
}
|
||||
|
||||
+1
-1
@@ -64,5 +64,5 @@ public interface IOtaBaSjListService extends IService<OtaBaSjList> {
|
||||
* 备案维护
|
||||
*
|
||||
*/
|
||||
void batchRecord(List<OtaBaSjList> recordList);
|
||||
void batchRecord(String ids, String bazt, String batjsj, String bz, String cut);
|
||||
}
|
||||
|
||||
+9
-7
@@ -7,6 +7,7 @@ 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 com.jero.modules.system.util.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -102,19 +103,20 @@ public class OtaBaCxListServiceImpl extends ServiceImpl<OtaBaCxListMapper, OtaBa
|
||||
* 备案维护
|
||||
*/
|
||||
@Override
|
||||
public void batchRecord(List<OtaBaCxList> recordList) {
|
||||
public void batchRecord(String ids, String bazt, String batjsj, String bz, String cut) {
|
||||
try {
|
||||
if (null != recordList && recordList.size() > 0) {
|
||||
for (OtaBaCxList obc : recordList) {
|
||||
String id = obc.getId();
|
||||
if (StringUtils.isNotEmpty(ids)) {
|
||||
String[] idList = ids.split(",");
|
||||
for (String id : idList) {
|
||||
OtaBaCxList otaBaCxList = this.queryById(id);
|
||||
otaBaCxList.setBatjsj(obc.getBatjsj());
|
||||
otaBaCxList.setBz(obc.getBz());
|
||||
otaBaCxList.setBazt(bazt);
|
||||
otaBaCxList.setBatjsj(sdf.parse(batjsj));
|
||||
otaBaCxList.setBz(bz);
|
||||
this.saveOrUpdate(otaBaCxList);
|
||||
//添加历史记录数据
|
||||
OtaBaCxLsjl lsjl = new OtaBaCxLsjl();
|
||||
lsjl.setOtaId(id);
|
||||
lsjl.setSjzt(obc.getBz());
|
||||
lsjl.setSjzt(bazt);
|
||||
otaBaCxLsjlService.add(lsjl);
|
||||
}
|
||||
}
|
||||
|
||||
+11
-7
@@ -2,11 +2,14 @@ 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.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 com.jero.modules.system.util.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -102,19 +105,20 @@ public class OtaBaSjListServiceImpl extends ServiceImpl<OtaBaSjListMapper, OtaBa
|
||||
* 备案维护
|
||||
*/
|
||||
@Override
|
||||
public void batchRecord(List<OtaBaSjList> recordList) {
|
||||
public void batchRecord(String ids, String bazt, String batjsj, String bz, String cut) {
|
||||
try {
|
||||
if (null != recordList && recordList.size() > 0) {
|
||||
for (OtaBaSjList obs : recordList) {
|
||||
String id = obs.getId();
|
||||
if (StringUtils.isNotEmpty(ids)) {
|
||||
String[] idList = ids.split(",");
|
||||
for (String id : idList) {
|
||||
OtaBaSjList otaBaSjList = this.queryById(id);
|
||||
otaBaSjList.setBatjsj(obs.getBatjsj());
|
||||
otaBaSjList.setBz(obs.getBz());
|
||||
otaBaSjList.setBazt(bazt);
|
||||
otaBaSjList.setBatjsj(sdf.parse(batjsj));
|
||||
otaBaSjList.setBz(bz);
|
||||
this.saveOrUpdate(otaBaSjList);
|
||||
//添加历史记录数据
|
||||
OtaBaSjLsjl lsjl = new OtaBaSjLsjl();
|
||||
lsjl.setOtaId(id);
|
||||
lsjl.setSjzt(obs.getBz());
|
||||
lsjl.setSjzt(bazt);
|
||||
otaBaSjLsjlService.add(lsjl);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user