Compare commits
No commits in common. "fb57b9e9f92a074fdd16e8aeceb969192ac518ec" and "2549dcd977ed1cab382fb0f99a7a89d7ad9c25a2" have entirely different histories.
fb57b9e9f9
...
2549dcd977
|
|
@ -76,19 +76,17 @@ public class CustomerController extends BaseController {
|
||||||
startPage();
|
startPage();
|
||||||
List<Customer> list = customerService.getCustomerList(customer);
|
List<Customer> list = customerService.getCustomerList(customer);
|
||||||
for (Customer curCustomer: list) {
|
for (Customer curCustomer: list) {
|
||||||
Long teamNum = 0L;
|
|
||||||
List<Long> customerIds = new ArrayList<Long>(){{
|
List<Long> customerIds = new ArrayList<Long>(){{
|
||||||
add(curCustomer.getCustomerId());
|
add(curCustomer.getCustomerId());
|
||||||
}};
|
}};
|
||||||
List<Long> nextLevelCustomerIds = new ArrayList<>();
|
|
||||||
if (customer.getIsDistributor()) {
|
if (customer.getIsDistributor()) {
|
||||||
// 分销商需要查询所有下一级分销用户作为统计条件
|
// 分销商需要查询所有下一级分销用户作为统计条件
|
||||||
Customer customerQry = new Customer();
|
Customer customerQry = new Customer();
|
||||||
customerQry.setCustomerPlace(curCustomer.getCustomerId());
|
customerQry.setCustomerPlace(curCustomer.getCustomerId());
|
||||||
customerQry.setStatus(Integer.valueOf(UserStatus.OK.getCode()));
|
customerQry.setStatus(Integer.valueOf(UserStatus.OK.getCode()));
|
||||||
List<Customer> nextLevelCustomers = customerService.getCustomerList(customerQry);
|
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());
|
||||||
nextLevelCustomerIds = nextLevelCustomers.stream().map(Customer::getCustomerId).collect(Collectors.toList());
|
customerIds.addAll(nextLevelCustomerIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 本月第一天
|
// 本月第一天
|
||||||
|
|
@ -109,7 +107,6 @@ public class CustomerController extends BaseController {
|
||||||
.setValue(customerService.countCustomer(customerParams));
|
.setValue(customerService.countCustomer(customerParams));
|
||||||
analyseItems.add(aItem1);
|
analyseItems.add(aItem1);
|
||||||
// 本月绑定客户数
|
// 本月绑定客户数
|
||||||
customerParams.setPlaceStatus(null);
|
|
||||||
customerParams.setUpdateTimeStart(firstDayCurMonth.atStartOfDay());
|
customerParams.setUpdateTimeStart(firstDayCurMonth.atStartOfDay());
|
||||||
AnalyseItem aItem2 = new AnalyseItem()
|
AnalyseItem aItem2 = new AnalyseItem()
|
||||||
.setType(AnalyseItemEnum.CUSTOMER_NUM_ADDED_CUR_MONTH.getType())
|
.setType(AnalyseItemEnum.CUSTOMER_NUM_ADDED_CUR_MONTH.getType())
|
||||||
|
|
@ -118,27 +115,22 @@ public class CustomerController extends BaseController {
|
||||||
.setValue(customerService.countCustomer(customerParams));
|
.setValue(customerService.countCustomer(customerParams));
|
||||||
analyseItems.add(aItem2);
|
analyseItems.add(aItem2);
|
||||||
// 团队
|
// 团队
|
||||||
customerParams.setUpdateTimeStart(null);
|
|
||||||
customerParams.setPlaceStatus(PlaceStatus.CAN_PLACE.getCode());
|
|
||||||
AnalyseItem aItem11 = new AnalyseItem()
|
AnalyseItem aItem11 = new AnalyseItem()
|
||||||
.setType(AnalyseItemEnum.TEAM_MEMBER_NUM.getType())
|
.setType(AnalyseItemEnum.TEAM_MEMBER_NUM.getType())
|
||||||
.setTitle(AnalyseItemEnum.TEAM_MEMBER_NUM.getTitle())
|
.setTitle(AnalyseItemEnum.TEAM_MEMBER_NUM.getTitle())
|
||||||
.setUnit(AnalyseItemEnum.TEAM_MEMBER_NUM.getUnit())
|
.setUnit(AnalyseItemEnum.TEAM_MEMBER_NUM.getUnit())
|
||||||
.setValue(customerService.countCustomer(customerParams));
|
.setValue(aItem1.getValue());
|
||||||
analyseItems.add(aItem11);
|
analyseItems.add(aItem11);
|
||||||
// 本月绑定客户数
|
// 本月绑定客户数
|
||||||
customerParams.setUpdateTimeStart(firstDayCurMonth.atStartOfDay());
|
|
||||||
customerParams.setPlaceStatus(PlaceStatus.CAN_PLACE.getCode());
|
|
||||||
AnalyseItem aItem12 = new AnalyseItem()
|
AnalyseItem aItem12 = new AnalyseItem()
|
||||||
.setType(AnalyseItemEnum.TEAM_MEMBER_ADDED_CUR_MONTH.getType())
|
.setType(AnalyseItemEnum.TEAM_MEMBER_ADDED_CUR_MONTH.getType())
|
||||||
.setTitle(AnalyseItemEnum.TEAM_MEMBER_ADDED_CUR_MONTH.getTitle())
|
.setTitle(AnalyseItemEnum.TEAM_MEMBER_ADDED_CUR_MONTH.getTitle())
|
||||||
.setUnit(AnalyseItemEnum.TEAM_MEMBER_ADDED_CUR_MONTH.getUnit())
|
.setUnit(AnalyseItemEnum.TEAM_MEMBER_ADDED_CUR_MONTH.getUnit())
|
||||||
.setValue(customerService.countCustomer(customerParams));
|
.setValue(aItem2.getValue());
|
||||||
analyseItems.add(aItem12);
|
analyseItems.add(aItem12);
|
||||||
|
|
||||||
// 本月订单数及本月订单额
|
// 本月订单数及本月订单额
|
||||||
OrderMaster orderParams1 = new OrderMaster();
|
OrderMaster orderParams1 = new OrderMaster();
|
||||||
customerIds.addAll(nextLevelCustomerIds);
|
|
||||||
orderParams1.setCustomerIds(customerIds);
|
orderParams1.setCustomerIds(customerIds);
|
||||||
orderParams1.setCreateTimeStart(firstDayCurMonth.atStartOfDay());
|
orderParams1.setCreateTimeStart(firstDayCurMonth.atStartOfDay());
|
||||||
List<OrderMaster> ordersCurMonth1 = orderMasterService.selectOrderMasterList(orderParams1);
|
List<OrderMaster> ordersCurMonth1 = orderMasterService.selectOrderMasterList(orderParams1);
|
||||||
|
|
@ -220,7 +212,7 @@ public class CustomerController extends BaseController {
|
||||||
OrderMaster orderParams4 = new OrderMaster();
|
OrderMaster orderParams4 = new OrderMaster();
|
||||||
orderParams4.setCustomerIds(customerIds);
|
orderParams4.setCustomerIds(customerIds);
|
||||||
orderParams4.setCreateTimeStart(firstDayCurWeek.atStartOfDay());
|
orderParams4.setCreateTimeStart(firstDayCurWeek.atStartOfDay());
|
||||||
List<OrderMaster> ordersCurWeek = orderMasterService.selectOrderMasterList(orderParams4);
|
List<OrderMaster> ordersCurWeek = orderMasterService.selectOrderMasterList(orderParams3);
|
||||||
List<Long> orderIdsCurWeek = ordersCurWeek.stream().map(OrderMaster::getId).collect(Collectors.toList());
|
List<Long> orderIdsCurWeek = ordersCurWeek.stream().map(OrderMaster::getId).collect(Collectors.toList());
|
||||||
BigDecimal totalMoneyCurWeek = new BigDecimal(0);
|
BigDecimal totalMoneyCurWeek = new BigDecimal(0);
|
||||||
if (CollectionUtils.isNotEmpty(orderIdsCurWeek)) {
|
if (CollectionUtils.isNotEmpty(orderIdsCurWeek)) {
|
||||||
|
|
|
||||||
|
|
@ -664,15 +664,6 @@ public class OrderController extends BaseController {
|
||||||
|
|
||||||
// 分销扣点记录
|
// 分销扣点记录
|
||||||
Long customerPlaceId = customer.getCustomerPlace();
|
Long customerPlaceId = customer.getCustomerPlace();
|
||||||
Long parentCustomerPlaceId = customer.getParentCustomerPlace();
|
|
||||||
Long reparentCustomerPlaceId = null;
|
|
||||||
if(customer.getParentCustomerPlace() != null){
|
|
||||||
Customer parentPlaceCustomer =customerService.selectByCustomerId(customer.getParentCustomerPlace());
|
|
||||||
if(parentPlaceCustomer != null){
|
|
||||||
reparentCustomerPlaceId = parentPlaceCustomer.getCustomerPlace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 一级分销
|
// 一级分销
|
||||||
if (customerPlaceId != null) {
|
if (customerPlaceId != null) {
|
||||||
FinancialDetail financialDetail = new FinancialDetail(deptId, financialDetailService.createCode(),
|
FinancialDetail financialDetail = new FinancialDetail(deptId, financialDetailService.createCode(),
|
||||||
|
|
@ -681,9 +672,12 @@ public class OrderController extends BaseController {
|
||||||
|
|
||||||
// 剩余服务金额
|
// 剩余服务金额
|
||||||
serverMoney = serverMoney.subtract(threeMoney);
|
serverMoney = serverMoney.subtract(threeMoney);
|
||||||
|
} else {
|
||||||
|
oneMoney = oneMoney.add(threeMoney);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 二级分销
|
// 二级分销
|
||||||
|
Long parentCustomerPlaceId = customer.getParentCustomerPlace();
|
||||||
if (parentCustomerPlaceId != null) {
|
if (parentCustomerPlaceId != null) {
|
||||||
FinancialDetail financialDetail = new FinancialDetail(deptId, financialDetailService.createCode(),
|
FinancialDetail financialDetail = new FinancialDetail(deptId, financialDetailService.createCode(),
|
||||||
financialMaster.getId(), financialMaster.getCode(), twoMoney, FinancialDetailType.PLACE_FEE.getCode(), parentCustomerPlaceId);
|
financialMaster.getId(), financialMaster.getCode(), twoMoney, FinancialDetailType.PLACE_FEE.getCode(), parentCustomerPlaceId);
|
||||||
|
|
@ -691,42 +685,17 @@ public class OrderController extends BaseController {
|
||||||
|
|
||||||
// 剩余服务金额
|
// 剩余服务金额
|
||||||
serverMoney = serverMoney.subtract(twoMoney);
|
serverMoney = serverMoney.subtract(twoMoney);
|
||||||
}else if(customerPlaceId != null){
|
} else {
|
||||||
// 二级没有,且三级有
|
oneMoney = oneMoney.add(twoMoney);
|
||||||
FinancialDetail financialDetail = new FinancialDetail(deptId, financialDetailService.createCode(),
|
|
||||||
financialMaster.getId(), financialMaster.getCode(), twoMoney, FinancialDetailType.PLACE_FEE.getCode(), customerPlaceId);
|
|
||||||
financialDetailService.insertFinancialDetail(financialDetail);
|
|
||||||
|
|
||||||
// 剩余服务金额
|
|
||||||
serverMoney = serverMoney.subtract(twoMoney);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 最上级分,没有则给下级,再没有再给下级
|
|
||||||
if(reparentCustomerPlaceId != null){
|
|
||||||
// 平台分销
|
// 平台分销
|
||||||
FinancialDetail financialDetail = new FinancialDetail(deptId, financialDetailService.createCode(),
|
FinancialDetail financialDetail = new FinancialDetail(deptId, financialDetailService.createCode(),
|
||||||
financialMaster.getId(), financialMaster.getCode(), oneMoney, FinancialDetailType.PLACE_FEE.getCode(), reparentCustomerPlaceId);
|
financialMaster.getId(), financialMaster.getCode(), oneMoney, FinancialDetailType.PLACE_FEE.getCode(), null);
|
||||||
financialDetailService.insertFinancialDetail(financialDetail);
|
financialDetailService.insertFinancialDetail(financialDetail);
|
||||||
|
|
||||||
// 剩余服务金额
|
// 剩余服务金额
|
||||||
serverMoney = serverMoney.subtract(oneMoney);
|
serverMoney = serverMoney.subtract(oneMoney);
|
||||||
}else if(parentCustomerPlaceId != null){
|
|
||||||
// 平台分销
|
|
||||||
FinancialDetail financialDetail = new FinancialDetail(deptId, financialDetailService.createCode(),
|
|
||||||
financialMaster.getId(), financialMaster.getCode(), oneMoney, FinancialDetailType.PLACE_FEE.getCode(), parentCustomerPlaceId);
|
|
||||||
financialDetailService.insertFinancialDetail(financialDetail);
|
|
||||||
|
|
||||||
// 剩余服务金额
|
|
||||||
serverMoney = serverMoney.subtract(oneMoney);
|
|
||||||
}else if(customerPlaceId != null){
|
|
||||||
// 平台分销
|
|
||||||
FinancialDetail financialDetail = new FinancialDetail(deptId, financialDetailService.createCode(),
|
|
||||||
financialMaster.getId(), financialMaster.getCode(), oneMoney, FinancialDetailType.PLACE_FEE.getCode(), customerPlaceId);
|
|
||||||
financialDetailService.insertFinancialDetail(financialDetail);
|
|
||||||
|
|
||||||
// 剩余服务金额
|
|
||||||
serverMoney = serverMoney.subtract(oneMoney);
|
|
||||||
}
|
|
||||||
|
|
||||||
financialMaster.setServerMoney(serverMoney);
|
financialMaster.setServerMoney(serverMoney);
|
||||||
financialMasterService.updateFinancialMaster(financialMaster);
|
financialMasterService.updateFinancialMaster(financialMaster);
|
||||||
|
|
@ -1010,64 +979,63 @@ public class OrderController extends BaseController {
|
||||||
// 查询子单
|
// 查询子单
|
||||||
OrderDetail orderDetailReq = new OrderDetail();
|
OrderDetail orderDetailReq = new OrderDetail();
|
||||||
BeanUtils.copyProperties(orderListRequest, orderDetailReq);
|
BeanUtils.copyProperties(orderListRequest, orderDetailReq);
|
||||||
// 拿到所有正常筛选出来的子单
|
|
||||||
List<OrderListResponse> detailList = this.getDetailList(orderDetailReq);
|
List<OrderListResponse> detailList = this.getDetailList(orderDetailReq);
|
||||||
orderListResponses.addAll(detailList);
|
orderListResponses.addAll(detailList);
|
||||||
// List<OrderListResponse> allList = new ArrayList<>();
|
List<OrderListResponse> allList = new ArrayList<>();
|
||||||
// List<Long> masterIdSet = new ArrayList<Long>();
|
List<Long> masterIdSet = new ArrayList<Long>();
|
||||||
// if (orderListRequest.getTimeout() != null && orderListRequest.getTimeout() == 1) {
|
if (orderListRequest.getTimeout() != null && orderListRequest.getTimeout() == 1) {
|
||||||
// // 增加主单下子单有超时的
|
// 增加主单下子单有超时的
|
||||||
// // 增加主单下子单有超时的
|
// 增加主单下子单有超时的
|
||||||
// OrderMaster param = new OrderMaster();
|
OrderMaster param = new OrderMaster();
|
||||||
// param.setWorkerId(orderListRequest.getWorkerId());
|
param.setWorkerId(orderListRequest.getWorkerId());
|
||||||
// List<OrderMaster> allOrderMaster = orderMasterService.selectOrderMasterList(param);
|
List<OrderMaster> allOrderMaster = orderMasterService.selectOrderMasterList(param);
|
||||||
// if(CollectionUtils.isNotEmpty(allOrderMaster)){
|
if(CollectionUtils.isNotEmpty(allOrderMaster)){
|
||||||
// OrderDetail countParam = new OrderDetail();
|
OrderDetail countParam = new OrderDetail();
|
||||||
// countParam.setMasterIds(allOrderMaster.stream().map(OrderMaster::getId).collect(Collectors.toList()));
|
countParam.setMasterIds(allOrderMaster.stream().map(OrderMaster::getId).collect(Collectors.toList()));
|
||||||
// List<OrderDetail> orderDetails = orderDetailService.selectOrderDetailList(countParam);
|
List<OrderDetail> orderDetails = orderDetailService.selectOrderDetailList(countParam);
|
||||||
// List<OrderDetail> result = orderDetails.stream().filter(s -> s.getTimeout().equals(1)).collect(Collectors.toList());
|
List<OrderDetail> result = orderDetails.stream().filter(s -> s.getTimeout().equals(1)).collect(Collectors.toList());
|
||||||
// if (CollectionUtils.isNotEmpty(result)) {
|
if (CollectionUtils.isNotEmpty(result)) {
|
||||||
// masterIdSet = result.stream().map(OrderDetail::getOrderMasterId).collect(Collectors.toList());
|
masterIdSet = result.stream().map(OrderDetail::getOrderMasterId).collect(Collectors.toList());
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// if (CollectionUtils.isNotEmpty(masterIdSet)) {
|
if (CollectionUtils.isNotEmpty(masterIdSet)) {
|
||||||
// OrderMaster timeOutMaster = new OrderMaster();
|
OrderMaster timeOutMaster = new OrderMaster();
|
||||||
// timeOutMaster.setOrderMasterIdList(masterIdSet);
|
timeOutMaster.setOrderMasterIdList(masterIdSet);
|
||||||
// allList.addAll(this.getMasterList(timeOutMaster));
|
allList.addAll(this.getMasterList(timeOutMaster));
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
// 查询主单
|
// 查询主单
|
||||||
OrderMaster orderMasterReq = new OrderMaster();
|
OrderMaster orderMasterReq = new OrderMaster();
|
||||||
BeanUtils.copyProperties(orderListRequest, orderMasterReq);
|
BeanUtils.copyProperties(orderListRequest, orderMasterReq);
|
||||||
// orderMasterReq.setExceptOrderMasterIds(masterIdSet);
|
orderMasterReq.setExceptOrderMasterIds(masterIdSet);
|
||||||
orderMasterReq.setGoodsName(null);
|
orderMasterReq.setGoodsName(null);
|
||||||
List<OrderListResponse> masterList = this.getMasterList(orderMasterReq);
|
List<OrderListResponse> masterList = this.getMasterList(orderMasterReq);
|
||||||
// allList.addAll(masterList);
|
allList.addAll(masterList);
|
||||||
// 超时查询需要排除同个师傅的主单子单同时出现
|
// 超时查询需要排除同个师傅的主单子单同时出现
|
||||||
// if (orderListRequest.getTimeout() != null && orderListRequest.getTimeout() == 1) {
|
if (orderListRequest.getTimeout() != null && orderListRequest.getTimeout() == 1) {
|
||||||
// // 需要排除同个师傅的主单子单同时出现
|
// 需要排除同个师傅的主单子单同时出现
|
||||||
// List<OrderListResponse> filteredMasterList = new ArrayList<OrderListResponse>();
|
List<OrderListResponse> filteredMasterList = new ArrayList<OrderListResponse>();
|
||||||
// for (OrderListResponse master : allList) {
|
for (OrderListResponse master : allList) {
|
||||||
// boolean isKeep = false;
|
boolean isKeep = false;
|
||||||
// // 查询该主单下所有售后中的子单
|
// 查询该主单下所有售后中的子单
|
||||||
// OrderDetail detailAfterListOfMasterQry = new OrderDetail();
|
OrderDetail detailAfterListOfMasterQry = new OrderDetail();
|
||||||
// detailAfterListOfMasterQry.setOrderMasterCode(master.getOrderMasterCode());
|
detailAfterListOfMasterQry.setOrderMasterCode(master.getOrderMasterCode());
|
||||||
// List<OrderListResponse> detailListOfMasters = this.getDetailList(detailAfterListOfMasterQry);
|
List<OrderListResponse> detailListOfMasters = this.getDetailList(detailAfterListOfMasterQry);
|
||||||
// for (OrderListResponse detailListOfMaster : detailListOfMasters) {
|
for (OrderListResponse detailListOfMaster : detailListOfMasters) {
|
||||||
// if (!detailListOfMaster.getWorkerId().equals(orderListRequest.getWorkerId())) {
|
if (!detailListOfMaster.getWorkerId().equals(orderListRequest.getWorkerId())) {
|
||||||
// isKeep = true;
|
isKeep = true;
|
||||||
// break;
|
break;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// if (isKeep) {
|
if (isKeep) {
|
||||||
// filteredMasterList.add(master);
|
filteredMasterList.add(master);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// orderListResponses.addAll(filteredMasterList);
|
orderListResponses.addAll(filteredMasterList);
|
||||||
// } else {
|
} else {
|
||||||
orderListResponses.addAll(masterList);
|
orderListResponses.addAll(masterList);
|
||||||
// }
|
}
|
||||||
|
|
||||||
// 查询新订单列表根据创建时间倒叙排列,查询其他根据更新时间倒序排列
|
// 查询新订单列表根据创建时间倒叙排列,查询其他根据更新时间倒序排列
|
||||||
Collections.sort(orderListResponses, new Comparator<OrderListResponse>() {
|
Collections.sort(orderListResponses, new Comparator<OrderListResponse>() {
|
||||||
|
|
@ -1117,11 +1085,7 @@ public class OrderController extends BaseController {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
long count = detailAfterListOfMasters.stream().filter(x->(x.getAfterTimeout()!=null && x.getAfterTimeout() == 1)).count();
|
|
||||||
if (isKeep) {
|
if (isKeep) {
|
||||||
if(count > 0){
|
|
||||||
master.setAfterTimeout(1);
|
|
||||||
}
|
|
||||||
filteredMasterList.add(master);
|
filteredMasterList.add(master);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1403,7 +1367,6 @@ public class OrderController extends BaseController {
|
||||||
orderListResponse.setCustomerRemark(orderMaster.getRemark());
|
orderListResponse.setCustomerRemark(orderMaster.getRemark());
|
||||||
orderListResponse.setOrderType(detail.getOrderType());
|
orderListResponse.setOrderType(detail.getOrderType());
|
||||||
orderListResponse.setTimeout(detail.getTimeout());
|
orderListResponse.setTimeout(detail.getTimeout());
|
||||||
orderListResponse.setAfterTimeout(detail.getAfterTimeout());
|
|
||||||
orderListResponse.setAfterServiceRecordList(detailRecordMap.get(detail.getId()));
|
orderListResponse.setAfterServiceRecordList(detailRecordMap.get(detail.getId()));
|
||||||
orderListResponse.setChangeMoney(changeMoney);
|
orderListResponse.setChangeMoney(changeMoney);
|
||||||
orderListResponse.setDrawCashStatus(detail.getDrawCashStatus());
|
orderListResponse.setDrawCashStatus(detail.getDrawCashStatus());
|
||||||
|
|
@ -1697,7 +1660,6 @@ public class OrderController extends BaseController {
|
||||||
orderListResponse.setOrderType(detail.getOrderType());
|
orderListResponse.setOrderType(detail.getOrderType());
|
||||||
orderListResponse.setTimeout(detail.getTimeout());
|
orderListResponse.setTimeout(detail.getTimeout());
|
||||||
orderListResponse.setTimeoutFineTimes(detail.getTimeoutFineTimes());
|
orderListResponse.setTimeoutFineTimes(detail.getTimeoutFineTimes());
|
||||||
orderListResponse.setAfterTimeout(detail.getAfterTimeout());
|
|
||||||
orderListResponse.setChangeMoney(changeMoney);
|
orderListResponse.setChangeMoney(changeMoney);
|
||||||
orderListResponse.setCreateTime(detail.getCreateTime());
|
orderListResponse.setCreateTime(detail.getCreateTime());
|
||||||
orderListResponse.setUpdateTime(detail.getUpdateTime());
|
orderListResponse.setUpdateTime(detail.getUpdateTime());
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ import com.ghy.system.service.IWxMsgService;
|
||||||
import com.ghy.web.pojo.vo.OrderChangePriceRequest;
|
import com.ghy.web.pojo.vo.OrderChangePriceRequest;
|
||||||
import com.ghy.web.pojo.vo.OrderListResponse;
|
import com.ghy.web.pojo.vo.OrderListResponse;
|
||||||
import com.ghy.web.pojo.vo.OrderStandard;
|
import com.ghy.web.pojo.vo.OrderStandard;
|
||||||
import com.ghy.web.service.InsuranceService;
|
|
||||||
import com.ghy.worker.domain.Worker;
|
import com.ghy.worker.domain.Worker;
|
||||||
import com.ghy.worker.domain.WorkerCertification;
|
import com.ghy.worker.domain.WorkerCertification;
|
||||||
import com.ghy.worker.service.IWorkerCertificationService;
|
import com.ghy.worker.service.IWorkerCertificationService;
|
||||||
|
|
@ -113,8 +112,6 @@ public class OrderDetailController extends BaseController {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IInsuranceManagerService insuranceManagerService;
|
private IInsuranceManagerService insuranceManagerService;
|
||||||
@Autowired
|
|
||||||
private InsuranceService insuranceService;
|
|
||||||
|
|
||||||
@RequiresPermissions("order:detail:view")
|
@RequiresPermissions("order:detail:view")
|
||||||
@GetMapping()
|
@GetMapping()
|
||||||
|
|
@ -127,18 +124,7 @@ public class OrderDetailController extends BaseController {
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public TableDataInfo list(OrderDetail orderDetail) {
|
public TableDataInfo list(OrderDetail orderDetail) {
|
||||||
if (orderDetail.getSearchAfterList() !=null && orderDetail.getSearchAfterList()) {
|
if (orderDetail.getSearchAfterList() !=null && orderDetail.getSearchAfterList()) {
|
||||||
List<?> rows = this.afterServiceList(orderDetail).getRows();
|
return this.afterServiceList(orderDetail);
|
||||||
StringBuilder detailIds = new StringBuilder();
|
|
||||||
if(CollectionUtils.isNotEmpty(rows)){
|
|
||||||
rows.forEach(model->{
|
|
||||||
OrderListResponse response = (OrderListResponse)model;
|
|
||||||
detailIds.append(response.getOrderDetailId()).append(",");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
String ids = detailIds.toString();
|
|
||||||
if (org.apache.commons.lang3.StringUtils.isNotEmpty(ids)) {
|
|
||||||
orderDetail.setOrderDetailIds(ids.substring(0, ids.length() - 1));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(StringUtils.isNotEmpty(orderDetail.getWorkerName()) || StringUtils.isNotEmpty(orderDetail.getWorkerPhone())){
|
if(StringUtils.isNotEmpty(orderDetail.getWorkerName()) || StringUtils.isNotEmpty(orderDetail.getWorkerPhone())){
|
||||||
|
|
@ -946,13 +932,6 @@ public class OrderDetailController extends BaseController {
|
||||||
if (StringUtils.isNotEmpty(orderDetail.getClockInLocation())) {
|
if (StringUtils.isNotEmpty(orderDetail.getClockInLocation())) {
|
||||||
OrderDetail model = orderDetailService.selectById(orderDetail.getId());
|
OrderDetail model = orderDetailService.selectById(orderDetail.getId());
|
||||||
Customer customer = customerService.selectByCustomerId(model.getCustomerId());
|
Customer customer = customerService.selectByCustomerId(model.getCustomerId());
|
||||||
// 更新订单状态为上门
|
|
||||||
try {
|
|
||||||
insuranceService.clockInsurance(model.getId());
|
|
||||||
}catch (Exception e){
|
|
||||||
logger.error("订单上门返回异常:{}", e.getMessage());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
// 通知师傅新订单
|
// 通知师傅新订单
|
||||||
try {
|
try {
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
|
|
||||||
|
|
@ -131,17 +131,6 @@ public class OrderMasterController extends BaseController {
|
||||||
@Resource
|
@Resource
|
||||||
private IInsuranceManagerService insuranceManagerService;
|
private IInsuranceManagerService insuranceManagerService;
|
||||||
|
|
||||||
@PostMapping("/orderInsurance")
|
|
||||||
@ResponseBody
|
|
||||||
public AjaxResult orderInsurance(@RequestParam(value = "orderCode") String orderCode){
|
|
||||||
try {
|
|
||||||
insuranceService.orderInsurance(orderCode);
|
|
||||||
return AjaxResult.success();
|
|
||||||
}catch (Exception e){
|
|
||||||
return AjaxResult.error("保险未响应,请再次点击操作,或稍等再试【本单联通保险公司系统,操作此按键时开始投保,偶遇未响应,请间隔一两分钟再次点接单即可!】");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/changePrice/{orderIds}")
|
@GetMapping("/changePrice/{orderIds}")
|
||||||
public String changePrice(@PathVariable("orderIds") String orderIds, ModelMap mmap)
|
public String changePrice(@PathVariable("orderIds") String orderIds, ModelMap mmap)
|
||||||
{
|
{
|
||||||
|
|
@ -1161,8 +1150,6 @@ public class OrderMasterController extends BaseController {
|
||||||
orderStandardDetail.setDrawCashStatus(orderDetail.getDrawCashStatus());
|
orderStandardDetail.setDrawCashStatus(orderDetail.getDrawCashStatus());
|
||||||
orderStandardDetail.setDrawCashTime(orderDetail.getDrawCashTime());
|
orderStandardDetail.setDrawCashTime(orderDetail.getDrawCashTime());
|
||||||
|
|
||||||
orderStandardDetail.setAfterTimeout(orderDetail.getAfterTimeout());
|
|
||||||
|
|
||||||
orderStandardDetails.add(orderStandardDetail);
|
orderStandardDetails.add(orderStandardDetail);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1303,18 +1290,7 @@ public class OrderMasterController extends BaseController {
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public TableDataInfo list(OrderMaster orderMaster) {
|
public TableDataInfo list(OrderMaster orderMaster) {
|
||||||
if (orderMaster.getSearchAfterList() !=null && orderMaster.getSearchAfterList()) {
|
if (orderMaster.getSearchAfterList() !=null && orderMaster.getSearchAfterList()) {
|
||||||
List<?> rows = this.afterList(orderMaster).getRows();
|
return this.afterList(orderMaster);
|
||||||
StringBuilder masterIds = new StringBuilder();
|
|
||||||
if(CollectionUtils.isNotEmpty(rows)){
|
|
||||||
rows.forEach(model->{
|
|
||||||
OrderListResponse response = (OrderListResponse)model;
|
|
||||||
masterIds.append(response.getOrderMasterId()).append(",");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
String ids = masterIds.toString();
|
|
||||||
if (org.apache.commons.lang3.StringUtils.isNotEmpty(ids)) {
|
|
||||||
orderMaster.setOrderMasterIds(ids.substring(0, ids.length() - 1));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
startPage();
|
startPage();
|
||||||
|
|
@ -1508,14 +1484,14 @@ public class OrderMasterController extends BaseController {
|
||||||
// 下单
|
// 下单
|
||||||
if(orderMaster.getOrderStatus() != null && OrderStatus.PLAIN.code() == orderMaster.getOrderStatus()){
|
if(orderMaster.getOrderStatus() != null && OrderStatus.PLAIN.code() == orderMaster.getOrderStatus()){
|
||||||
OrderMaster model = orderMasterService.selectById(orderMaster.getId());
|
OrderMaster model = orderMasterService.selectById(orderMaster.getId());
|
||||||
// try {
|
try {
|
||||||
// if(model.getInsuranceId()!=null){
|
if(model.getInsuranceId()!=null){
|
||||||
// insuranceService.orderInsurance(model.getCode());
|
insuranceService.orderInsurance(model.getCode());
|
||||||
// }
|
}
|
||||||
// }catch (Exception e){
|
}catch (Exception e){
|
||||||
// logger.error("下单报错:" + ExceptionUtils.getMessage(e));
|
logger.error("下单报错:" + ExceptionUtils.getMessage(e));
|
||||||
// return AjaxResult.error("保险正生成中,可能需几秒或几分钟,请稍等即可!若超半小时可联系发单方或平台!");
|
return AjaxResult.error("保险正生成中,可能需几秒或几分钟,请稍等即可!若超半小时可联系发单方或平台!");
|
||||||
// }
|
}
|
||||||
// 判断是否是在线支付订单--如果是在线支付,且未付款,则需要提示支付后接单
|
// 判断是否是在线支付订单--如果是在线支付,且未付款,则需要提示支付后接单
|
||||||
if(PayTypeEnum.WX_LITE.getCode().equals(model.getPayType())){
|
if(PayTypeEnum.WX_LITE.getCode().equals(model.getPayType())){
|
||||||
// 查询财务信息
|
// 查询财务信息
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,6 @@ import com.ghy.common.enums.BusinessType;
|
||||||
import com.ghy.common.utils.ExceptionUtil;
|
import com.ghy.common.utils.ExceptionUtil;
|
||||||
import com.ghy.common.utils.poi.ExcelUtil;
|
import com.ghy.common.utils.poi.ExcelUtil;
|
||||||
import com.ghy.payment.domain.FinancialDetail;
|
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.payment.service.FinancialDetailService;
|
||||||
import com.ghy.web.pojo.vo.FinancialCountRequest;
|
import com.ghy.web.pojo.vo.FinancialCountRequest;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
@ -70,14 +68,6 @@ public class FinancialDetailController extends BaseController {
|
||||||
return getDataTable(list);
|
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)
|
@Log(title = "财务细单管理", businessType = BusinessType.EXPORT)
|
||||||
@RequiresPermissions("financial:detail:export")
|
@RequiresPermissions("financial:detail:export")
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
|
|
|
||||||
|
|
@ -316,7 +316,6 @@ public class WxController extends BaseController {
|
||||||
@GetMapping("/neCheck")
|
@GetMapping("/neCheck")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult neCheck(HttpServletRequest request) {
|
public AjaxResult neCheck(HttpServletRequest request) {
|
||||||
try {
|
|
||||||
String url;
|
String url;
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
String deptId = request.getHeader("deptId");
|
String deptId = request.getHeader("deptId");
|
||||||
|
|
@ -384,9 +383,6 @@ public class WxController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return AjaxResult.success(flag);
|
return AjaxResult.success(flag);
|
||||||
}catch (Exception e){
|
|
||||||
return AjaxResult.success(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ public class InsuranceOrderEditReq {
|
||||||
|
|
||||||
private String workerID;
|
private String workerID;
|
||||||
|
|
||||||
private String shangmenTime;
|
|
||||||
|
|
||||||
private String shangmenNum;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -163,8 +163,6 @@ public class OrderListResponse {
|
||||||
*/
|
*/
|
||||||
private Integer timeoutFineTimes;
|
private Integer timeoutFineTimes;
|
||||||
|
|
||||||
private Integer afterTimeout;
|
|
||||||
|
|
||||||
private String orderMode;
|
private String orderMode;
|
||||||
|
|
||||||
/*是否合约订单*/
|
/*是否合约订单*/
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,4 @@ public class OrderStandardDetail {
|
||||||
*/
|
*/
|
||||||
private Integer timeoutFineTimes;
|
private Integer timeoutFineTimes;
|
||||||
|
|
||||||
private Integer afterTimeout;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,6 @@ import com.ghy.order.domain.OrderDetailInsuranceUser;
|
||||||
|
|
||||||
public interface InsuranceService {
|
public interface InsuranceService {
|
||||||
|
|
||||||
void clockInsurance(Long orderDetailId) throws Exception;
|
|
||||||
|
|
||||||
void orderInsurance(String orderCode) throws Exception;
|
void orderInsurance(String orderCode) throws Exception;
|
||||||
|
|
||||||
void editInsurance(OrderDetailInsuranceUser orderDetailInsuranceUser) throws Exception ;
|
void editInsurance(OrderDetailInsuranceUser orderDetailInsuranceUser) throws Exception ;
|
||||||
|
|
|
||||||
|
|
@ -58,9 +58,6 @@ public class InsuranceServiceImpl implements InsuranceService {
|
||||||
public void orderInsurance(String orderCode) throws Exception{
|
public void orderInsurance(String orderCode) throws Exception{
|
||||||
InsuranceOrderReq req = new InsuranceOrderReq();
|
InsuranceOrderReq req = new InsuranceOrderReq();
|
||||||
OrderMaster master = orderMasterService.selectByCode(orderCode);
|
OrderMaster master = orderMasterService.selectByCode(orderCode);
|
||||||
if(master.getInsuranceId() == null){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
req.setOrderNumber(master.getCode());
|
req.setOrderNumber(master.getCode());
|
||||||
req.setRequestNo(master.getCode() + System.currentTimeMillis());
|
req.setRequestNo(master.getCode() + System.currentTimeMillis());
|
||||||
req.setSign(Md5Utils.hash(req.getRequestNo() + req.getChannelCode() + Key));
|
req.setSign(Md5Utils.hash(req.getRequestNo() + req.getChannelCode() + Key));
|
||||||
|
|
@ -78,7 +75,7 @@ public class InsuranceServiceImpl implements InsuranceService {
|
||||||
log.info("调用保险请求url:{},内容:{}", baseUrl+"/platInterface/order", JSONUtil.toJsonStr(req));
|
log.info("调用保险请求url:{},内容:{}", baseUrl+"/platInterface/order", JSONUtil.toJsonStr(req));
|
||||||
String result = HttpUtil.post(baseUrl+"/platInterface/order", JSONUtil.toJsonStr(req));
|
String result = HttpUtil.post(baseUrl+"/platInterface/order", JSONUtil.toJsonStr(req));
|
||||||
log.info("调用保险返回内容:{}", result);
|
log.info("调用保险返回内容:{}", result);
|
||||||
if(!"1".equals(JSONObject.parseObject(result).getString("code")) && !JSONObject.parseObject(result).getString("msg").contains("已存在该工单")){
|
if(!"1".equals(JSONObject.parseObject(result).getString("code"))){
|
||||||
throw new Exception(JSONObject.parseObject(result).getString("msg"));
|
throw new Exception(JSONObject.parseObject(result).getString("msg"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -127,27 +124,4 @@ public class InsuranceServiceImpl implements InsuranceService {
|
||||||
throw new Exception(JSONObject.parseObject(result).getString("msg"));
|
throw new Exception(JSONObject.parseObject(result).getString("msg"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void clockInsurance(Long orderDetailId) throws Exception {
|
|
||||||
// 查询子单
|
|
||||||
OrderDetail detail = orderDetailService.selectById(orderDetailId);
|
|
||||||
// 查询主单
|
|
||||||
OrderMaster master = orderMasterService.selectById(detail.getOrderMasterId());
|
|
||||||
if(master.getInsuranceId() != null){
|
|
||||||
InsuranceOrderEditReq editReq = new InsuranceOrderEditReq();
|
|
||||||
editReq.setOrderNumber(master.getCode());
|
|
||||||
editReq.setRequestNo(master.getCode() + System.currentTimeMillis());
|
|
||||||
editReq.setSign(Md5Utils.hash(editReq.getRequestNo() + editReq.getChannelCode() + Key));
|
|
||||||
editReq.setOrderNumber(master.getCode());
|
|
||||||
editReq.setShangmenTime(DateUtil.format(new Date(), DatePattern.NORM_DATETIME_PATTERN));
|
|
||||||
editReq.setShangmenNum("1");
|
|
||||||
log.info("调用保险请求url:{},内容:{}", baseUrl+"/platInterface/service", JSONUtil.toJsonStr(editReq));
|
|
||||||
String result = HttpUtil.post(baseUrl+"/platInterface/service", JSONUtil.toJsonStr(editReq));
|
|
||||||
log.info("调用保险返回内容:{}", result);
|
|
||||||
if(!"1".equals(JSONObject.parseObject(result).getString("code"))){
|
|
||||||
throw new Exception(JSONObject.parseObject(result).getString("msg"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,9 +60,6 @@
|
||||||
<if test="openId != null and openId != ''">
|
<if test="openId != null and openId != ''">
|
||||||
AND open_id = #{openId}
|
AND open_id = #{openId}
|
||||||
</if>
|
</if>
|
||||||
<if test="placeStatus != null and placeStatus != ''">
|
|
||||||
AND place_status = #{placeStatus}
|
|
||||||
</if>
|
|
||||||
<if test="customerPlace != null and customerPlace != ''">
|
<if test="customerPlace != null and customerPlace != ''">
|
||||||
AND customer_place = #{customerPlace}
|
AND customer_place = #{customerPlace}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
|
|
@ -89,14 +89,14 @@
|
||||||
<if test="isSure != null">is_sure = #{isSure},</if>
|
<if test="isSure != null">is_sure = #{isSure},</if>
|
||||||
<if test="isCert != null">is_cert = #{isCert},</if>
|
<if test="isCert != null">is_cert = #{isCert},</if>
|
||||||
<if test="deptRate != null and deptRate != ''">dept_rate = #{deptRate},</if>
|
<if test="deptRate != null and deptRate != ''">dept_rate = #{deptRate},</if>
|
||||||
<if test="deptMoney != null">dept_money = #{deptMoney},</if>
|
<if test="deptMoney != null and deptMoney != ''">dept_money = #{deptMoney},</if>
|
||||||
<if test="retainRate != null and retainRate != ''">retain_rate = #{retainRate},</if>
|
<if test="retainRate != null and retainRate != ''">retain_rate = #{retainRate},</if>
|
||||||
<if test="retainMoney != null">retain_money = #{retainMoney},</if>
|
<if test="retainMoney != null and retainMoney != ''">retain_money = #{retainMoney},</if>
|
||||||
|
|
||||||
<if test="pcDeptRate != null and pcDeptRate != ''">pc_dept_rate = #{pcDeptRate},</if>
|
<if test="pcDeptRate != null and pcDeptRate != ''">pc_dept_rate = #{pcDeptRate},</if>
|
||||||
<if test="pcDeptMoney != null">pc_dept_money = #{pcDeptMoney},</if>
|
<if test="pcDeptMoney != null and pcDeptMoney != ''">pc_dept_money = #{pcDeptMoney},</if>
|
||||||
<if test="pcRetainRate != null and pcRetainRate != ''">pc_retain_rate = #{pcRetainRate},</if>
|
<if test="pcRetainRate != null and pcRetainRate != ''">pc_retain_rate = #{pcRetainRate},</if>
|
||||||
<if test="pcRetainMoney != null">pc_retain_money = #{pcRetainMoney},</if>
|
<if test="pcRetainMoney != null and pcRetainMoney != ''">pc_retain_money = #{pcRetainMoney},</if>
|
||||||
|
|
||||||
<if test="categorySort != null">category_sort = #{categorySort},</if>
|
<if test="categorySort != null">category_sort = #{categorySort},</if>
|
||||||
<if test="oneRate != null and oneRate != ''">one_rate = #{oneRate},</if>
|
<if test="oneRate != null and oneRate != ''">one_rate = #{oneRate},</if>
|
||||||
|
|
|
||||||
|
|
@ -172,11 +172,6 @@ public class OrderDetail extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
private Integer timeout;
|
private Integer timeout;
|
||||||
|
|
||||||
/**
|
|
||||||
* 售后是否超时 1=是 0=否
|
|
||||||
* */
|
|
||||||
private Integer afterTimeout;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 超时扣款次数
|
* 超时扣款次数
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -87,8 +87,6 @@ public interface OrderDetailMapper {
|
||||||
*/
|
*/
|
||||||
int updateTimeout(@Param("id") Long id, @Param("timeout") int timeout, @Param("timeoutFineTimes") int timeoutFineTimes);
|
int updateTimeout(@Param("id") Long id, @Param("timeout") int timeout, @Param("timeoutFineTimes") int timeoutFineTimes);
|
||||||
|
|
||||||
int updateAfterTimeout(@Param("id") Long id, @Param("timeout") int timeout, @Param("timeoutFineTimes") int timeoutFineTimes);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过主订单ID批量更新子订单
|
* 通过主订单ID批量更新子订单
|
||||||
* 可更新字段: orderStatus
|
* 可更新字段: orderStatus
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,4 @@ public interface OrderMasterMapper {
|
||||||
|
|
||||||
// 根据开始/结算时间进行查询有效的订单主数据。
|
// 根据开始/结算时间进行查询有效的订单主数据。
|
||||||
List<OrderMaster> searchByOrderStartTime(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
|
List<OrderMaster> searchByOrderStartTime(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
|
||||||
|
|
||||||
int updateCreateTime(Long id);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -175,8 +175,6 @@ public interface OrderDetailService {
|
||||||
*/
|
*/
|
||||||
int updateTimeout(Long id, int timeout, int timeoutFineTimes);
|
int updateTimeout(Long id, int timeout, int timeoutFineTimes);
|
||||||
|
|
||||||
int updateAfterTimeout(Long id, int timeout, int timeoutFineTimes);
|
|
||||||
|
|
||||||
int deleteByMaster(Long masterId);
|
int deleteByMaster(Long masterId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -149,8 +149,6 @@ public interface OrderMasterService {
|
||||||
*/
|
*/
|
||||||
int updateTimeout(Long id, int timeout);
|
int updateTimeout(Long id, int timeout);
|
||||||
|
|
||||||
int updateCreateTime(Long id);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新子订单超时状态
|
* 更新子订单超时状态
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -78,12 +78,8 @@ public class AfterServiceRecordServiceImpl implements IAfterServiceRecordService
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<AfterServiceRecord> selectAfterServiceRecordList(AfterServiceRecord afterServiceRecord) {
|
public List<AfterServiceRecord> selectAfterServiceRecordList(AfterServiceRecord afterServiceRecord) {
|
||||||
if(afterServiceRecord == null){
|
|
||||||
afterServiceRecord = new AfterServiceRecord();
|
|
||||||
afterServiceRecord.setNeedImgs(false);
|
|
||||||
}
|
|
||||||
List<AfterServiceRecord> list = afterServiceRecordMapper.selectAfterServiceRecordList(afterServiceRecord);
|
List<AfterServiceRecord> list = afterServiceRecordMapper.selectAfterServiceRecordList(afterServiceRecord);
|
||||||
if(afterServiceRecord.getNeedImgs() != null && !afterServiceRecord.getNeedImgs()){
|
if(!afterServiceRecord.getNeedImgs()){
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
list.forEach(record -> {
|
list.forEach(record -> {
|
||||||
|
|
@ -146,8 +142,6 @@ public class AfterServiceRecordServiceImpl implements IAfterServiceRecordService
|
||||||
Assert.notNull(afterServiceRecord, "售后记录不存在!");
|
Assert.notNull(afterServiceRecord, "售后记录不存在!");
|
||||||
OrderDetail orderDetail = orderDetailService.selectById(afterServiceRecord.getOrderDetailId());
|
OrderDetail orderDetail = orderDetailService.selectById(afterServiceRecord.getOrderDetailId());
|
||||||
boolean drawCash = orderDetail.getDrawCashTime() != null;
|
boolean drawCash = orderDetail.getDrawCashTime() != null;
|
||||||
// 更新为售后未超时
|
|
||||||
orderDetailService.updateAfterTimeout(afterServiceRecord.getOrderDetailId(), 0, 0);
|
|
||||||
if (one.equals(param.getCustomerFinalCheck()) && one.equals(afterServiceRecord.getWorkerFeedbackResult())) {
|
if (one.equals(param.getCustomerFinalCheck()) && one.equals(afterServiceRecord.getWorkerFeedbackResult())) {
|
||||||
// 师傅同意 且 客户同意退款
|
// 师傅同意 且 客户同意退款
|
||||||
afterServiceRecord.setCustomerFinalCheck(1L);
|
afterServiceRecord.setCustomerFinalCheck(1L);
|
||||||
|
|
@ -162,7 +156,6 @@ public class AfterServiceRecordServiceImpl implements IAfterServiceRecordService
|
||||||
} else {
|
} else {
|
||||||
agreeRefund(afterServiceRecord);
|
agreeRefund(afterServiceRecord);
|
||||||
}
|
}
|
||||||
// orderDetailService.updateAfterTimeout(afterServiceRecord.getOrderDetailId(), 0, 0);
|
|
||||||
} else if (one.equals(afterServiceRecord.getWorkerFeedbackResult()) && param.getCustomerFinalCheck() == null) {
|
} else if (one.equals(afterServiceRecord.getWorkerFeedbackResult()) && param.getCustomerFinalCheck() == null) {
|
||||||
// 师傅同意 且 客户未处理
|
// 师傅同意 且 客户未处理
|
||||||
afterServiceRecordMapper.updateAfterServiceRecord(param);
|
afterServiceRecordMapper.updateAfterServiceRecord(param);
|
||||||
|
|
|
||||||
|
|
@ -110,9 +110,6 @@ public class OrderDetailServiceImpl implements OrderDetailService {
|
||||||
@Resource
|
@Resource
|
||||||
private IOrderAttachmentRecordService orderAttachmentRecordService;
|
private IOrderAttachmentRecordService orderAttachmentRecordService;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private IOrderCallRecordService orderCallRecordService;
|
|
||||||
|
|
||||||
// Adapay 手续费率 默认0.008
|
// Adapay 手续费率 默认0.008
|
||||||
@Value("${adapay.fee_rate:0.008}")
|
@Value("${adapay.fee_rate:0.008}")
|
||||||
private String feeRate;
|
private String feeRate;
|
||||||
|
|
@ -199,26 +196,7 @@ public class OrderDetailServiceImpl implements OrderDetailService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<OrderDetail> selectOrderDetailList(OrderDetail orderDetail) {
|
public List<OrderDetail> selectOrderDetailList(OrderDetail orderDetail) {
|
||||||
List<OrderDetail> result = new ArrayList<>();
|
return orderDetailMapper.selectOrderDetailList(orderDetail);
|
||||||
List<OrderDetail> orderDetails = orderDetailMapper.selectOrderDetailList(orderDetail);
|
|
||||||
orderDetails.forEach(model->{
|
|
||||||
if(StringUtils.isNotEmpty(orderDetail.getIsCall())){
|
|
||||||
OrderCallRecord param = new OrderCallRecord();
|
|
||||||
// param.setOrderType("02");
|
|
||||||
param.setOrderId(model.getId());
|
|
||||||
List<OrderCallRecord> list = orderCallRecordService.selectOrderCallRecordList(param);
|
|
||||||
// 用于判断是约 还是 排的问题
|
|
||||||
if("01".equals(orderDetail.getIsCall()) && CollectionUtils.isEmpty(list)){
|
|
||||||
result.add(model);
|
|
||||||
}
|
|
||||||
if("02".equals(orderDetail.getIsCall()) && CollectionUtils.isNotEmpty(list)){
|
|
||||||
result.add(model);
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
result.add(model);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -650,7 +628,6 @@ public class OrderDetailServiceImpl implements OrderDetailService {
|
||||||
} else {
|
} else {
|
||||||
// 没有罚金 自己承担手续费
|
// 没有罚金 自己承担手续费
|
||||||
divMembers.add(new DivMember(memberId, MoneyUtil.toS(odMoney), true));
|
divMembers.add(new DivMember(memberId, MoneyUtil.toS(odMoney), true));
|
||||||
// 平台金额部分抽出来部分承担手续费
|
|
||||||
}
|
}
|
||||||
String orderNo = "OD_" + orderDetailId + "_" + System.currentTimeMillis();
|
String orderNo = "OD_" + orderDetailId + "_" + System.currentTimeMillis();
|
||||||
logger.info("子订单[{}]发起分账: {}", orderDetailId, JSON.toJSONString(divMembers));
|
logger.info("子订单[{}]发起分账: {}", orderDetailId, JSON.toJSONString(divMembers));
|
||||||
|
|
@ -1128,11 +1105,6 @@ public class OrderDetailServiceImpl implements OrderDetailService {
|
||||||
return orderDetailMapper.updateTimeout(id, timeout, timeoutFineTimes);
|
return orderDetailMapper.updateTimeout(id, timeout, timeoutFineTimes);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int updateAfterTimeout(Long id, int timeout, int timeoutFineTimes) {
|
|
||||||
return orderDetailMapper.updateAfterTimeout(id, timeout, timeoutFineTimes);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int deleteByMaster(Long masterId) {
|
public int deleteByMaster(Long masterId) {
|
||||||
return orderDetailMapper.deleteByMaster(masterId);
|
return orderDetailMapper.deleteByMaster(masterId);
|
||||||
|
|
|
||||||
|
|
@ -559,11 +559,6 @@ public class OrderMasterServiceImpl implements OrderMasterService {
|
||||||
return orderMasterMapper.updateTimeout(id, timeout, null);
|
return orderMasterMapper.updateTimeout(id, timeout, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int updateCreateTime(Long id) {
|
|
||||||
return orderMasterMapper.updateCreateTime(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int updateTimeout(Long id, int timeout, int timeoutFineTimes) {
|
public int updateTimeout(Long id, int timeout, int timeoutFineTimes) {
|
||||||
return orderMasterMapper.updateTimeout(id, timeout, timeoutFineTimes);
|
return orderMasterMapper.updateTimeout(id, timeout, timeoutFineTimes);
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@
|
||||||
<result property="updateTime" column="update_time"/>
|
<result property="updateTime" column="update_time"/>
|
||||||
<result property="remark" column="remark"/>
|
<result property="remark" column="remark"/>
|
||||||
<result property="timeout" column="timeout_"/>
|
<result property="timeout" column="timeout_"/>
|
||||||
<result property="afterTimeout" column="after_timeout"/>
|
|
||||||
<result property="timeoutFineTimes" column="timeout_fine_times"/>
|
<result property="timeoutFineTimes" column="timeout_fine_times"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
@ -61,8 +60,7 @@
|
||||||
update_time,
|
update_time,
|
||||||
remark,
|
remark,
|
||||||
timeout_,
|
timeout_,
|
||||||
timeout_fine_times,
|
timeout_fine_times
|
||||||
after_timeout
|
|
||||||
FROM order_detail
|
FROM order_detail
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
@ -93,8 +91,7 @@
|
||||||
od.remark,
|
od.remark,
|
||||||
od.draw_cash_status,
|
od.draw_cash_status,
|
||||||
od.timeout_,
|
od.timeout_,
|
||||||
od.timeout_fine_times,
|
od.timeout_fine_times
|
||||||
od.after_timeout
|
|
||||||
FROM order_detail od
|
FROM order_detail od
|
||||||
LEFT JOIN order_master om ON om.id = od.order_master_id
|
LEFT JOIN order_master om ON om.id = od.order_master_id
|
||||||
LEFT JOIN customer_address ca ON ca.customer_address_id = om.address_id
|
LEFT JOIN customer_address ca ON ca.customer_address_id = om.address_id
|
||||||
|
|
@ -211,9 +208,9 @@
|
||||||
<if test="timeout != null">
|
<if test="timeout != null">
|
||||||
AND od.timeout_ = #{timeout}
|
AND od.timeout_ = #{timeout}
|
||||||
</if>
|
</if>
|
||||||
<!-- <if test="isCall != null">-->
|
<if test="isCall != null">
|
||||||
<!-- AND om.is_call = #{isCall}-->
|
AND om.is_call = #{isCall}
|
||||||
<!-- </if>-->
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by od.create_time
|
order by od.create_time
|
||||||
<trim suffixOverrides=",">
|
<trim suffixOverrides=",">
|
||||||
|
|
@ -376,14 +373,6 @@
|
||||||
WHERE id = #{id}
|
WHERE id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="updateAfterTimeout">
|
|
||||||
UPDATE order_detail
|
|
||||||
SET after_timeout = #{timeout},
|
|
||||||
timeout_fine_times = #{timeoutFineTimes},
|
|
||||||
update_time = SYSDATE()
|
|
||||||
WHERE id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<update id="updateByOrderMasterId">
|
<update id="updateByOrderMasterId">
|
||||||
UPDATE order_detail
|
UPDATE order_detail
|
||||||
<set>
|
<set>
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@
|
||||||
AND ca.country_id = #{district}
|
AND ca.country_id = #{district}
|
||||||
</if>
|
</if>
|
||||||
<if test="isMonitoredOrder">
|
<if test="isMonitoredOrder">
|
||||||
AND (om.all_self_assigned = 0 or om.all_self_assigned is null) AND om.order_status in (0,1,2,3,4) and om.worker_id is not null
|
AND (om.all_self_assigned = 0 or om.all_self_assigned is null) AND om.order_status in (1,2,3,4)
|
||||||
</if>
|
</if>
|
||||||
<if test="allSelfAssigned != null">
|
<if test="allSelfAssigned != null">
|
||||||
AND all_self_assigned = #{allSelfAssigned}
|
AND all_self_assigned = #{allSelfAssigned}
|
||||||
|
|
@ -512,12 +512,6 @@
|
||||||
WHERE id = #{id}
|
WHERE id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="updateCreateTime">
|
|
||||||
UPDATE order_master
|
|
||||||
SET create_time = SYSDATE()
|
|
||||||
WHERE id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<update id="removeWorker">
|
<update id="removeWorker">
|
||||||
UPDATE order_master
|
UPDATE order_master
|
||||||
SET worker_id = NULL,
|
SET worker_id = NULL,
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
package com.ghy.payment.mapper;
|
package com.ghy.payment.mapper;
|
||||||
|
|
||||||
import com.ghy.payment.domain.FinancialDetail;
|
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 com.ghy.payment.response.FinancialCountResponse;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
|
@ -46,8 +44,6 @@ public interface FinancialDetailMapper {
|
||||||
*/
|
*/
|
||||||
List<FinancialDetail> selectFinancialDetailList(FinancialDetail financialDetail);
|
List<FinancialDetail> selectFinancialDetailList(FinancialDetail financialDetail);
|
||||||
|
|
||||||
List<FinancialAccountBillResp> selectFinancialDetailListV2(FinancialAccountBillReq financialAccountBillReq);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param financialDetailId 财务细单id
|
* @param financialDetailId 财务细单id
|
||||||
* @return 财务细单
|
* @return 财务细单
|
||||||
|
|
|
||||||
|
|
@ -1,83 +0,0 @@
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
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,8 +7,6 @@ import java.util.List;
|
||||||
@Data
|
@Data
|
||||||
public class FinancialCountResponse {
|
public class FinancialCountResponse {
|
||||||
|
|
||||||
private String orderCode;
|
|
||||||
|
|
||||||
private String createTime;
|
private String createTime;
|
||||||
|
|
||||||
private String payCount;
|
private String payCount;
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
package com.ghy.payment.service;
|
package com.ghy.payment.service;
|
||||||
|
|
||||||
import com.ghy.payment.domain.FinancialDetail;
|
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 com.ghy.payment.response.FinancialCountResponse;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -125,7 +123,4 @@ public interface FinancialDetailService {
|
||||||
* @param reverseId Adapay撤销支付ID
|
* @param reverseId Adapay撤销支付ID
|
||||||
*/
|
*/
|
||||||
void refundSucceeded(String reverseId);
|
void refundSucceeded(String reverseId);
|
||||||
|
|
||||||
List<FinancialAccountBillResp> selectFinancialDetailListV2(FinancialAccountBillReq financialAccountBillReq);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,6 @@ import com.ghy.common.core.text.Convert;
|
||||||
import com.ghy.common.enums.FinancialDetailType;
|
import com.ghy.common.enums.FinancialDetailType;
|
||||||
import com.ghy.payment.domain.FinancialDetail;
|
import com.ghy.payment.domain.FinancialDetail;
|
||||||
import com.ghy.payment.mapper.FinancialDetailMapper;
|
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.response.FinancialCountResponse;
|
||||||
import com.ghy.payment.service.FinancialDetailService;
|
import com.ghy.payment.service.FinancialDetailService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -95,26 +93,6 @@ public class FinancialDetailServiceImpl implements FinancialDetailService {
|
||||||
return financialDetailMapper.selectFinancialDetailList(financialDetail);
|
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
|
@Override
|
||||||
public FinancialDetail selectById(Long financialDetailId) {
|
public FinancialDetail selectById(Long financialDetailId) {
|
||||||
return financialDetailMapper.selectById(financialDetailId);
|
return financialDetailMapper.selectById(financialDetailId);
|
||||||
|
|
|
||||||
|
|
@ -28,16 +28,6 @@
|
||||||
<result property="remark" column="remark"/>
|
<result property="remark" column="remark"/>
|
||||||
</resultMap>
|
</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">
|
<resultMap id="countResult" type="com.ghy.payment.response.FinancialCountResponse">
|
||||||
<result property="createTime" column="create_time"/>
|
<result property="createTime" column="create_time"/>
|
||||||
<result property="payCount" column="pay_count"/>
|
<result property="payCount" column="pay_count"/>
|
||||||
|
|
@ -107,51 +97,6 @@
|
||||||
order by fd.create_time desc
|
order by fd.create_time desc
|
||||||
</select>
|
</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">
|
<select id="selectById" parameterType="long" resultMap="FinancialDetailResult">
|
||||||
<include refid="selectFinancialDetail"/> WHERE id = #{financialDetailId}
|
<include refid="selectFinancialDetail"/> WHERE id = #{financialDetailId}
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,8 @@
|
||||||
package com.ghy.quartz.service.impl;
|
package com.ghy.quartz.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
|
||||||
import com.ghy.common.enums.OrderStatus;
|
import com.ghy.common.enums.OrderStatus;
|
||||||
import com.ghy.order.domain.AfterServiceRecord;
|
|
||||||
import com.ghy.order.domain.OrderDetail;
|
import com.ghy.order.domain.OrderDetail;
|
||||||
import com.ghy.order.domain.OrderMaster;
|
import com.ghy.order.domain.OrderMaster;
|
||||||
import com.ghy.order.service.IAfterServiceRecordService;
|
|
||||||
import com.ghy.order.service.OrderDetailService;
|
import com.ghy.order.service.OrderDetailService;
|
||||||
import com.ghy.order.service.OrderMasterService;
|
import com.ghy.order.service.OrderMasterService;
|
||||||
import com.ghy.payment.domain.FinancialDetail;
|
import com.ghy.payment.domain.FinancialDetail;
|
||||||
|
|
@ -45,7 +42,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
*
|
*
|
||||||
* @see OrderStatus
|
* @see OrderStatus
|
||||||
*/
|
*/
|
||||||
@Value("${order.timeout.status:-4,-3,-2,-1,0,2,1,3}")
|
@Value("${order.timeout.status:-4,-3,-2,0,2,1,3}")
|
||||||
private List<Integer> timeoutOrderStatus;
|
private List<Integer> timeoutOrderStatus;
|
||||||
private static final List<Integer> orderMasterTimeoutStatus = Arrays.asList(0, 1);
|
private static final List<Integer> orderMasterTimeoutStatus = Arrays.asList(0, 1);
|
||||||
|
|
||||||
|
|
@ -63,8 +60,6 @@ public class OrderServiceImpl implements OrderService {
|
||||||
private FinancialMasterService financialMasterService;
|
private FinancialMasterService financialMasterService;
|
||||||
@Resource
|
@Resource
|
||||||
private ISysDeptConfigService sysDeptConfigService;
|
private ISysDeptConfigService sysDeptConfigService;
|
||||||
@Resource
|
|
||||||
private IAfterServiceRecordService afterServiceRecordService;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void overTimeOrder(String orderStatus) {
|
public void overTimeOrder(String orderStatus) {
|
||||||
|
|
@ -131,7 +126,6 @@ public class OrderServiceImpl implements OrderService {
|
||||||
// 已超时 45min后取消超时状态 清空workerId
|
// 已超时 45min后取消超时状态 清空workerId
|
||||||
orderMasterService.updateTimeout(order.getId(), 0);
|
orderMasterService.updateTimeout(order.getId(), 0);
|
||||||
orderMasterService.removeWorker(order.getId());
|
orderMasterService.removeWorker(order.getId());
|
||||||
orderMasterService.updateCreateTime(order.getId());
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -193,18 +187,6 @@ public class OrderServiceImpl implements OrderService {
|
||||||
boolean timeout = ONE.equals(order.getTimeout());
|
boolean timeout = ONE.equals(order.getTimeout());
|
||||||
// 超时扣款次数
|
// 超时扣款次数
|
||||||
Integer times = order.getTimeoutFineTimes();
|
Integer times = order.getTimeoutFineTimes();
|
||||||
// 判断是否是售后订单
|
|
||||||
AfterServiceRecord afterParam = new AfterServiceRecord();
|
|
||||||
afterParam.setOrderDetailId(order.getId());
|
|
||||||
List<AfterServiceRecord> afterServiceRecord = afterServiceRecordService.selectAfterServiceRecordList(afterParam);
|
|
||||||
if(CollectionUtil.isNotEmpty(afterServiceRecord) && (afterServiceRecord.get(0).getCustomerFinalCheck() == null || afterServiceRecord.get(0).getCustomerFinalCheck() != 1L)){
|
|
||||||
// 查询一下售后单时间
|
|
||||||
Date afterTime = getOverTime(afterServiceRecord.get(0).getUpdateTime(), 30 * 60 * 1000);
|
|
||||||
if (afterTime.before(now)) {
|
|
||||||
log.info("售后订单[{}]超时30分钟", order.getId());
|
|
||||||
orderDetailService.updateAfterTimeout(order.getId(), 1, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!timeout) {
|
if (!timeout) {
|
||||||
log.info("单号:{},状态:{},创建时间:{},更新时间:{}", order.getCode(), order.getOrderStatus(), order.getCreateTime(), order.getUpdateTime());
|
log.info("单号:{},状态:{},创建时间:{},更新时间:{}", order.getCode(), order.getOrderStatus(), order.getCreateTime(), order.getUpdateTime());
|
||||||
// 待上门超时
|
// 待上门超时
|
||||||
|
|
@ -223,7 +205,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
// 未超时的单
|
// 未超时的单
|
||||||
else if (order.getOrderStatus().equals(OrderStatus.SERVER.code())) {
|
else if (order.getOrderStatus().equals(OrderStatus.SERVER.code())) {
|
||||||
// 服务中状态要按预计上门时间计算4h超时
|
// 服务中状态要按预计上门时间计算4h超时
|
||||||
Date overTime = DateUtils.addMilliseconds(order.getUpdateTime(), 4 * 60 * 60 * 1000);
|
Date overTime = DateUtils.addMilliseconds(order.getExpectTimeStart(), 4 * 60 * 60 * 1000);
|
||||||
if (overTime.before(now)) {
|
if (overTime.before(now)) {
|
||||||
log.info("订单[{}]服务中状态超时4小时 扣款", order.getId());
|
log.info("订单[{}]服务中状态超时4小时 扣款", order.getId());
|
||||||
OrderTimeoutRecord record = new OrderTimeoutRecord(order.getId(), order.getWorkerId(), order.getDeptId(), order.getOrderStatus());
|
OrderTimeoutRecord record = new OrderTimeoutRecord(order.getId(), order.getWorkerId(), order.getDeptId(), order.getOrderStatus());
|
||||||
|
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
package com.ghy.system.domain;
|
|
||||||
|
|
||||||
import com.ghy.common.core.domain.BaseEntity;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>轮播图管理</p>
|
|
||||||
* @author clunt
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class SysBanner extends BaseEntity {
|
|
||||||
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
private String bannerUrl;
|
|
||||||
|
|
||||||
private String bannerTitle;
|
|
||||||
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue