fix bug-1
This commit is contained in:
parent
b4617d3135
commit
fb57b9e9f9
|
|
@ -80,6 +80,7 @@ public class CustomerController extends BaseController {
|
|||
List<Long> customerIds = new ArrayList<Long>(){{
|
||||
add(curCustomer.getCustomerId());
|
||||
}};
|
||||
List<Long> nextLevelCustomerIds = new ArrayList<>();
|
||||
if (customer.getIsDistributor()) {
|
||||
// 分销商需要查询所有下一级分销用户作为统计条件
|
||||
Customer customerQry = new Customer();
|
||||
|
|
@ -87,8 +88,7 @@ public class CustomerController extends BaseController {
|
|||
customerQry.setStatus(Integer.valueOf(UserStatus.OK.getCode()));
|
||||
List<Customer> nextLevelCustomers = customerService.getCustomerList(customerQry);
|
||||
teamNum = teamNum + nextLevelCustomers.stream().filter(x->PlaceStatus.CAN_PLACE.getCode().equals(x.getPlaceStatus())).count();
|
||||
List<Long> nextLevelCustomerIds = nextLevelCustomers.stream().map(Customer::getCustomerId).collect(Collectors.toList());
|
||||
// customerIds.addAll(nextLevelCustomerIds);
|
||||
nextLevelCustomerIds = nextLevelCustomers.stream().map(Customer::getCustomerId).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
// 本月第一天
|
||||
|
|
@ -138,6 +138,7 @@ public class CustomerController extends BaseController {
|
|||
|
||||
// 本月订单数及本月订单额
|
||||
OrderMaster orderParams1 = new OrderMaster();
|
||||
customerIds.addAll(nextLevelCustomerIds);
|
||||
orderParams1.setCustomerIds(customerIds);
|
||||
orderParams1.setCreateTimeStart(firstDayCurMonth.atStartOfDay());
|
||||
List<OrderMaster> ordersCurMonth1 = orderMasterService.selectOrderMasterList(orderParams1);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ import com.ghy.common.enums.BusinessType;
|
|||
import com.ghy.common.utils.ExceptionUtil;
|
||||
import com.ghy.common.utils.poi.ExcelUtil;
|
||||
import com.ghy.payment.domain.FinancialDetail;
|
||||
import com.ghy.payment.request.FinancialAccountBillReq;
|
||||
import com.ghy.payment.response.FinancialAccountBillResp;
|
||||
import com.ghy.payment.service.FinancialDetailService;
|
||||
import com.ghy.web.pojo.vo.FinancialCountRequest;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
|
@ -68,6 +70,14 @@ public class FinancialDetailController extends BaseController {
|
|||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@PostMapping("/app/listV2")
|
||||
@ResponseBody
|
||||
public TableDataInfo appListV2(@RequestBody FinancialAccountBillReq financialAccountBillReq) {
|
||||
startPage();
|
||||
List<FinancialAccountBillResp> list = financialDetailService.selectFinancialDetailListV2(financialAccountBillReq);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "财务细单管理", businessType = BusinessType.EXPORT)
|
||||
@RequiresPermissions("financial:detail:export")
|
||||
@PostMapping("/export")
|
||||
|
|
|
|||
|
|
@ -316,6 +316,7 @@ public class WxController extends BaseController {
|
|||
@GetMapping("/neCheck")
|
||||
@ResponseBody
|
||||
public AjaxResult neCheck(HttpServletRequest request) {
|
||||
try {
|
||||
String url;
|
||||
boolean flag = false;
|
||||
String deptId = request.getHeader("deptId");
|
||||
|
|
@ -383,6 +384,9 @@ public class WxController extends BaseController {
|
|||
}
|
||||
}
|
||||
return AjaxResult.success(flag);
|
||||
}catch (Exception e){
|
||||
return AjaxResult.success(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.ghy.payment.mapper;
|
||||
|
||||
import com.ghy.payment.domain.FinancialDetail;
|
||||
import com.ghy.payment.request.FinancialAccountBillReq;
|
||||
import com.ghy.payment.response.FinancialAccountBillResp;
|
||||
import com.ghy.payment.response.FinancialCountResponse;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
|
@ -44,6 +46,8 @@ public interface FinancialDetailMapper {
|
|||
*/
|
||||
List<FinancialDetail> selectFinancialDetailList(FinancialDetail financialDetail);
|
||||
|
||||
List<FinancialAccountBillResp> selectFinancialDetailListV2(FinancialAccountBillReq financialAccountBillReq);
|
||||
|
||||
/**
|
||||
* @param financialDetailId 财务细单id
|
||||
* @return 财务细单
|
||||
|
|
|
|||
|
|
@ -0,0 +1,83 @@
|
|||
package com.ghy.payment.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author clunt
|
||||
*/
|
||||
@Data
|
||||
public class FinancialAccountBillReq {
|
||||
|
||||
private Long deptId;
|
||||
|
||||
private String orderCode;
|
||||
|
||||
private Long customerId;
|
||||
|
||||
private Long workerId;
|
||||
|
||||
private String beginTime;
|
||||
|
||||
private String endTime;
|
||||
|
||||
// 01.待分账 02.已分账 03.已取消
|
||||
private String billType;
|
||||
|
||||
public Long getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public String getOrderCode() {
|
||||
return orderCode;
|
||||
}
|
||||
|
||||
public void setOrderCode(String orderCode) {
|
||||
this.orderCode = orderCode;
|
||||
}
|
||||
|
||||
public Long getCustomerId() {
|
||||
return customerId;
|
||||
}
|
||||
|
||||
public void setCustomerId(Long customerId) {
|
||||
this.customerId = customerId;
|
||||
}
|
||||
|
||||
public Long getWorkerId() {
|
||||
return workerId;
|
||||
}
|
||||
|
||||
public void setWorkerId(Long workerId) {
|
||||
this.workerId = workerId;
|
||||
}
|
||||
|
||||
public String getBeginTime() {
|
||||
return beginTime;
|
||||
}
|
||||
|
||||
public void setBeginTime(String beginTime) {
|
||||
this.beginTime = beginTime;
|
||||
}
|
||||
|
||||
public String getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(String endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public String getBillType() {
|
||||
return billType;
|
||||
}
|
||||
|
||||
public void setBillType(String billType) {
|
||||
this.billType = billType;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.ghy.payment.response;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author clunt
|
||||
*/
|
||||
@Data
|
||||
public class FinancialAccountBillResp {
|
||||
// om.code as order_code,
|
||||
// fd.pay_money as pay_money,
|
||||
// om.create_time as create_time,
|
||||
// om.order_status as order_status,
|
||||
// fm.pay_status as pay_status,
|
||||
// fm.code as pay_code,
|
||||
// fm.pay_time as pay_time
|
||||
private String orderCode;
|
||||
private BigDecimal payMoney;
|
||||
private Date createTime;
|
||||
private Integer orderStatus;
|
||||
private String orderStatusDesc;
|
||||
private Integer payStatus;
|
||||
private String payStatusDesc;
|
||||
private String payCode;
|
||||
private Date payTime;
|
||||
|
||||
}
|
||||
|
|
@ -7,6 +7,8 @@ import java.util.List;
|
|||
@Data
|
||||
public class FinancialCountResponse {
|
||||
|
||||
private String orderCode;
|
||||
|
||||
private String createTime;
|
||||
|
||||
private String payCount;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.ghy.payment.service;
|
||||
|
||||
import com.ghy.payment.domain.FinancialDetail;
|
||||
import com.ghy.payment.request.FinancialAccountBillReq;
|
||||
import com.ghy.payment.response.FinancialAccountBillResp;
|
||||
import com.ghy.payment.response.FinancialCountResponse;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -123,4 +125,7 @@ public interface FinancialDetailService {
|
|||
* @param reverseId Adapay撤销支付ID
|
||||
*/
|
||||
void refundSucceeded(String reverseId);
|
||||
|
||||
List<FinancialAccountBillResp> selectFinancialDetailListV2(FinancialAccountBillReq financialAccountBillReq);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ import com.ghy.common.core.text.Convert;
|
|||
import com.ghy.common.enums.FinancialDetailType;
|
||||
import com.ghy.payment.domain.FinancialDetail;
|
||||
import com.ghy.payment.mapper.FinancialDetailMapper;
|
||||
import com.ghy.payment.request.FinancialAccountBillReq;
|
||||
import com.ghy.payment.response.FinancialAccountBillResp;
|
||||
import com.ghy.payment.response.FinancialCountResponse;
|
||||
import com.ghy.payment.service.FinancialDetailService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -93,6 +95,26 @@ public class FinancialDetailServiceImpl implements FinancialDetailService {
|
|||
return financialDetailMapper.selectFinancialDetailList(financialDetail);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FinancialAccountBillResp> selectFinancialDetailListV2(FinancialAccountBillReq financialAccountBillReq) {
|
||||
List<FinancialAccountBillResp> list = financialDetailMapper.selectFinancialDetailListV2(financialAccountBillReq);
|
||||
list.forEach(model->{
|
||||
if(model.getOrderStatus() == 6){
|
||||
model.setOrderStatusDesc("运营利润--已取消");
|
||||
}else if(model.getOrderStatus() == 5){
|
||||
model.setOrderStatusDesc("运营利润--已到账");
|
||||
}else {
|
||||
model.setOrderStatusDesc("运营利润--待分账");
|
||||
}
|
||||
if(model.getPayStatus() == 1){
|
||||
model.setPayStatusDesc("已支付");
|
||||
}else {
|
||||
model.setPayStatusDesc("未支付");
|
||||
}
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FinancialDetail selectById(Long financialDetailId) {
|
||||
return financialDetailMapper.selectById(financialDetailId);
|
||||
|
|
|
|||
|
|
@ -28,6 +28,16 @@
|
|||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="FinancialAccountBillResult" type="com.ghy.payment.response.FinancialAccountBillResp">
|
||||
<id property="orderCode" column="order_code"/>
|
||||
<id property="payMoney" column="pay_money"/>
|
||||
<id property="createTime" column="create_time"/>
|
||||
<id property="orderStatus" column="order_status"/>
|
||||
<id property="payStatus" column="pay_status"/>
|
||||
<id property="payCode" column="pay_code"/>
|
||||
<id property="payTime" column="pay_time"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="countResult" type="com.ghy.payment.response.FinancialCountResponse">
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="payCount" column="pay_count"/>
|
||||
|
|
@ -97,6 +107,51 @@
|
|||
order by fd.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectFinancialDetailListV2" parameterType="com.ghy.payment.request.FinancialAccountBillReq"
|
||||
resultMap="FinancialAccountBillResult">
|
||||
select
|
||||
om.code as order_code,
|
||||
fd.pay_money as pay_money,
|
||||
om.create_time as create_time,
|
||||
om.order_status as order_status,
|
||||
fm.pay_status as pay_status,
|
||||
fm.code as pay_code,
|
||||
fd.pay_time as pay_time
|
||||
from financial_detail fd
|
||||
left join financial_master fm on fd.financial_master_id = fm.id
|
||||
left join order_master om on fm.order_master_id = om.id
|
||||
<where>
|
||||
<if test="deptId != null">
|
||||
AND fd.dept_id = #{deptId}
|
||||
</if>
|
||||
<if test="workerId != null">
|
||||
AND fd.payee_id = #{workerId}
|
||||
</if>
|
||||
<if test="customerId != null">
|
||||
AND fd.payee_id = #{customerId}
|
||||
</if>
|
||||
<if test="orderCode != null and orderCode != ''">
|
||||
AND om.code like concat('%', #{orderCode}, '%')
|
||||
</if>
|
||||
<if test="billType == '01'">
|
||||
AND om.order_status in ('0','1','2','3','4')
|
||||
</if>
|
||||
<if test="billType == '02'">
|
||||
AND om.order_status = '05'
|
||||
</if>
|
||||
<if test="billType == '03'">
|
||||
AND om.order_status = '06'
|
||||
</if>
|
||||
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
||||
and fd.create_time >= #{beginTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
||||
and fd.create_time <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
order by om.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectById" parameterType="long" resultMap="FinancialDetailResult">
|
||||
<include refid="selectFinancialDetail"/> WHERE id = #{financialDetailId}
|
||||
</select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue