Commit 2a99e04d authored by chase's avatar chase

fix bug

parent a3b88a86
......@@ -342,17 +342,15 @@ public class ReportServiceImpl extends BaseService {
andStartDateLessThanOrEqualTo(queryDate).andEndDateGreaterThanOrEqualTo(queryDate).
andStatusEqualTo(0);
List<RevenueTypeMapping> mappingList = revenueTypeMappingMapper.selectByExample(mappingExample);
//先清除数据
InvoiceRecord delRecord = new InvoiceRecord();
delRecord.setRevenueCofId(null);
if(!isMergeManualData){
delRecord.setModifyRevenueCofId(null);
}
InvoiceRecordExample delExample = new InvoiceRecordExample();
delExample.createCriteria().andProjectIdEqualTo(projectId)
.andProjectIdEqualTo(projectId).
delExample.createCriteria().andProjectIdEqualTo(projectId).
andPeriodEqualTo(Integer.valueOf(queryDate.replace("-", "")));
invoiceRecordMapper.deleteByExample(delExample);
if(isMergeManualData){
invoiceRecordMapper.clearRevenueCof(true,false,delExample);
}else{
invoiceRecordMapper.clearRevenueCof(true,true,delExample);
}
Map<String, Long> map = new HashMap<>();
for (RevenueTypeMapping mapping : mappingList) {
if (!map.containsKey(mapping.getContent())) {
......
......@@ -129,4 +129,6 @@ public interface InvoiceRecordMapper extends MyVatMapper {
List<String> queryBillTypeGroupBy(@Param("projectId") String projectId,
@Param("period") Integer period);
int clearRevenueCof(@Param("clearRevenue") boolean clearRevenue, @Param("clearModifyRevenue") boolean clearModifyRevenue,@Param("example") InvoiceRecordExample example);
}
\ 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