|
@@ -11,12 +11,16 @@ import cn.ezhizao.project.business.company.domain.BizCompany;
|
|
|
import cn.ezhizao.project.business.company.service.IBizCompanyService;
|
|
|
import cn.ezhizao.project.business.deduction.domain.BizDeduction;
|
|
|
import cn.ezhizao.project.business.deduction.service.IBizDeductionService;
|
|
|
+import cn.ezhizao.project.business.entrust.domain.BizEntrust;
|
|
|
+import cn.ezhizao.project.business.entrust.service.IBizEntrustService;
|
|
|
import cn.ezhizao.project.business.finance.IndividualIncomeTax.domain.BizFinancialIndividualIncomeTaxDetail;
|
|
|
import cn.ezhizao.project.business.finance.IndividualIncomeTaxIsZero.domain.BizFinancialIndividualIncomeTaxDetailIsZero;
|
|
|
import cn.ezhizao.project.business.finance.IndividualIncomeTaxIsZero.domain.BizFinancialIndividualIncomeTaxIsZero;
|
|
|
import cn.ezhizao.project.business.finance.IndividualIncomeTaxIsZero.service.IBizFinancialIndividualIncomeTaxDetailIsZeroService;
|
|
|
import cn.ezhizao.project.business.financialBase.domain.BizFinancialMerge;
|
|
|
import cn.ezhizao.project.business.financialBase.service.IBizFinancialMergeService;
|
|
|
+import cn.ezhizao.project.business.history.domain.BizHistory;
|
|
|
+import cn.ezhizao.project.business.history.service.IBizHistoryService;
|
|
|
import cn.ezhizao.project.business.reportTaxIsZero.domain.BizFinancialReportTaxDetail;
|
|
|
import cn.ezhizao.project.business.reportTaxIsZero.domain.BizFinancialReportTax;
|
|
|
import cn.ezhizao.project.business.reportTaxIsZero.domain.BizFinancialReportTaxDetailReport;
|
|
@@ -27,6 +31,7 @@ import cn.ezhizao.project.system.domain.SysFileStorage;
|
|
|
import cn.ezhizao.project.system.domain.SysUser;
|
|
|
import cn.ezhizao.project.system.mapper.SysUserMapper;
|
|
|
import cn.ezhizao.project.system.service.ISysFileStorageService;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
@@ -56,7 +61,8 @@ public class BizFinancialReportTaxController extends BaseController {
|
|
|
IBizFinancialIndividualIncomeTaxDetailIsZeroService financialIndividualIncomeTaxDetailService;
|
|
|
@Resource
|
|
|
IBizFinancialReportTaxDetailReportService financialReportTaxDetailReportService;
|
|
|
-
|
|
|
+ @Resource
|
|
|
+ private IBizHistoryService bizHistoryService;
|
|
|
@Resource
|
|
|
private SysUserMapper sysUserMapper;
|
|
|
@Resource
|
|
@@ -65,7 +71,8 @@ public class BizFinancialReportTaxController extends BaseController {
|
|
|
IBizDeductionService deductionService;
|
|
|
@Resource
|
|
|
IBizCompanyService companyService;
|
|
|
-
|
|
|
+ @Resource
|
|
|
+ private IBizEntrustService bizEntrustService;
|
|
|
@ApiOperation(value = "查询FinancialReceiveTicket", notes = "根据id查询Channel")
|
|
|
@GetMapping("/getById/{id}")
|
|
|
@ResponseBody
|
|
@@ -104,7 +111,14 @@ public class BizFinancialReportTaxController extends BaseController {
|
|
|
if (detail==null ) {
|
|
|
return error("当前月未找到数据");
|
|
|
}
|
|
|
-
|
|
|
+ Long fatherId = detail.getFinancialReportTaxId();
|
|
|
+ Long workOrderId = financialReportTaxService.getById(fatherId).getWorkOrderId();
|
|
|
+ String s3 = year +"-"+ month+ "-01";
|
|
|
+ BizEntrust one = bizEntrustService.getOne(new LambdaQueryWrapper<BizEntrust>()
|
|
|
+ .eq(BizEntrust::getWorkOrderId, workOrderId)
|
|
|
+ .eq(BizEntrust::getDeleted, 0)
|
|
|
+ .eq(BizEntrust::getCurrentMonth, s3 ));
|
|
|
+ detail.setEntrust(one);
|
|
|
return success(detail);
|
|
|
}
|
|
|
|
|
@@ -112,6 +126,7 @@ public class BizFinancialReportTaxController extends BaseController {
|
|
|
@PostMapping("/saveDetail")
|
|
|
@PreAuthorize("@ss.hasPermi('business:financialReportTax:saveDetail')")
|
|
|
@Log(title = "报税零申报", businessType = BusinessType.UPDATE)
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
@ResponseBody
|
|
|
public AjaxResult saveDetail(@RequestBody BizFinancialReportTaxDetail detail) {
|
|
|
detail.setVerifierId(getUserId());
|
|
@@ -142,7 +157,14 @@ public class BizFinancialReportTaxController extends BaseController {
|
|
|
l.setMasterId(detail.getId());
|
|
|
l.setMasterTableName("biz_financial_report_tax_detail");
|
|
|
});
|
|
|
-
|
|
|
+ //零申报
|
|
|
+ BizHistory bizHistory = new BizHistory();
|
|
|
+ bizHistory.setTableName("biz_financial_report_tax_zero");
|
|
|
+ bizHistory.setCompanyId(detail.getCompanyId());
|
|
|
+ bizHistory.setBelongPeriod(detail.getYear() + "-" + String.format("%02d", Integer.valueOf(detail.getMonth())) );
|
|
|
+ bizHistory.setEvent("保存");
|
|
|
+ bizHistory.setTenantId(getTenantId());
|
|
|
+ bizHistoryService.save(bizHistory);
|
|
|
bool = bool && (fileStorages.isEmpty() || fileStorageService.saveOrUpdateBatch(fileStorages));
|
|
|
return bool ? success(detail) : error();
|
|
|
}
|
|
@@ -176,10 +198,18 @@ public class BizFinancialReportTaxController extends BaseController {
|
|
|
case 1:
|
|
|
l.setStatusText("进行中");
|
|
|
l.setMakeOut("进行中");
|
|
|
+
|
|
|
break;
|
|
|
case 3:
|
|
|
l.setStatusText("已完成");
|
|
|
l.setMakeOut("已填写");
|
|
|
+ BizHistory bizHistory2 = new BizHistory();
|
|
|
+ bizHistory2.setTableName("biz_financial_report_tax_zero");
|
|
|
+ bizHistory2.setCompanyId(detail.getCompanyId());
|
|
|
+ bizHistory2.setBelongPeriod(detail.getYear() + "-" + String.format("%02d", Integer.valueOf(detail.getMonth())) );
|
|
|
+ bizHistory2.setEvent("保存");
|
|
|
+ bizHistory2.setTenantId(getTenantId());
|
|
|
+ bizHistoryService.save(bizHistory2);
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
|
@@ -507,6 +537,13 @@ public class BizFinancialReportTaxController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ BizHistory bizHistory = new BizHistory();
|
|
|
+ bizHistory.setTableName("biz_financial_report_tax_zero");
|
|
|
+ bizHistory.setCompanyId(detail.getCompanyId());
|
|
|
+ bizHistory.setBelongPeriod(detail.getYear() + "-" + String.format("%02d", Integer.valueOf(detail.getMonth())) );
|
|
|
+ bizHistory.setEvent("退回");
|
|
|
+ bizHistory.setTenantId(getTenantId());
|
|
|
+ bizHistoryService.save(bizHistory);
|
|
|
return financialReportTaxDetailService.updateById(detail) ? success() : error();
|
|
|
}
|
|
|
|