|
@@ -83,8 +83,7 @@ public class TOrderController {
|
|
|
public ResponseModel<IPage<?>> pageOrder(String equipmentId, String adminId, String adminType,
|
|
|
String type, String sn, String status, String userName,
|
|
|
String payType, String productNo, String clientId,
|
|
|
- String trxNo, String dateType, String startDate, String companyType,
|
|
|
- String endDate, long current, long size) {
|
|
|
+ String trxNo, String dateType, String startDate, String companyType, String machineType, String endDate, long current, long size) {
|
|
|
//判断当前账号状态
|
|
|
TAdmin admin = R.getDataIfSuccess(szwlFeign.getAdmin(adminId));
|
|
|
if (StringUtils.isEmpty(type)) {
|
|
@@ -214,6 +213,15 @@ public class TOrderController {
|
|
|
query.eq(TOrder::getCompanyType, companyType);
|
|
|
}
|
|
|
}
|
|
|
+ if (StringUtils.isNotEmpty(machineType)) {
|
|
|
+ if (machineType.equals("0")) {
|
|
|
+ query.isNull(TOrder::getMachineType).or()
|
|
|
+ .eq(TOrder::getMachineType, machineType);
|
|
|
+ } else {
|
|
|
+ query.eq(TOrder::getMachineType, machineType);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (StringUtils.isNotEmpty(clientId)) {
|
|
|
TEquipment equipment = R.getDataIfSuccess(szwlFeign.findEquipmentByClientId(clientId));
|
|
|
//判断机器是否属于这个登陆账号
|
|
@@ -572,11 +580,6 @@ public class TOrderController {
|
|
|
return R.fail(ResponseCodesEnum.A0001);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 获取首页数据统计
|
|
|
- *
|
|
|
- * @return
|
|
|
- */
|
|
|
private String isForeignUser(String userId) {
|
|
|
if (StringUtils.isNotEmpty(userId)) {
|
|
|
try {
|
|
@@ -1290,10 +1293,11 @@ public class TOrderController {
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/orderExport", method = RequestMethod.GET)
|
|
|
- public Object orderExport(HttpServletResponse response, String adminId, String adminType,
|
|
|
- String type, String userName, String payType, String productNo,
|
|
|
- String clientId, String dateType, String startDate, String endDate,
|
|
|
- String status, String equipmentId, long current, long size) throws ParseException {
|
|
|
+ public Object orderExport(HttpServletResponse response, String equipmentId, String adminId,
|
|
|
+ String adminType, String type, String status, String userName,
|
|
|
+ String payType, String productNo, String clientId, String dateType,
|
|
|
+ String startDate, String endDate, String companyType, String machineType,
|
|
|
+ long current, long size) throws ParseException {
|
|
|
current = 1L;
|
|
|
size = 1000L;
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
@@ -1503,6 +1507,32 @@ public class TOrderController {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ // 公司平台
|
|
|
+ // 申泽平台管理员
|
|
|
+ if (admin.getId() == 2738) {
|
|
|
+ companyType = "0";
|
|
|
+ }
|
|
|
+ // 七云平台管理员
|
|
|
+ if (admin.getId() == 2739) {
|
|
|
+ companyType = "1";
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(companyType)) {
|
|
|
+ if (companyType.equals("0")) {
|
|
|
+ query.isNull(TOrder::getCompanyType).or()
|
|
|
+ .eq(TOrder::getCompanyType, companyType);
|
|
|
+ } else {
|
|
|
+ query.eq(TOrder::getCompanyType, companyType);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(machineType)) {
|
|
|
+ if (machineType.equals("0")) {
|
|
|
+ query.isNull(TOrder::getMachineType).or()
|
|
|
+ .eq(TOrder::getMachineType, machineType);
|
|
|
+ } else {
|
|
|
+ query.eq(TOrder::getMachineType, machineType);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
Page<TOrder> page = new Page<>(current, size, true);
|
|
|
IPage<TOrder> iPage = orderService.page(page, query);
|
|
|
List<TOrder> list = iPage.getRecords();
|