Commit 09814895 by yinyong

财务审核-发票状态回退,用户借还单发票附件重新提交更改

parent 40a0b238
......@@ -11,7 +11,7 @@ public class CostStatusSyncConfiguration {
// 扫描主体列表时间间隔:(秒)
private static final int TIME = 3;
private static final int TIME = 86400;
// JobDetail 定义要执行的 job
@Bean
......@@ -25,7 +25,7 @@ public class CostStatusSyncConfiguration {
@Bean
public Trigger costCompanySyncJobTrigger(){
SimpleScheduleBuilder simpleScheduleBuilder = SimpleScheduleBuilder.simpleSchedule()
.withIntervalInHours(TIME).repeatForever();
.withIntervalInSeconds(TIME).repeatForever();
return TriggerBuilder.newTrigger().forJob(costCompanySyncJobJobDetail())
.withIdentity("costStatusSuncTrigger")
.withSchedule(simpleScheduleBuilder).build();
......
......@@ -192,14 +192,20 @@ public class CostCheckLendController {
@PostMapping(value = "invoice")
public Map<String,Object> invoice (HttpServletRequest request, HttpServletResponse response) {
AxiosUtil.setCors(response, request);
Map<String, Object> map = null;
CostDomain costDomain = new CostDomain();
String costNo = request.getParameter("costNo");
String updateuserid = request.getParameter("updateuserid");
costDomain.setHasInvoice(1);
int invoiceValue = Integer.parseInt(request.getParameter("hasInvoice"));
costDomain.setHasInvoice(invoiceValue);
costDomain.setCostNo(costNo);
map = costService.upadateCost(costDomain);
costLogService.save(costNo, Integer.valueOf(updateuserid),"确认发票");
if(invoiceValue == 0) {
costLogService.save(costNo, Integer.valueOf(updateuserid),"更改发票状态为:未给");
}else if(invoiceValue == 1) {
costLogService.save(costNo, Integer.valueOf(updateuserid),"更改发票状态为:已给");
}
map.put("success",true);
map.put("msg","确认发票成功!");
return map;
......@@ -492,6 +498,7 @@ public class CostCheckLendController {
costService.upadateCost(supCostDomain);
}
result = "{result:true,msg:\"保存成功\"}";
costLogService.save(costCashiercallbackDomain.getCostNo(), costCashiercallbackDomain.getPayuserid(),"出纳收/付款成功:"+costCashiercallbackDomain.getPaynote());
}else {
result = "{result:false,msg:\"发生错误\"}";
}
......
......@@ -92,6 +92,31 @@ public class CostListController {
}
/**
* 修改发票附件
* @param request
* @param response
* @param file
* @return
*/
@PostMapping("reset/resetInvoice")
public Map<String, Object> resetInvoice(HttpServletRequest request, HttpServletResponse response, @RequestParam("fileSelect") MultipartFile file) {
AxiosUtil.setCors(response,request);
String costNo = request.getParameter("costNo");
CostDomain costDomain = new CostDomain();
costDomain.setCostNo(costNo);
costDomain.setHasInvoice(1);
// 文件上传的路径
String filePath = PathUtil.getBasePath()+PathUtil.getPath("cost/"+costDomain.getCostNo()+"/");
// 调用工具类执行保存,并返回 path
String path = CostFileUtil.upload(file, filePath);
costDomain.setFilePath(path);
Map<String, Object> map = costService.upadateCost(costDomain);
costLogService.save(costNo, costService.getCostDomainByNo(costNo).getCreateUserid(),"修改发票信息");
map.put("success",true);
return map;
}
/**
* 信息修改,带附件
* @param response
* @param request
......
......@@ -48,7 +48,7 @@ public class CostPlanNewController {
if (null != affirm && affirm >= 0) {
result.put("success",true);
result.put("msg","已生成 "+affirm+" 张付款费用单");
result.put("msg","已生成 "+affirm+" 张付款费用单<br>费用列表提交审核");
}else {
result.put("success", false);
result.put("msg", "付款计划不存在或发生其他错误");
......
......@@ -38,6 +38,7 @@ public class CostStatusSyncJob extends QuartzJobBean {
@Override
protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
logger.info("系统自动作废驳回费用单");
List<CostDto> costDtoList = costService.getCostByRejectStatus();
for(CostDto costDto : costDtoList) {
CostDomain costDomain = new CostDomain();
......
......@@ -107,9 +107,9 @@ public class CostExportServiceImpl implements CostExportService {
row.createCell(12).setCellValue(costDto.getPayPlanAmountDto());
row.createCell(13).setCellValue(costDto.getPayDicDto());
if(costDto.getHasInvoice() == 1) {
row.createCell(18).setCellValue("");
row.createCell(18).setCellValue("已给");
}else {
row.createCell(18).setCellValue("");
row.createCell(18).setCellValue("未给");
}
}
}
......
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