|
|
@@ -452,7 +452,6 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
|
|
|
@Override
|
|
|
public void importData(MultipartFile file, InsPlyIncomeVo insPlyIncomeVo) {
|
|
|
-//InsPlyIncomeExcelDto
|
|
|
List<InsPlyIncome> list = null;
|
|
|
try {
|
|
|
List<InsPlyIncomeExcelDto> dtoList = ExcelEasypoiUtils.importExcel(file, InsPlyIncomeExcelDto.class, 0, 1, 1);
|
|
|
@@ -474,18 +473,30 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @Transactional
|
|
|
public void updateByEntity(InsPlyIncomeVo insPlyIncomeVo) {
|
|
|
InsPlyIncome insPlyIncome = new InsPlyIncome();
|
|
|
BeanUtils.copyProperties(insPlyIncomeVo, insPlyIncome);
|
|
|
baseMapper.updateById(insPlyIncome);
|
|
|
+
|
|
|
+ insPlyIncomeVo.setCrudStatus("2");
|
|
|
+ this.saveLog(insPlyIncomeVo);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
-// @Override
|
|
|
-// public void insertByEntity(InsPlyIncomeVo insPlyIncomeVo) {
|
|
|
+ private void saveLog(InsPlyIncomeVo insPlyIncomeVo) {
|
|
|
+ // 添加记录
|
|
|
+ SettlementDocumentaryLogEntity settlementDocumentaryLogEntity = new SettlementDocumentaryLogEntity();
|
|
|
+ settlementDocumentaryLogEntity.setCrudStatus(insPlyIncomeVo.getCrudStatus());
|
|
|
+ settlementDocumentaryLogEntity.setAmount(insPlyIncomeVo.getOtherFeevalue());
|
|
|
+ settlementDocumentaryLogEntity.setSettlementDocumentaryId(insPlyIncomeVo.getId());
|
|
|
+ settlementDocumentaryLogEntity.setAmountType("2");
|
|
|
+ settlementDocumentaryLogService.save(settlementDocumentaryLogEntity);
|
|
|
+ }
|
|
|
|
|
|
-// }
|
|
|
|
|
|
@Override
|
|
|
+ @Transactional
|
|
|
public HttpResult<InsPlyIncome> insertByEntity(InsPlyIncomeVo insPlyIncomeVo) {
|
|
|
Long id = new SnowFlakeUtil().nextId();
|
|
|
InsPlyIncome insPlyIncome = new InsPlyIncome();
|
|
|
@@ -496,6 +507,10 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
insPlyIncome.setIsNotCar("0");
|
|
|
insPlyIncome.setIsNotDocumentary("1");
|
|
|
baseMapper.insert(insPlyIncome);
|
|
|
+ insPlyIncomeVo.setId(insPlyIncome.getId());
|
|
|
+ insPlyIncomeVo.setCrudStatus("1");
|
|
|
+ this.saveLog(insPlyIncomeVo); //添加日志
|
|
|
+
|
|
|
HashMap<String, Object> params = new HashMap<>();
|
|
|
|
|
|
if(StringUtils.isNotEmpty(insPlyIncomeVo.getIsNotCar())){
|
|
|
@@ -534,13 +549,14 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
params.put("companyId",insPlyIncomeVo.getCompanyId());
|
|
|
}
|
|
|
baseMapper.deleteById(insPlyIncomeVo.getId());
|
|
|
-
|
|
|
+ insPlyIncomeVo.setCrudStatus("3");
|
|
|
+ this.saveLog(insPlyIncomeVo);
|
|
|
List<InsPlyIncome> list = this.baseMapper.NonSettlementQuery(params);
|
|
|
if (!CollectionUtils.isEmpty(list)) {
|
|
|
for (InsPlyIncome item : list) {
|
|
|
return HttpResult.ok(item.getIds());
|
|
|
}
|
|
|
- } else {
|
|
|
+ } else {
|
|
|
return HttpResult.ok(null);
|
|
|
|
|
|
}
|