|
@@ -82,6 +82,9 @@ public class ReplacementInstrumentActivityController extends BaseController {
|
|
|
@PreAuthorize("@pcs.hasPermissions('replacementInstrumentActivity/update')")
|
|
|
public HttpResponseResult<ReplacementInstrumentActivity> update(ReplacementInstrumentActivity replacementInstrumentActivity) {
|
|
|
ReplacementInstrumentActivity oldReplacementInstrumentActivity = replacementInstrumentActivityDao.getLock(replacementInstrumentActivity.getId());
|
|
|
+ if (!oldReplacementInstrumentActivity.getPayStatus().equals(0)) {
|
|
|
+ return failed("支付中、已支付的乐器置换,不能修改");
|
|
|
+ }
|
|
|
if (oldReplacementInstrumentActivity.getInstrumentsId().equals(replacementInstrumentActivity.getInstrumentsId())) {
|
|
|
return succeed();
|
|
|
}
|
|
@@ -115,7 +118,7 @@ public class ReplacementInstrumentActivityController extends BaseController {
|
|
|
queryInfo.setRows(99999);
|
|
|
PageInfo<ReplacementInstrumentActivityStatDto> pageList = replacementInstrumentActivityService.getPageList(queryInfo);
|
|
|
|
|
|
- if (pageList.getTotal() <=0) {
|
|
|
+ if (pageList.getTotal() <= 0) {
|
|
|
throw new BizException("没有可导出的记录");
|
|
|
}
|
|
|
|
|
@@ -123,7 +126,7 @@ public class ReplacementInstrumentActivityController extends BaseController {
|
|
|
HSSFWorkbook workbook = null;
|
|
|
try {
|
|
|
String[] header = {"合作单位编号", "合作单位", "学员编号", "学员姓名", "联系电话", "声部", "品牌", "型号"};
|
|
|
- String[] body = {"cooperationOrganId", "cooperationOrganName","userId", "userName", "mobileNo", "subjectName", "brand", "specification"};
|
|
|
+ String[] body = {"cooperationOrganId", "cooperationOrganName", "userId", "userName", "mobileNo", "subjectName", "brand", "specification"};
|
|
|
workbook = POIUtil.exportExcel(header, body, pageList.getRows());
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=replacement-" + DateUtil.getDate(new Date()) + ".xls");
|