Commit fc1d94b8 authored by 刘凡's avatar 刘凡

新增:气瓶信息同步方法

parent a5b898f0
package com.yeejoin.amos.api.openapi.face.service; package com.yeejoin.amos.api.openapi.face.service;
import com.yeejoin.amos.api.openapi.face.model.*;
import com.yeejoin.amos.boot.module.cylinder.flc.api.dto.*; import com.yeejoin.amos.boot.module.cylinder.flc.api.dto.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -69,7 +70,7 @@ public class SyncCylinderDataService ...@@ -69,7 +70,7 @@ public class SyncCylinderDataService
private CylinderInspectionMapper cylinderInspectionMapper; private CylinderInspectionMapper cylinderInspectionMapper;
@DS("tzs") @DS("tzs")
public void syncCylinderUnit(List<CylinderUnitDto> cylinderUnitDto) { public void syncCylinderUnit(List<TmCylinderUnitModel> cylinderUnitDto) {
// List<CylinderUnit> cylinderUnits = Bean.toModels(cylinderUnitDto,CylinderUnit.class); // List<CylinderUnit> cylinderUnits = Bean.toModels(cylinderUnitDto,CylinderUnit.class);
// LambdaQueryWrapper<CylinderUnit> wrapper = new LambdaQueryWrapper<>(); // LambdaQueryWrapper<CylinderUnit> wrapper = new LambdaQueryWrapper<>();
// List<CylinderUnit> cylinderUnitList = this.getBaseMapper().selectList(wrapper); // List<CylinderUnit> cylinderUnitList = this.getBaseMapper().selectList(wrapper);
...@@ -77,26 +78,26 @@ public class SyncCylinderDataService ...@@ -77,26 +78,26 @@ public class SyncCylinderDataService
cylinderUnitMapper.saveOrUpdateBatch(cylinderUnitList); cylinderUnitMapper.saveOrUpdateBatch(cylinderUnitList);
} }
public void syncCylinderInfo(final List<CylinderInfoDto> cylinderInfoDto) { public void syncCylinderInfo(final List<TmCylinderInfoModel> cylinderInfoDto) {
List<CylinderInfo> cylinderUnitList = Bean.toModels(cylinderInfoDto,CylinderInfo.class); List<CylinderInfo> cylinderUnitList = Bean.toModels(cylinderInfoDto,CylinderInfo.class);
cylinderInfoMapper.saveOrUpdateBatch(cylinderUnitList); cylinderInfoMapper.saveOrUpdateBatch(cylinderUnitList);
} }
public void syncCylinderFillingExamine(List<CylinderFillingExamineDto> cylinderFillingExamineDto) { public void syncCylinderFillingExamine(List<TmCylinderFillingExamineModel> cylinderFillingExamineDto) {
} }
public void syncCylinderFillingRecord(List<CylinderFillingRecordDto> cylinderFillingRecordDtos) { public void syncCylinderFillingRecord(List<TmCylinderFillingRecordModel> cylinderFillingRecordDtos) {
} }
public void syncCylinderInspection(List<CylinderInspectionDto> cylinderInspectionDto) { public void syncCylinderInspection(List<TmCylinderInspectionModel> cylinderInspectionDto) {
} }
public void syncCylinderTag(List<CylinderTagsDto> cylinderTagsDtos) { public void syncCylinderTag(List<TmCylinderTagsModel> cylinderTagsDtos) {
} }
public void syncCylinderFillingBefore(List<CylinderFillingDto> cylinderFillingDtos) { public void syncCylinderFillingBefore(List<TmCylinderFillingModel> cylinderFillingDtos) {
} }
public void syncCylinderFillingAfter(List<CylinderFillingCheckDto> cylinderFillingCheckDtos) { public void syncCylinderFillingAfter(List<TmCylinderFillingCheckModel> cylinderFillingCheckDtos) {
} }
} }
...@@ -52,8 +52,7 @@ public class TmCylinderFillingCheckService extends BaseService<TmCylinderFilling ...@@ -52,8 +52,7 @@ public class TmCylinderFillingCheckService extends BaseService<TmCylinderFilling
} }
private void syncCylinderFillingAfter(List<TmCylinderFillingCheckModel> model) { private void syncCylinderFillingAfter(List<TmCylinderFillingCheckModel> model) {
List<CylinderFillingCheckDto> cylinderFillingCheckDtos = Bean.toModels(model,CylinderFillingCheckDto.class); syncCylinderDataService.syncCylinderFillingAfter(model);
syncCylinderDataService.syncCylinderFillingAfter(cylinderFillingCheckDtos);
} }
private String getAppId() { private String getAppId() {
......
...@@ -64,7 +64,6 @@ public class TmCylinderFillingExamineService extends BaseService<TmCylinderFilli ...@@ -64,7 +64,6 @@ public class TmCylinderFillingExamineService extends BaseService<TmCylinderFilli
@Transactional(rollbackFor= {Exception.class}) @Transactional(rollbackFor= {Exception.class})
private void syncCylinderFillingExamine(List<TmCylinderFillingExamineModel> model ) { private void syncCylinderFillingExamine(List<TmCylinderFillingExamineModel> model ) {
List<CylinderFillingExamineDto> cylinderFillingExamineDto = Bean.toModels(model, CylinderFillingExamineDto.class); syncCylinderDataService.syncCylinderFillingExamine(model);
syncCylinderDataService.syncCylinderFillingExamine(cylinderFillingExamineDto);
} }
} }
...@@ -70,8 +70,7 @@ public class TmCylinderFillingRecordService extends BaseService<TmCylinderFillin ...@@ -70,8 +70,7 @@ public class TmCylinderFillingRecordService extends BaseService<TmCylinderFillin
} }
private void syncCylinderFilling(List<TmCylinderFillingRecordModel> model) { private void syncCylinderFilling(List<TmCylinderFillingRecordModel> model) {
List<CylinderFillingRecordDto> cylinderFillingRecordDtos = Bean.toModels(model, CylinderFillingRecordDto.class); syncCylinderDataService.syncCylinderFillingRecord(model);
syncCylinderDataService.syncCylinderFillingRecord(cylinderFillingRecordDtos);
} }
private String getAppId() { private String getAppId() {
......
...@@ -56,8 +56,7 @@ public class TmCylinderFillingService extends BaseService<TmCylinderFillingModel ...@@ -56,8 +56,7 @@ public class TmCylinderFillingService extends BaseService<TmCylinderFillingModel
} }
private void syncCylinderFillingBefore(List<TmCylinderFillingModel> model) { private void syncCylinderFillingBefore(List<TmCylinderFillingModel> model) {
List<CylinderFillingDto> cylinderFillingDtos = Bean.toModels(model,CylinderFillingDto.class); syncCylinderDataService.syncCylinderFillingBefore(model);
syncCylinderDataService.syncCylinderFillingBefore(cylinderFillingDtos);
} }
......
...@@ -73,8 +73,7 @@ public class TmCylinderInfoService extends BaseService<TmCylinderInfoModel, TmCy ...@@ -73,8 +73,7 @@ public class TmCylinderInfoService extends BaseService<TmCylinderInfoModel, TmCy
} }
@Transactional(rollbackFor= {Exception.class}) @Transactional(rollbackFor= {Exception.class})
private void syncCylinderInfo(List<TmCylinderInfoModel> model ) { private void syncCylinderInfo(List<TmCylinderInfoModel> model ) {
List<CylinderInfoDto> cylinderInfoDto = Bean.toModels(model,CylinderInfoDto.class); syncCylinderDataService.syncCylinderInfo(model);
syncCylinderDataService.syncCylinderInfo(cylinderInfoDto);
} }
private String getAppId() { private String getAppId() {
String tokenKey = Redis.genKey(Constant.TOKEN_PREFIX,RequestContext.getToken()); String tokenKey = Redis.genKey(Constant.TOKEN_PREFIX,RequestContext.getToken());
......
...@@ -53,8 +53,7 @@ public class TmCylinderInspectionService extends BaseService<TmCylinderInspectio ...@@ -53,8 +53,7 @@ public class TmCylinderInspectionService extends BaseService<TmCylinderInspectio
} }
private void syncCylinderInspectionModel(List<TmCylinderInspectionModel> model) { private void syncCylinderInspectionModel(List<TmCylinderInspectionModel> model) {
List<CylinderInspectionDto> cylinderUnitDto = Bean.toModels(model,CylinderInspectionDto.class); syncCylinderDataService.syncCylinderInspection(model);
syncCylinderDataService.syncCylinderInspection(cylinderUnitDto);
} }
private String getAppId() { private String getAppId() {
......
...@@ -55,8 +55,7 @@ public class TmCylinderTagsService extends BaseService<TmCylinderTagsModel, TmCy ...@@ -55,8 +55,7 @@ public class TmCylinderTagsService extends BaseService<TmCylinderTagsModel, TmCy
} }
private void syncCylinderTag(List<TmCylinderTagsModel> model) { private void syncCylinderTag(List<TmCylinderTagsModel> model) {
List<CylinderTagsDto> cylinderTagsDtos = Bean.toModels(model,CylinderTagsDto.class); syncCylinderDataService.syncCylinderTag(model);
syncCylinderDataService.syncCylinderTag(cylinderTagsDtos);
} }
private String getAppId() { private String getAppId() {
......
...@@ -53,8 +53,7 @@ public class TmCylinderUnitService extends BaseService<TmCylinderUnitModel, TmCy ...@@ -53,8 +53,7 @@ public class TmCylinderUnitService extends BaseService<TmCylinderUnitModel, TmCy
} }
@Transactional(rollbackFor= {Exception.class}) @Transactional(rollbackFor= {Exception.class})
private void syncCylinderUnitModel(List<TmCylinderUnitModel> model ) { private void syncCylinderUnitModel(List<TmCylinderUnitModel> model ) {
List<CylinderUnitDto> cylinderUnitDto = Bean.toModels(model,CylinderUnitDto.class); syncCylinderDataService.syncCylinderUnit(model);
syncCylinderDataService.syncCylinderUnit(cylinderUnitDto);
} }
private String getAppId() { private String getAppId() {
String tokenKey = Redis.genKey(Constant.TOKEN_PREFIX,RequestContext.getToken()); String tokenKey = Redis.genKey(Constant.TOKEN_PREFIX,RequestContext.getToken());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment