|
|
@ -6,6 +6,7 @@ import com.dxhy.core.dao.frTask.RecordToQueryDao; |
|
|
|
import com.dxhy.core.enmu.KjkmTaxEnmu; |
|
|
|
import com.dxhy.core.enmu.KjkmTaxEnmu; |
|
|
|
import com.dxhy.core.entity.frJob.FpTaxAmount; |
|
|
|
import com.dxhy.core.entity.frJob.FpTaxAmount; |
|
|
|
import com.dxhy.core.entity.frJob.VoucherRecordQuery; |
|
|
|
import com.dxhy.core.entity.frJob.VoucherRecordQuery; |
|
|
|
|
|
|
|
import org.springframework.scheduling.annotation.Async; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import javax.annotation.Resource; |
|
|
|
import javax.annotation.Resource; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
@ -40,13 +41,27 @@ public class RecordToQueryServiceImpl extends ServiceImpl<RecordToQueryDao, Vouc |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void getDataForFr() { |
|
|
|
public void getDataForFr() { |
|
|
|
//清洗sap错误税率
|
|
|
|
//清洗sap错误税率
|
|
|
|
boolean b = voucherRecordItemService.refreshTax(); |
|
|
|
boolean flag = voucherRecordItemService.refreshTax(); |
|
|
|
if (!b){ |
|
|
|
if (!flag){ |
|
|
|
throw new RuntimeException("刷新sap传送数据税率失败"); |
|
|
|
throw new RuntimeException("刷新sap传送数据税率失败"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//开始插入主数据信息
|
|
|
|
|
|
|
|
boolean flag1 = this.insertJxDataToQuery(); |
|
|
|
|
|
|
|
if (flag1){ |
|
|
|
|
|
|
|
queryDetailDataService.insertJxDataToQueryDetail(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
boolean flag2 = this.insertXxDataToQuery(); |
|
|
|
|
|
|
|
if (flag2){ |
|
|
|
|
|
|
|
queryDetailDataService.insertJxDataToQueryDetail(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
boolean flag3 = this.insertZyDataToQuery(); |
|
|
|
|
|
|
|
if (flag3){ |
|
|
|
|
|
|
|
queryDetailDataService.insertZyDataToQueryDetail(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.insertOutDataToQuery(); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Async |
|
|
|
public boolean insertJxDataToQuery() { |
|
|
|
public boolean insertJxDataToQuery() { |
|
|
|
|
|
|
|
|
|
|
|
boolean flag = false; |
|
|
|
boolean flag = false; |
|
|
@ -82,7 +97,9 @@ public class RecordToQueryServiceImpl extends ServiceImpl<RecordToQueryDao, Vouc |
|
|
|
return flag; |
|
|
|
return flag; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void insertXxDataToQuery() { |
|
|
|
@Async |
|
|
|
|
|
|
|
public boolean insertXxDataToQuery() { |
|
|
|
|
|
|
|
boolean flag = false; |
|
|
|
//1.获取时间
|
|
|
|
//1.获取时间
|
|
|
|
String[] time = getTime(XXZZS); |
|
|
|
String[] time = getTime(XXZZS); |
|
|
|
|
|
|
|
|
|
|
@ -113,11 +130,14 @@ public class RecordToQueryServiceImpl extends ServiceImpl<RecordToQueryDao, Vouc |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//8.保存或更新
|
|
|
|
//8.保存或更新
|
|
|
|
this.saveOrUpdateBatch(voucherRecordQuerys); |
|
|
|
flag = this.saveOrUpdateBatch(voucherRecordQuerys); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return flag; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void insertZyDataToQuery() { |
|
|
|
@Async |
|
|
|
|
|
|
|
public boolean insertZyDataToQuery() { |
|
|
|
|
|
|
|
boolean flag = false; |
|
|
|
//1.获取时间
|
|
|
|
//1.获取时间
|
|
|
|
String[] time = getTime(ZYYWSR); |
|
|
|
String[] time = getTime(ZYYWSR); |
|
|
|
|
|
|
|
|
|
|
@ -142,8 +162,9 @@ public class RecordToQueryServiceImpl extends ServiceImpl<RecordToQueryDao, Vouc |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//6.保存或更新
|
|
|
|
//6.保存或更新
|
|
|
|
this.saveOrUpdateBatch(voucherRecordQuerys); |
|
|
|
flag = this.saveOrUpdateBatch(voucherRecordQuerys); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return flag; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|