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

Commit 6d64e2c0 authored by zhoujianping's avatar zhoujianping

1.修改代理演出相关逻辑

parent e62e855e
...@@ -55,9 +55,12 @@ ...@@ -55,9 +55,12 @@
<td th:text="${item.title}"></td> <td th:text="${item.title}"></td>
</div> </div>
<td>总销售张数</td> <td>总销售张数</td>
<td>票面票房金额</td>
<td>总销售金额</td> <td>总销售金额</td>
<td>实际销售金额</td> <td>实际销售金额</td>
<td>快递费总金额</td>
<td>优惠券金额</td> <td>优惠券金额</td>
<td>佣金比例</td>
<td>总销售佣金</td> <td>总销售佣金</td>
<td>打款状态</td> <td>打款状态</td>
<td>是否黑名单</td> <td>是否黑名单</td>
...@@ -77,9 +80,12 @@ ...@@ -77,9 +80,12 @@
<td th:text="${item.agentName}"></td> <td th:text="${item.agentName}"></td>
<td th:each="itemAgent : ${item.dataAgentVos}" th:text="${itemAgent.number}"></td> <td th:each="itemAgent : ${item.dataAgentVos}" th:text="${itemAgent.number}"></td>
<td th:text="${#aggregates.sum(item.dataAgentVos.![number])}"></td> <td th:text="${#aggregates.sum(item.dataAgentVos.![number])}"></td>
<td th:text="${#aggregates.sum(item.dataAgentVos.![faceTotalPrice])}"></td>
<td th:text="${#aggregates.sum(item.dataAgentVos.![priceReal])}"></td> <td th:text="${#aggregates.sum(item.dataAgentVos.![priceReal])}"></td>
<td th:text="${#aggregates.sum(item.dataAgentVos.![realTotalPrice])}"></td> <td th:text="${#aggregates.sum(item.dataAgentVos.![realTotalPrice])}"></td>
<td th:text="${#aggregates.sum(item.dataAgentVos.![totalPriceExpress])}"></td>
<td th:text="${#aggregates.sum(item.dataAgentVos.![voucherPrice])}"></td> <td th:text="${#aggregates.sum(item.dataAgentVos.![voucherPrice])}"></td>
<td th:text="${item.agentDistributions}"></td>
<td th:text="${item.totalCommission}"></td> <td th:text="${item.totalCommission}"></td>
<td th:if="${item.priceStatus!=0}" th:text="待打款"></td> <td th:if="${item.priceStatus!=0}" th:text="待打款"></td>
<td th:if="${item.priceStatus==0}" th:text="已打款"></td> <td th:if="${item.priceStatus==0}" th:text="已打款"></td>
......
...@@ -77,7 +77,8 @@ public class UserData implements Serializable, Cloneable { ...@@ -77,7 +77,8 @@ public class UserData implements Serializable, Cloneable {
@ApiModelProperty(value = "总佣金") @ApiModelProperty(value = "总佣金")
private BigDecimal totalCommission; private BigDecimal totalCommission;
@ApiModelProperty(value = "票提", example = "")
private BigDecimal agentDistributions;
private static final UserData obj = new UserData(); private static final UserData obj = new UserData();
......
...@@ -67,6 +67,26 @@ public class UserDataAgentVo implements Serializable, Cloneable{ ...@@ -67,6 +67,26 @@ public class UserDataAgentVo implements Serializable, Cloneable{
@ApiModelProperty(value = "优惠券金额", example = "") @ApiModelProperty(value = "优惠券金额", example = "")
private BigDecimal voucherPrice; private BigDecimal voucherPrice;
/**
* 票面金额
*/
@ApiModelProperty(value = "票面金额", example = "")
private BigDecimal faceTotalPrice;
/**
* 快递费总金额
*/
@ApiModelProperty(value = "快递费总金额", example = "")
private BigDecimal totalPriceExpress;
/**
* 票提
*/
@ApiModelProperty(value = "票提", example = "")
private BigDecimal agentDistributions;
private static final UserDataAgentVo obj = new UserDataAgentVo(); private static final UserDataAgentVo obj = new UserDataAgentVo();
public static UserDataAgentVo getNew() { public static UserDataAgentVo getNew() {
......
...@@ -388,6 +388,7 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc ...@@ -388,6 +388,7 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc
List<UserDataAgentVo> userDataAgentVos = new ArrayList<>(); List<UserDataAgentVo> userDataAgentVos = new ArrayList<>();
//当前list不为null,遍历有数据,方便后期判断是否总代取uid //当前list不为null,遍历有数据,方便后期判断是否总代取uid
ShowBaseVoDto baseVoDto = showBaseVoDtoList.get(0); ShowBaseVoDto baseVoDto = showBaseVoDtoList.get(0);
//根据票提id分组 list数量小于等于票提数量 //根据票提id分组 list数量小于等于票提数量
Map<String, List<ShowBaseVoDto>> tidMapByUid = showBaseVoDtoList.stream().collect(Collectors.groupingBy(ShowBaseVoDto::getTid)); Map<String, List<ShowBaseVoDto>> tidMapByUid = showBaseVoDtoList.stream().collect(Collectors.groupingBy(ShowBaseVoDto::getTid));
...@@ -412,6 +413,8 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc ...@@ -412,6 +413,8 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc
userDataAgentVo.setCommission(new BigDecimal(showBaseVoDto.getTotalPrice().stripTrailingZeros().toPlainString())); userDataAgentVo.setCommission(new BigDecimal(showBaseVoDto.getTotalPrice().stripTrailingZeros().toPlainString()));
userDataAgentVo.setRealTotalPrice(new BigDecimal(showBaseVoDto.getRealTotalPrice().stripTrailingZeros().toPlainString())); userDataAgentVo.setRealTotalPrice(new BigDecimal(showBaseVoDto.getRealTotalPrice().stripTrailingZeros().toPlainString()));
userDataAgentVo.setVoucherPrice(new BigDecimal(showBaseVoDto.getVoucherPrice().stripTrailingZeros().toPlainString())); userDataAgentVo.setVoucherPrice(new BigDecimal(showBaseVoDto.getVoucherPrice().stripTrailingZeros().toPlainString()));
userDataAgentVo.setFaceTotalPrice(new BigDecimal(showBaseVoDto.getFaceTotalPrice().stripTrailingZeros().toPlainString()));
userDataAgentVo.setTotalPriceExpress(new BigDecimal(showBaseVoDto.getTotalPriceExpress().stripTrailingZeros().toPlainString()));
} else { } else {
//没有买过 //没有买过
userDataAgentVo.setTicketsId(smileAgent.getTicketsId()); userDataAgentVo.setTicketsId(smileAgent.getTicketsId());
...@@ -423,6 +426,8 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc ...@@ -423,6 +426,8 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc
userDataAgentVo.setCommission(BigDecimal.ZERO); userDataAgentVo.setCommission(BigDecimal.ZERO);
userDataAgentVo.setRealTotalPrice(BigDecimal.ZERO); userDataAgentVo.setRealTotalPrice(BigDecimal.ZERO);
userDataAgentVo.setVoucherPrice(BigDecimal.ZERO); userDataAgentVo.setVoucherPrice(BigDecimal.ZERO);
userDataAgentVo.setFaceTotalPrice(BigDecimal.ZERO);
userDataAgentVo.setTotalPriceExpress(BigDecimal.ZERO);
} }
totalCommission = totalCommission.add(userDataAgentVo.getCommission()); totalCommission = totalCommission.add(userDataAgentVo.getCommission());
userDataAgentVos.add(userDataAgentVo); userDataAgentVos.add(userDataAgentVo);
...@@ -444,6 +449,10 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc ...@@ -444,6 +449,10 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc
userData.setPhone(showBaseVoDtoList.get(0).getPhone()); userData.setPhone(showBaseVoDtoList.get(0).getPhone());
userData.setIdCard(showBaseVoDtoList.get(0).getIdCard()); userData.setIdCard(showBaseVoDtoList.get(0).getIdCard());
userData.setState(showBaseVoDtoList.get(0).getState()); userData.setState(showBaseVoDtoList.get(0).getState());
//特邀代理票提
if(userData.getType()==5){
userData.setAgentDistributions(showBaseVoDtoList.get(0).getAgentDistributions());
}
if (userData.getType() != 2) { if (userData.getType() != 2) {
userData.setAgentName(showBaseVoDtoList.get(0).getName()); userData.setAgentName(showBaseVoDtoList.get(0).getName());
} else { } else {
...@@ -472,6 +481,8 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc ...@@ -472,6 +481,8 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc
userDataAgentVo.setPriceReal(BigDecimal.ZERO); userDataAgentVo.setPriceReal(BigDecimal.ZERO);
userDataAgentVo.setRealTotalPrice(BigDecimal.ZERO); userDataAgentVo.setRealTotalPrice(BigDecimal.ZERO);
userDataAgentVo.setVoucherPrice(BigDecimal.ZERO); userDataAgentVo.setVoucherPrice(BigDecimal.ZERO);
userDataAgentVo.setFaceTotalPrice(BigDecimal.ZERO);
userDataAgentVo.setTotalPriceExpress(BigDecimal.ZERO);
userDataAgentVo.setCommission(BigDecimal.ZERO); userDataAgentVo.setCommission(BigDecimal.ZERO);
userDataAgentVos.add(userDataAgentVo); userDataAgentVos.add(userDataAgentVo);
} }
...@@ -507,6 +518,18 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc ...@@ -507,6 +518,18 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc
} }
}); });
} }
if(userDataList.size()>0){
for (UserData userData : userDataList) {
//总代
if(userData.getType()==1){
userData.setAgentDistributions(new BigDecimal("0.06"));
}
//普代
if(userData.getType()==2){
userData.setAgentDistributions(new BigDecimal("0.05"));
}
}
}
saleDataVo.setUserDataList(userDataList); saleDataVo.setUserDataList(userDataList);
saleDataVo.setShowAgentVoList(showAgentVoList); saleDataVo.setShowAgentVoList(showAgentVoList);
return saleDataVo; return saleDataVo;
...@@ -661,7 +684,7 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc ...@@ -661,7 +684,7 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc
//做表 //做表
ticketList.forEach(title -> headTitles.add(Lists.newArrayList(ticket, ticket, title))); ticketList.forEach(title -> headTitles.add(Lists.newArrayList(ticket, ticket, title)));
ArrayList<String> dataList = Lists.newArrayList("总销售张数", "总销售金额","实际销售金额","优惠券金额", "总销售佣金","打款状态"); ArrayList<String> dataList = Lists.newArrayList("总销售张数","总销售张数(人工核验技术不填写)","票面票房金额","票面票房金额(人工核验技术不填写)","总销售金额","总销售金额(人工核验技术不填写)","实际销售金额","实际销售金额(人工核验技术不填写)","快递费总金额","优惠券金额","佣金比例","总销售佣金","总销售佣金(人工核验技术不填写)","打款状态");
//做表 //做表
dataList.forEach(dataStr -> headTitles.add(Lists.newArrayList(saleData, saleData, dataStr))); dataList.forEach(dataStr -> headTitles.add(Lists.newArrayList(saleData, saleData, dataStr)));
...@@ -680,6 +703,10 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc ...@@ -680,6 +703,10 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc
BigDecimal realTotalPrice=new BigDecimal("0"); BigDecimal realTotalPrice=new BigDecimal("0");
//优惠券金额 //优惠券金额
BigDecimal voucherPrice=new BigDecimal("0"); BigDecimal voucherPrice=new BigDecimal("0");
//票面票房金额
BigDecimal faceTotalPrice=new BigDecimal("0");
//快递费总金额
BigDecimal totalPriceExpress=new BigDecimal("0");
ArrayList<Object> arrayList = Lists.newArrayList(); ArrayList<Object> arrayList = Lists.newArrayList();
arrayList.add(userData.getUid()); arrayList.add(userData.getUid());
...@@ -718,16 +745,26 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc ...@@ -718,16 +745,26 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc
price = price.add(userDataAgentVo.getPriceReal()); price = price.add(userDataAgentVo.getPriceReal());
realTotalPrice=realTotalPrice.add(userDataAgentVo.getRealTotalPrice()); realTotalPrice=realTotalPrice.add(userDataAgentVo.getRealTotalPrice());
voucherPrice=voucherPrice.add(userDataAgentVo.getVoucherPrice()); voucherPrice=voucherPrice.add(userDataAgentVo.getVoucherPrice());
faceTotalPrice=faceTotalPrice.add(userDataAgentVo.getFaceTotalPrice());
totalPriceExpress=totalPriceExpress.add(userDataAgentVo.getTotalPriceExpress());
arrayList.add(userDataAgentVo.getNumber()); arrayList.add(userDataAgentVo.getNumber());
} else { } else {
arrayList.add(0); arrayList.add(0);
} }
} }
arrayList.add(num); arrayList.add(num);
arrayList.add("");
arrayList.add(faceTotalPrice);
arrayList.add("");
arrayList.add(price); arrayList.add(price);
arrayList.add("");
arrayList.add(realTotalPrice); arrayList.add(realTotalPrice);
arrayList.add("");
arrayList.add(totalPriceExpress);
arrayList.add(voucherPrice); arrayList.add(voucherPrice);
arrayList.add(userData.getAgentDistributions());
arrayList.add(userData.getTotalCommission()); arrayList.add(userData.getTotalCommission());
arrayList.add("");
arrayList.add(userData.getPriceStatus() != null && userData.getPriceStatus() == 0 ? "已打款" : "待打款"); arrayList.add(userData.getPriceStatus() != null && userData.getPriceStatus() == 0 ? "已打款" : "待打款");
contentList.add(arrayList); contentList.add(arrayList);
}); });
......
...@@ -89,6 +89,21 @@ public class ShowBaseVoDto implements Serializable, Cloneable{ ...@@ -89,6 +89,21 @@ public class ShowBaseVoDto implements Serializable, Cloneable{
*/ */
private BigDecimal voucherPrice; private BigDecimal voucherPrice;
/**
* 票面金额
*/
private BigDecimal faceTotalPrice;
/**
* 快递费总金额
*/
private BigDecimal totalPriceExpress;
/**
* 佣金比例
*/
private BigDecimal agentDistributions;
private static final ShowBaseVoDto obj = new ShowBaseVoDto(); private static final ShowBaseVoDto obj = new ShowBaseVoDto();
public static ShowBaseVoDto getNew() { public static ShowBaseVoDto getNew() {
......
...@@ -88,7 +88,10 @@ ...@@ -88,7 +88,10 @@
SUM( kot.number ) number, SUM( kot.number ) number,
SUM( (kot.price_actual - kot.price_express) * sukotr.agent_distributions ) totalPrice, SUM( (kot.price_actual - kot.price_express) * sukotr.agent_distributions ) totalPrice,
SUM( (kot.price_actual - kot.price_express) ) realTotalPrice, SUM( (kot.price_actual - kot.price_express) ) realTotalPrice,
SUM( kot.price_voucher ) voucherPrice SUM( kot.price_voucher ) voucherPrice,
SUM( kot.price_express ) totalPriceExpress,
SUM( kot.price_total - kot.price_express ) faceTotalPrice,
MAX(sukotr.agent_distributions ) agentDistributions
FROM FROM
kylin_order_tickets AS kot kylin_order_tickets AS kot
INNER JOIN ( INNER JOIN (
......
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
FROM kylin_order_ticket_relations AS kotr FROM kylin_order_ticket_relations AS kotr
INNER JOIN kylin_order_ticket_status AS kots ON kots.order_id = kotr.order_id INNER JOIN kylin_order_ticket_status AS kots ON kots.order_id = kotr.order_id
WHERE kotr.performance_id = #{performancesId} WHERE kotr.performance_id = #{performancesId}
AND kotr.agent_id != 0 AND kots.status IN (1,6,3)) kk ON su.uid = kk.agent_id_master AND kotr.agent_id != 0 AND kots.status IN (1)) kk ON su.uid = kk.agent_id_master
GROUP BY su.uid GROUP BY su.uid
</select> </select>
......
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