|
|
@ -140,6 +140,7 @@ public class ScmCollectionRebateDistributionService extends MybatisBaseService<S |
|
|
|
apply(StringUtils.isNotBlank(subitDateEnd), "date_format (sd.subitDate,'%Y-%m-%d') <= date_format('" + subitDateEnd + "','%Y-%m-%d')" |
|
|
|
); |
|
|
|
qw.groupBy("sd.sid"); |
|
|
|
qw.orderByDesc("sd.createTime"); |
|
|
|
IPage<ScmCollectionRebateDistribution> page = PagerUtil.queryToPage(pq); |
|
|
|
IPage<ScmCollectionRebateDistributionVo> pagging = baseMapper.selectPageVo(page, qw); |
|
|
|
PagerVo<ScmCollectionRebateDistributionVo> p = PagerUtil.pageToVo(pagging, null); |
|
|
@ -192,6 +193,20 @@ public class ScmCollectionRebateDistributionService extends MybatisBaseService<S |
|
|
|
} |
|
|
|
return rb.success().setMsg("修改成功"); |
|
|
|
} else if ("1".equals(state)) { |
|
|
|
String sid = this.insertByDto(dto); |
|
|
|
if (scmCollectionRebateVehs != null) { |
|
|
|
for (ScmCollectionRebateDistributionVehDto scmCollectionRebateVehDto : scmCollectionRebateVehs) { |
|
|
|
scmCollectionRebateVehDto.setMainSid(sid); |
|
|
|
scmCollectionRebateDistributionVehService.insertByDto(scmCollectionRebateVehDto); |
|
|
|
} |
|
|
|
} |
|
|
|
for (ScmCollectionRebateDistributionFile url : urls) { |
|
|
|
String filePath = url.getUrl().replace(fileUploadComponent.getUrlPrefix(), ""); |
|
|
|
ScmFile scmFile = new ScmFile(); |
|
|
|
scmFile.setFilePath(filePath); |
|
|
|
scmFile.setLinkSid(sid); |
|
|
|
scmFileService.save(scmFile); |
|
|
|
} |
|
|
|
baseMapper.updateStateAndSubmitDate(dtoSid, state); |
|
|
|
return rb.success().setMsg("提交成功"); |
|
|
|
} else if ("2".equals(state)) { |
|
|
|