Commit 31cdbdd6 authored by tianbo's avatar tianbo

气瓶同步功能

parent f019179b
package com.yeejoin.amos.boot.module.cylinder.flc.biz.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.cylinder.flc.api.dto.CylCylinderFillingCheckDto;
import com.yeejoin.amos.boot.module.cylinder.flc.api.entity.CylCylinderFillingCheck;
import com.yeejoin.amos.boot.module.cylinder.flc.api.mapper.CylCylinderFillingCheckMapper;
import com.yeejoin.amos.boot.module.cylinder.flc.api.service.ICylCylinderFillingCheckService;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.Date;
import java.util.List;
/**
* 液化气体气瓶充装信息-充装后复查服务实现类
*
* @author system_generator
* @date 2022-03-04
*/
@Service
@DS("cyl")
public class CylCylinderFillingCheckServiceImpl extends BaseService<CylCylinderFillingCheckDto, CylCylinderFillingCheck,
CylCylinderFillingCheckMapper> implements ICylCylinderFillingCheckService {
/**
* 分页查询
*/
public Page<CylCylinderFillingCheckDto> queryForCylinderFillingCheckPage(Page<CylCylinderFillingCheckDto> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<CylCylinderFillingCheckDto> queryForCylinderFillingCheckList() {
return this.queryForList("", false);
}
public Double queryIntegirtyByAppId(String appId) {
return this.baseMapper.queryIntegirtyByAppId(appId);
}
public Integer getFillingCountByMonth(String appId, Date time) {
return this.baseMapper.getFillingCountByMonth(appId, time);
}
public Integer getFillingPassedCountByMonth(String appId, Date time) {
return this.baseMapper.getFillingPassedCountByMonth(appId, time);
}
}
\ No newline at end of file
......@@ -16,7 +16,8 @@ import java.util.List;
public class CylSyncServiceImpl {
@Autowired
private CylCylinderFillingCheckServiceImpl sourceFillingCheckServiceImpl;
private CylinderSyncServiceImpl sourceFillingCheckServiceImpl;
@Autowired
private CylinderFillingCheckServiceImpl targetFillingCheckServiceImpl;
......@@ -24,7 +25,7 @@ public class CylSyncServiceImpl {
public Object testSync() {
LambdaQueryWrapper<CylCylinderFillingCheck> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.last(" limit 1");
List<CylCylinderFillingCheck> rList = sourceFillingCheckServiceImpl.list(queryWrapper);
List<CylCylinderFillingCheck> rList = sourceFillingCheckServiceImpl.fillingCheckSync();
if (!ValidationUtil.isEmpty(rList)) {
List<CylinderFillingCheck> tList = Lists.newArrayList();
rList.stream().forEach(e -> {
......
package com.yeejoin.amos.boot.module.cylinder.flc.biz.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.yeejoin.amos.boot.module.cylinder.flc.api.entity.CylCylinderFillingCheck;
import com.yeejoin.amos.boot.module.cylinder.flc.api.mapper.CylCylinderFillingCheckMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 液化气体气瓶同步实现类
*
* @author system_generator
* @date 2022-03-04
*/
@Service
@DS("cyl")
public class CylinderSyncServiceImpl {
@Autowired
private CylCylinderFillingCheckMapper fillingCheckMapper;
public List<CylCylinderFillingCheck> fillingCheckSync() {
return fillingCheckMapper.selectList(null);
}
}
\ No newline at end of file
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