|
|
@ -38,7 +38,11 @@ import com.yxt.anrui.fin.api.finpaymentapply.flow.FinPayGetNodeVo; |
|
|
|
import com.yxt.anrui.fin.api.finpaymentapply.flow.FinPayTaskQuery; |
|
|
|
import com.yxt.anrui.fin.api.finpaymentapply.flow.SubmitFinPayDto; |
|
|
|
import com.yxt.anrui.fin.api.finpaymentapplydetails.AppFinPaymentapplyDetailVo; |
|
|
|
import com.yxt.anrui.fin.api.finpaymentapplydetails.FinPaymentapplyDetailDto; |
|
|
|
import com.yxt.anrui.fin.api.finpaymentapplydetails.FinPaymentapplyDetailVo; |
|
|
|
import com.yxt.anrui.fin.api.finpaymentapplyvehicle.AppFinPaymentapplyVehicleVo; |
|
|
|
import com.yxt.anrui.fin.api.finpaymentapplyvehicle.FinPaymentapplyVehicleDto; |
|
|
|
import com.yxt.anrui.fin.api.finpaymentapplyvehicle.FinPaymentapplyVehicleVo; |
|
|
|
import com.yxt.anrui.fin.api.finpaymentrecord.FinPaymentrecordDto; |
|
|
|
import com.yxt.anrui.fin.biz.finpaymentapplydetails.FinPaymentapplyDetailsService; |
|
|
|
import com.yxt.anrui.fin.biz.finpaymentapplyvehicle.FinPaymentapplyVehicleService; |
|
|
@ -157,6 +161,12 @@ public class FinPaymentapplyService extends MybatisBaseService<FinPaymentapplyMa |
|
|
|
String billNo = getApplyCode(dto); |
|
|
|
finPaymentapply.setBillNo(billNo); |
|
|
|
baseMapper.insert(finPaymentapply); |
|
|
|
List<FinPaymentapplyDetailDto> detailsList = dto.getDetailsList(); |
|
|
|
finPaymentapplyDetailsService.saveDetailsList(detailsList, finPaymentapply.getSid()); |
|
|
|
if ("1".equals(dto.getIsVeh())) { |
|
|
|
List<FinPaymentapplyVehicleDto> vehicleDtoList = dto.getVehicleList(); |
|
|
|
finPaymentapplyVehicleService.saveVehicleList(vehicleDtoList, finPaymentapply.getSid()); |
|
|
|
} |
|
|
|
dtoSid = finPaymentapply.getSid(); |
|
|
|
} else { |
|
|
|
FinPaymentapply finPaymentapply = fetchBySid(dtoSid); |
|
|
@ -165,6 +175,14 @@ public class FinPaymentapplyService extends MybatisBaseService<FinPaymentapplyMa |
|
|
|
} |
|
|
|
BeanUtil.copyProperties(dto, finPaymentapply); |
|
|
|
baseMapper.updateById(finPaymentapply); |
|
|
|
List<FinPaymentapplyDetailDto> detailsList = dto.getDetailsList(); |
|
|
|
finPaymentapplyDetailsService.saveDetailsList(detailsList, finPaymentapply.getSid()); |
|
|
|
if ("1".equals(dto.getIsVeh())) { |
|
|
|
List<FinPaymentapplyVehicleDto> vehicleDtoList = dto.getVehicleList(); |
|
|
|
finPaymentapplyVehicleService.saveVehicleList(vehicleDtoList, finPaymentapply.getSid()); |
|
|
|
} else { |
|
|
|
finPaymentapplyVehicleService.deleteVehicle(dtoSid); |
|
|
|
} |
|
|
|
} |
|
|
|
return rb.success().setData(dtoSid); |
|
|
|
} |
|
|
@ -191,6 +209,10 @@ public class FinPaymentapplyService extends MybatisBaseService<FinPaymentapplyMa |
|
|
|
|
|
|
|
public FinPaymentapplyDetailsVo fetchDetailsVoBySid(String sid) { |
|
|
|
FinPaymentapplyDetailsVo vo = baseMapper.fetchDetailsVoBySid(sid); |
|
|
|
List<FinPaymentapplyDetailVo> detailsList = finPaymentapplyDetailsService.getDetails(sid); |
|
|
|
List<FinPaymentapplyVehicleVo> vehicleList = finPaymentapplyVehicleService.getVehicleList(sid); |
|
|
|
vo.setDetailsList(detailsList); |
|
|
|
vo.setVehicleList(vehicleList); |
|
|
|
return vo; |
|
|
|
} |
|
|
|
|
|
|
@ -232,9 +254,9 @@ public class FinPaymentapplyService extends MybatisBaseService<FinPaymentapplyMa |
|
|
|
BusinessVariables bv = new BusinessVariables(); |
|
|
|
//流程中的参数赋值
|
|
|
|
Map<String, Object> variables = new HashMap<>(); |
|
|
|
Map<String,Object> appMap = new HashMap<>(); |
|
|
|
appMap.put("sid",businessSid); |
|
|
|
variables.put("app",appMap); |
|
|
|
Map<String, Object> appMap = new HashMap<>(); |
|
|
|
appMap.put("sid", businessSid); |
|
|
|
variables.put("app", appMap); |
|
|
|
//用户的部门全路径sid
|
|
|
|
bv.setOrgSidPath(orgSidPath); |
|
|
|
//业务sid
|
|
|
@ -376,7 +398,7 @@ public class FinPaymentapplyService extends MybatisBaseService<FinPaymentapplyMa |
|
|
|
finPaymentrecordDto.setReceiveCompany(finPaymentapply.getReceiveCompany()); |
|
|
|
finPaymentrecordDto.setReceiveBankAccount(finPaymentapply.getReceiveBankAccount()); |
|
|
|
finPaymentrecordService.saveDto(finPaymentrecordDto); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
//极光推送
|
|
|
|
UpdateFlowFieldVo ufVo = resultBean.getData(); |
|
|
|
finPaymentapply = fetchBySid(bv.getBusinessSid()); |
|
|
@ -569,6 +591,11 @@ public class FinPaymentapplyService extends MybatisBaseService<FinPaymentapplyMa |
|
|
|
return rb.setMsg("删除的数据中包含已经提交审批的数据,删除失败"); |
|
|
|
} |
|
|
|
delBySids(sids); |
|
|
|
List<String> sidsList = Arrays.asList(sids); |
|
|
|
for (String s : sidsList) { |
|
|
|
finPaymentapplyDetailsService.deleteByApplySid(s); |
|
|
|
finPaymentapplyVehicleService.deleteVehicle(s); |
|
|
|
} |
|
|
|
return rb.success().setMsg("删除成功"); |
|
|
|
} |
|
|
|
|
|
|
|