提交 62b48d7b authored 作者: 000516's avatar 000516 提交者: Coding

axmr005结果推送到飞书表格,换月不需要换文档

...@@ -8,6 +8,5 @@ import com.sfa.job.pojo.response.FeishuSheetRecordDto; ...@@ -8,6 +8,5 @@ import com.sfa.job.pojo.response.FeishuSheetRecordDto;
* @describe : * @describe :
*/ */
public interface FeishuSheetRecordDao { public interface FeishuSheetRecordDao {
FeishuSheetRecordDto selectOne(Integer type);
FeishuSheetRecordDto selectOne(Integer type, String createMonth);
} }
...@@ -20,8 +20,8 @@ public class FeishuSheetRecordDaoImpl implements FeishuSheetRecordDao{ ...@@ -20,8 +20,8 @@ public class FeishuSheetRecordDaoImpl implements FeishuSheetRecordDao{
@Autowired @Autowired
private FeishuSheetRecordMapper feishuSheetRecordMapper; private FeishuSheetRecordMapper feishuSheetRecordMapper;
@Override @Override
public FeishuSheetRecordDto selectOne(Integer type, String createMonth) { public FeishuSheetRecordDto selectOne(Integer type) {
FeishuSheetRecord feishuSheetRecord = feishuSheetRecordMapper.findOne(type, createMonth); FeishuSheetRecord feishuSheetRecord = feishuSheetRecordMapper.findOne(type);
return BeanUtils.transitionDto(feishuSheetRecord, FeishuSheetRecordDto.class); return BeanUtils.transitionDto(feishuSheetRecord, FeishuSheetRecordDto.class);
} }
} }
...@@ -13,7 +13,7 @@ import org.springframework.stereotype.Repository; ...@@ -13,7 +13,7 @@ import org.springframework.stereotype.Repository;
*/ */
@Repository @Repository
public interface FeishuSheetRecordMapper extends BaseMapper<FeishuSheetRecord> { public interface FeishuSheetRecordMapper extends BaseMapper<FeishuSheetRecord> {
FeishuSheetRecord findOne(@Param("type") Integer type,@Param("createMonth") String createMonth); FeishuSheetRecord findOne(@Param("type") Integer type);
} }
......
...@@ -33,7 +33,10 @@ public class ErpAxmr005ServiceImpl implements ErpAxmr005Service { ...@@ -33,7 +33,10 @@ public class ErpAxmr005ServiceImpl implements ErpAxmr005Service {
@Override @Override
public void axmr005ZQToFS(Date debitDate,Integer type) { public void axmr005ZQToFS(Date debitDate,Integer type) {
List<Object> zhanquDataset = erpAxmr005ShippingDetailsDao.getZhanquDataset(debitDate); List<Object> zhanquDataset = erpAxmr005ShippingDetailsDao.getZhanquDataset(debitDate);
FeishuSheetRecordDto recordDto = feishuSheetRecordDao.selectOne(type, DateUtils.parseDateToStr(DateUtils.YYYY_MM, debitDate)); if (zhanquDataset.isEmpty()){
return;
}
FeishuSheetRecordDto recordDto = feishuSheetRecordDao.selectOne(type);
/** /**
* 将结果推送到飞书表格,每次推100条 * 将结果推送到飞书表格,每次推100条
......
...@@ -19,6 +19,6 @@ ...@@ -19,6 +19,6 @@
<select id="findOne" resultMap="BaseResultMap"> <select id="findOne" resultMap="BaseResultMap">
select <include refid="Base_Column_List"/> select <include refid="Base_Column_List"/>
from feishu_sheet_record where type = #{type} and create_month = #{createMonth} from feishu_sheet_record where type = #{type}
</select> </select>
</mapper> </mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论