记得上下班打卡 | git大法好,push需谨慎

Commit de716bb8 authored by 胡佳晨's avatar 胡佳晨

修改 场地审核演出相关

parent 6a7bb5cc
......@@ -100,7 +100,7 @@ public class PerformancePartnerVo implements Serializable, Cloneable {
@ApiModelProperty(value = "审核状态", hidden = true)
private Integer auditStatus;
@ApiModelProperty(value = "场地审核状态 [0-待提交|1-待审核|2-已拒绝|3-审核完成]", hidden = true)
@ApiModelProperty(value = "场地审核状态 [0-审核完成|1-待审核|2-已拒绝]", hidden = true)
private Integer fieldAuditStatus;
@ApiModelProperty(value = "审核状态", hidden = true)
......
......@@ -124,6 +124,8 @@ public class KylinPerformanceVo {
private Integer auditStatus;
private String rejectTxt;
private String merchantId;
@ApiModelProperty(value = "场地审核状态 [0-审核完成|1-待审核|2-已拒绝]", hidden = true)
private Integer fieldAuditStatus;
public void setPerformance(KylinPerformances performance) {
this.mid = performance.getMid();
......@@ -188,6 +190,7 @@ public class KylinPerformanceVo {
this.isRefundVoucher = performanceStatus.getIsRefundVoucher();
this.isRefundExpress = performanceStatus.getIsRefundExpress();
this.auditStatus = performanceStatus.getAuditStatus();
this.fieldAuditStatus = performanceStatus.getFieldAuditStatus();
this.isBackPaperTicket = performanceStatus.getIsBackPaperTicket();
}
......
......@@ -124,6 +124,9 @@ public class KylinPerformanceMisVo implements Cloneable{
@ApiModelProperty(value = "购票须知 Id 数组")
private List<String> noticeIds;
@ApiModelProperty(value = "场地审核状态 [0-审核完成|1-待审核|2-已拒绝]", hidden = true)
private Integer fieldAuditStatus;
//场次数据
@ApiModelProperty(value = "场次数据")
private List<TicketTimesTicketCreatePartnerVo> ticketTimes;
......
......@@ -147,6 +147,14 @@ public interface IKylinPerformancesPartnerService {
*/
ResponseDto<PageInfo<PerformancePartnerListDao>> getList(PerformancePartnerListParam performancePartnerListParam);
/**
* 场地待审核演出列表
*
* @param performancePartnerListParam 相关参数
* @return 分页 msql 数据
*/
ResponseDto<PageInfo<PerformancePartnerListDao>> getListFields(PerformancePartnerListParam performancePartnerListParam);
/**
* 演出撤回
......@@ -156,5 +164,13 @@ public interface IKylinPerformancesPartnerService {
*/
ResponseDto<String> withdraw(String performancesId);
/**
* 场地审核演出
*
* @param performancesId 演出id
* @return String
*/
ResponseDto<String> fieldsAuditPerformance(String performancesId,Integer status);
List<PerformanceOrderStatisticalVo> getPerformanceOrderStatisticalList(String performancesId);
}
......@@ -215,9 +215,9 @@
</div>
<div th:each="dict3 : ${dict2.ExpressModuleList}" class="">
<div class="panel-footer">
<!-- <span>快递编号:</span>-->
<!-- <span th:text="${dict3.productCode}"></span>-->
<!-- <br/>-->
<!-- <span>快递编号:</span>-->
<!-- <span th:text="${dict3.productCode}"></span>-->
<!-- <br/>-->
<span>快递名称:</span>
<span th:text="${dict3.title}"></span>
<br/>
......@@ -296,6 +296,7 @@
var prefix = ctx + "kylin/performances"
const isShow = '[[${kylinPerformanceMisVo.isShow}]]';
const auditStatus = '[[${kylinPerformanceMisVo.auditStatus}]]';
const fieldStatus = '[[${kylinPerformanceMisVo.fieldAuditStatus}]]';
var agentFlag = [[${@permission.hasPermi('kylin:performances:agent')}]];
if (agentFlag == "hidden") {
......@@ -338,7 +339,7 @@
document.getElementById("li-tab-8").style.display = "none";
}
if (auditStatus != 0) {
if (auditStatus == 1 || fieldStatus == 1) {
document.getElementsByName("auditBtn")[0].style.display = "none";
}
......
......@@ -198,7 +198,8 @@ public class PerformanceVoUtils {
List<KylinTicketTimesPartnerVo> kylinTicketTimesPartnerVos = getTimesMongoList(performancesId);
List<TicketTimesTicketCreatePartnerVo> ticketTimesTicketCreatePartnerVoList = new ArrayList();
if (!performanceData.getAuditStatus().equals(0)) {
//不需要审核
if (performanceData.getAuditStatus().equals(1) && performanceData.getFieldAuditStatus().equals(0)) {
return getPerformanceMisDB(performancesId);
}
ArrayList<BigDecimal> floatList = new ArrayList<>();
......@@ -453,7 +454,7 @@ public class PerformanceVoUtils {
ticketRelations.setTicketRelationsId(IDGenerator.nextSnowId());
ticketRelations.setTicketId(tickets.getTicketsId());
ticketRelations.setUpdatedAt(updatedAt);
dataUtils.setTEMVo(ticketItem.getTicketsId(),dataUtils.getTEMMerchantVo(ticketItem.getTicketsId()));
dataUtils.setTEMVo(ticketItem.getTicketsId(), dataUtils.getTEMMerchantVo(ticketItem.getTicketsId()));
if (ticketItem.getStatus() == -2) {
tickets.setAdvanceMinuteMember(5);
ticketStatus.setIsMember(isMember);
......
......@@ -258,7 +258,7 @@ create index permission_id_index on merchant_authorization_permissions (permissi
alter table kylin_ticket_status modify qr_code_show_time datetime default '2030-01-01 12:00:00' null comment '二维码显示时间';
alter table kylin_tickets modify time_end_express datetime default '2030-01-01 12:00:00' null comment '快递票结束时间';
alter table kylin_performance_status ADD field_audit_status int default 3 null comment '场地审核状态[0-待提交|1-待审核|2-已拒绝|3-审核完成]';
alter table kylin_performance_status ADD field_audit_status int default 0 null comment '场地审核状态[0-审核完成|1-待审核|2-已拒绝]';
drop table if exists kylin_ticket_express_module;
create table kylin_ticket_express_module
......
......@@ -36,7 +36,14 @@ public class KylinPerformancePartnerController {
@ApiOperation(value = "演出列表", position = 1)
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<PageInfo<PerformancePartnerListDao>> getList(@RequestBody @Valid PerformancePartnerListParam performancePartnerListParam) {
return performancesPartnerService.getList(performancePartnerListParam);
return performancesPartnerService.getList(performancePartnerListParam); //getPerformanceListField
}
@PostMapping(value = "list/field")
@ApiOperation(value = "场地待审核演出列表", position = 1)
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<PageInfo<PerformancePartnerListDao>> getListField(@RequestBody @Valid PerformancePartnerListParam performancePartnerListParam) {
return performancesPartnerService.getListFields(performancePartnerListParam);
}
@PostMapping(value = "copy")
......@@ -105,7 +112,7 @@ public class KylinPerformancePartnerController {
@ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = "类型[1-立即上线|2-定时上线]")
})
public ResponseDto<String> onLinePerformance(@RequestParam("performancesId") @NotNull(message = "演出ID不能为空") String performancesId,
@RequestParam(name = "time",required = false) String time,
@RequestParam(name = "time", required = false) String time,
@RequestParam("type") Integer type) {
if (type == 1) {
return performancesPartnerService.onLinePerformance(performancesId);
......@@ -123,7 +130,7 @@ public class KylinPerformancePartnerController {
@ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = "类型[1-立即上线|2-定时上线]")
})
public ResponseDto<String> outLinePerformance(@RequestParam("performancesId") @NotNull(message = "演出ID不能为空") String performancesId,
@RequestParam(name = "time",required = false) String time,
@RequestParam(name = "time", required = false) String time,
@RequestParam("type") Integer type) {
if (type == 1) {
return performancesPartnerService.outLinePerformance(performancesId);
......@@ -148,4 +155,17 @@ public class KylinPerformancePartnerController {
public ResponseDto<String> withdraw(@RequestParam("performancesId") @NotNull(message = "演出ID不能为空") String performancesId) {
return performancesPartnerService.withdraw(performancesId);
}
@GetMapping(value = "fieldAudit")
@ApiOperation(value = "场地审核演出", position = 8)
@ApiResponse(code = 200, message = "接口返回对象参数")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "performancesId", value = "演出ID", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "status", value = "[1-待审核|2-已拒绝]", required = true),
})
public ResponseDto<String> fieldsAuditPerformance(@RequestParam("performancesId") @NotNull(message = "演出ID不能为空") String performancesId,
@RequestParam("status") @NotNull(message = "审核状态不能为空") Integer status) {
return performancesPartnerService.fieldsAuditPerformance(performancesId, status);
}
}
......@@ -733,6 +733,37 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
return ResponseDto.success(pageInfoTmp);
}
@Override
public ResponseDto<PageInfo<PerformancePartnerListDao>> getListFields(PerformancePartnerListParam performancePartnerListParam) {
performancePartnerListParam.setMerchantId(CurrentUtil.getCurrentUid());
PageInfo<PerformancePartnerListDao> pageInfoTmp;
try {
PageHelper.startPage(performancePartnerListParam.getPage(), performancePartnerListParam.getSize());
List<PerformancePartnerListDao> voList = mongoMerchantUtils.getPerformanceListField(performancePartnerListParam);
for (int i = 0; i < voList.size(); i++) {
PerformancePartnerListDao vo = voList.get(i);
vo.setSaleGeneral(vo.getNumber() - vo.getRefundNumber());
vo.setTotalSalePrice(vo.getPriceActual().subtract(vo.getPriceRefund()));
vo.setSurplusGeneral(vo.getTotalGeneral() - vo.getSaleGeneral());
if (vo.getStatus() >= 6 && vo.getStatus() != 7) {
if (DateUtil.compareStrDay(vo.getTimeSell(), DateUtil.getNowTime()) > 0) {//未开始
vo.setStatus(9);
} else if (DateUtil.compareStrDay(vo.getTimeStop(), DateUtil.getNowTime()) < 0) {//已结束
vo.setStatus(10);
} else {
vo.setStatus(6);
}
}
}
pageInfoTmp = new PageInfo(voList);
} catch (Exception e) {
e.printStackTrace();
return ResponseDto.failure(ErrorMapping.get(20104));
}
return ResponseDto.success(pageInfoTmp);
}
@Override
public ResponseDto<String> withdraw(String performancesId) {
try {
......@@ -782,32 +813,23 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
}
}
@Override
public ResponseDto<String> fieldsAuditPerformance(String performancesId, Integer status) {
LocalDateTime now = LocalDateTime.now();
KylinPerformanceVo vo = redisMerchantUtils.getPerformanceVo(performancesId);
if (vo.getFieldAuditStatus() == 1) {
return ResponseDto.failure("演出不需要审核");
} else if (vo.getFieldAuditStatus() == 0) {
queueUtil.sendMsgByRedis(MQConst.MerchantQueue.SQL_MERCHANT_PERFORMANCE_UPDATE.getKey(),
SqlMapping.get("kylin_performance_status.fieldsStatus",
status, performancesId, now, now
));
}
return ResponseDto.success("审核完成");
}
@Override
public List<PerformanceOrderStatisticalVo> getPerformanceOrderStatisticalList(String performancesId) {
// PerformanceOrderStatisticalDao countBean = PerformanceOrderStatisticalDao.getNew();
// countBean.setTitle("总计:");
//
// List<PerformanceOrderStatisticalVo> voList = new ArrayList<>();
// List<PerformanceOrderStatisticalDao> dtoList = performancesMapper.getPerformanceOrderStatisticalList(performancesId);
// dtoList.forEach(dto -> {
// PerformanceOrderStatisticalVo vo = PerformanceOrderStatisticalVo.getNew();
// BeanUtil.copy(dto, vo);
// voList.add(vo);
//
// countBean.setTotalGeneral(countBean.getTotalGeneral().add(dto.getTotalGeneral()));
// countBean.setSaleGeneral(countBean.getSaleGeneral().add(dto.getSaleGeneral()));
// countBean.setSurplusGeneral(countBean.getSurplusGeneral().add(dto.getSurplusGeneral()));
// countBean.setTotalSalePrice(countBean.getTotalSalePrice().add(dto.getTotalSalePrice()));
// countBean.setTotalExchange(countBean.getTotalExchange().add(dto.getTotalExchange()));
// countBean.setTotalRefundGeneral(countBean.getTotalRefundGeneral().add(dto.getTotalRefundGeneral()));
// countBean.setTotalRefundPrice(countBean.getTotalRefundPrice().add(dto.getTotalRefundPrice()));
// countBean.setTotalMemberNumber(countBean.getTotalMemberNumber().add(dto.getTotalMemberNumber()));
// countBean.setTotalPayingNumber(countBean.getTotalPayingNumber().add(dto.getTotalPayingNumber()));
// countBean.setTotalBuyUsers(dto.getTotalBuyUsers());
// });
// PerformanceOrderStatisticalVo vo = PerformanceOrderStatisticalVo.getNew();
// BeanUtil.copy(countBean, vo);
// voList.add(vo);
return null;
}
......
......@@ -13,6 +13,8 @@ import com.liquidnet.service.kylin.dto.vo.partner.KylinTicketPartnerVo;
import com.liquidnet.service.kylin.dto.vo.partner.KylinTicketTimesPartnerVo;
import com.liquidnet.service.merchant.constant.MerchantAuthorizationConst;
import com.liquidnet.service.merchant.dto.vo.MerchantAuthorizationPerformanceVo;
import com.liquidnet.service.merchant.dto.vo.MerchantFieldAppliesVo;
import com.liquidnet.service.merchant.service.MerchantRdmService;
import com.mongodb.BasicDBObject;
import com.mongodb.client.model.FindOneAndUpdateOptions;
import com.mongodb.client.model.ReturnDocument;
......@@ -41,6 +43,8 @@ public class MongoMerchantUtils {
private MongoConverter mongoConverter;
@Autowired
private RedisMerchantUtils redisMerchantUtils;
@Autowired
private MerchantRdmService merchantRdmService;
public PerformancePartnerVo getPerformancePartnerVo(String performanceId) {
......@@ -366,4 +370,96 @@ public class MongoMerchantUtils {
return list;
}
public List<PerformancePartnerListDao> getPerformanceListField(PerformancePartnerListParam performancePartnerListParam) {
//分页排序
Sort.Direction orderBy = Sort.Direction.DESC;
if (performancePartnerListParam.getOrderSc().equals("asc")) {
orderBy = Sort.Direction.ASC;
}
//根据用户id获取场地拥有那些演出
List<String> fieldsIdList = merchantRdmService.getFieldAppliesVosByUid(performancePartnerListParam.getMerchantId()).stream().map(MerchantFieldAppliesVo::getFieldId).collect(Collectors.toList());
//查询演出
Criteria criteria = fieldsIdList == null ? Criteria.where("fieldId").ne(null) : Criteria.where("fieldId").in(fieldsIdList);
if (performancePartnerListParam.getTitle() != null && !performancePartnerListParam.getTitle().isEmpty()) {
criteria = criteria.and("title").regex(".*" + performancePartnerListParam.getTitle() + ".*");
}
if (performancePartnerListParam.getTimeStart() != null && !performancePartnerListParam.getTimeStart().isEmpty()) {
criteria = criteria.and("timeStart").gte(performancePartnerListParam.getTimeStart()).and("timeStart").lte(performancePartnerListParam.getTimeEnd());
}
List<KylinPerformanceVo> performanceVos = mongoTemplate.find(
Query.query(criteria.and("fieldAuditStatus").is(1)).with(Sort.by(orderBy, performancePartnerListParam.getOrderItem())),
KylinPerformanceVo.class, KylinPerformanceVo.class.getSimpleName());
//查询销量
Aggregation aggregation = Aggregation.newAggregation(
Aggregation.match(Criteria.where("status").in(0, 1, 3, 6).and("couponType").is("no").and("transferStatus").in(0, 1, 2, 5).and("performanceId").in(performanceVos.stream().map(KylinPerformanceVo::getPerformancesId).collect(Collectors.toList()))),
Aggregation.group("performanceId")
.first("performanceId").as("performancesId")
.sum("number").as("number")
.sum("refundNumber").as("refundNumber")
.sum("priceActual").as("priceActual")
.sum("priceRefund").as("priceRefund")
);
AggregationResults<PerformancePartnerListDao> outputType = mongoTemplate.aggregate(aggregation, KylinOrderTicketVo.class.getSimpleName(), PerformancePartnerListDao.class);
List<PerformancePartnerListDao> dataList = new ArrayList(outputType.getMappedResults());
List<PerformancePartnerListDao> list = ObjectUtil.getPerformancePartnerListDaoArrayList();
for (KylinPerformanceVo item : performanceVos) {
boolean findData = false;
PerformancePartnerListDao dao = PerformancePartnerListDao.getNew();
dao.setPerformancesId(item.getPerformancesId());
dao.setTitle(item.getTitle());
dao.setTimeStart(item.getTimeStart());
dao.setTimeEnd(item.getTimeEnd());
dao.setStatus(item.getAppStatus());
dao.setType(item.getType());
dao.setPayCountdownMinute(item.getPayCountdownMinute());
dao.setAuditStatus(item.getAuditStatus());
dao.setRejectTxt(item.getRejectTxt());
dao.setCreatedAt(item.getCreatedAt());
int totalGeneral = 0;
String timeSell = null;
String timeStop = null;
for (KylinTicketTimesVo timeItem : item.getTicketTimeList()) {
for (KylinTicketVo ticketItem : timeItem.getTicketList()) {
if (timeSell == null) {
timeSell = ticketItem.getTimeStart();
} else if (DateUtil.compareStrDay(timeSell, ticketItem.getTimeStart()) > 0) {
timeSell = ticketItem.getTimeStart();
}
if (timeStop == null) {
timeStop = ticketItem.getTimeEnd();
} else if (DateUtil.compareStrDay(timeStop, ticketItem.getTimeEnd()) < 0) {
timeStop = ticketItem.getTimeEnd();
}
totalGeneral += ticketItem.getTotalGeneral();
}
}
dao.setTotalGeneral(totalGeneral);
dao.setTimeSell(timeSell);
dao.setTimeStop(timeStop);
for (int i = 0; i < dataList.size(); i++) {
PerformancePartnerListDao data = dataList.get(i);
if (data.getPerformancesId().equals(item.getPerformancesId())) {
findData = true;
dao.setNumber(data.getNumber());
dao.setRefundNumber(data.getRefundNumber());
dao.setPriceActual(data.getPriceActual());
dao.setPriceRefund(data.getPriceRefund());
dataList.remove(i);
break;
}
}
if (!findData) {
dao.setNumber(0);
dao.setRefundNumber(0);
dao.setPriceActual(BigDecimal.ZERO);
dao.setPriceRefund(BigDecimal.ZERO);
}
list.add(dao);
}
return list;
}
}
......@@ -34,6 +34,8 @@ kylin_performances_status.onLine=UPDATE kylin_performance_status SET status = ?
# ---- 票种状态修改 ----
kylin_ticket_status.update_status=UPDATE kylin_ticket_status SET status = ?, updated_at = ? WHERE ticket_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
kylin_ticket_status.onLine=UPDATE kylin_ticket_status SET status = ?, updated_at = ? WHERE ticket_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
# ---- 场地审核演出 ----
kylin_performance_status.fieldsStatus = UPDATE kylin_performance_status SET field_audit_status = ? WHERE performances_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
# ---- 演出第二步骤操作 ----
kylin_performance.updateStep2=UPDATE kylin_performances SET audit_time = ? , notice_image = ? WHERE performances_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
kylin_performance_status.updateStep2=UPDATE kylin_performance_status SET field_audit_status = ? ,audit_status = ? , is_true_name = ? , limit_count = ? WHERE performance_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
......
......@@ -671,6 +671,11 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
return ResponseDto.success(pageInfoTmp);
}
@Override
public ResponseDto<PageInfo<PerformancePartnerListDao>> getListFields(PerformancePartnerListParam performancePartnerListParam) {
return null;
}
@Override
public ResponseDto<String> withdraw(String performancesId) {
try {
......@@ -710,6 +715,11 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
}
}
@Override
public ResponseDto<String> fieldsAuditPerformance(String performancesId, Integer status) {
return null;
}
@Override
public List<PerformanceOrderStatisticalVo> getPerformanceOrderStatisticalList(String performancesId) {
PerformanceOrderStatisticalDao countBean = PerformanceOrderStatisticalDao.getNew();
......
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