|
|
@ -63,6 +63,7 @@ import com.yxt.anrui.as.feign.portal.sysuser.SysUserFeign; |
|
|
|
import com.yxt.anrui.as.feign.portal.sysuser.SysUserVo; |
|
|
|
import com.yxt.anrui.as.feign.sms.SmsGoods; |
|
|
|
import com.yxt.anrui.as.feign.sms.SmsGoodsFeign; |
|
|
|
import com.yxt.anrui.as.feign.wms.wmsInventory.WmsInventory; |
|
|
|
import com.yxt.anrui.as.feign.wms.wmsoldinventory.WmsOldInventoryFeign; |
|
|
|
import com.yxt.anrui.as.feign.wms.wmsoldinventory.WmsOldInventoryPush; |
|
|
|
import com.yxt.common.base.config.component.DocPdfComponent; |
|
|
@ -2283,4 +2284,61 @@ public class AsBusrepairBillService extends MybatisBaseService<AsBusrepairBillMa |
|
|
|
WordConvertUtils.doc2pdf(wordPath, targetPath, pdfName); |
|
|
|
return rb.success().setData(pdfName); |
|
|
|
} |
|
|
|
|
|
|
|
public PagerVo<AppBusrepairBillVo> appRepairs(PagerQuery<InventorySearchQuery> pq) { |
|
|
|
InventorySearchQuery query = pq.getParams(); |
|
|
|
QueryWrapper<AsBusrepairBill> qw = new QueryWrapper<>(); |
|
|
|
PrivilegeQuery privilegeQuery = new PrivilegeQuery(); |
|
|
|
privilegeQuery.setOrgPath(query.getOrgPath()); |
|
|
|
privilegeQuery.setUserSid(query.getUserSid()); |
|
|
|
privilegeQuery.setMenuSid(query.getMenuSid()); |
|
|
|
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery); |
|
|
|
if (com.yxt.common.base.utils.StringUtils.isNotBlank(defaultIdReltBean.getData())) { |
|
|
|
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
|
|
|
|
String orgSidPath = query.getOrgPath(); |
|
|
|
orgSidPath = orgSidPath + "/"; |
|
|
|
int i1 = orgSidPath.indexOf("/"); |
|
|
|
int i2 = orgSidPath.indexOf("/", i1 + 1); |
|
|
|
int i3 = orgSidPath.indexOf("/", i2 + 1); |
|
|
|
int i4 = orgSidPath.indexOf("/", i3 + 1); |
|
|
|
String orgLevelKey = defaultIdReltBean.getData(); |
|
|
|
if ("1".equals(orgLevelKey)) { |
|
|
|
orgSidPath = orgSidPath.substring(0, i1); |
|
|
|
qw.like("s.orgSidPath", orgSidPath); |
|
|
|
} else if ("2".equals(orgLevelKey)) { |
|
|
|
orgSidPath = orgSidPath.substring(0, i2); |
|
|
|
qw.like("s.orgSidPath", orgSidPath); |
|
|
|
} else if ("3".equals(orgLevelKey)) { |
|
|
|
orgSidPath = orgSidPath.substring(0, i3); |
|
|
|
qw.like("s.orgSidPath", orgSidPath); |
|
|
|
} else if ("4".equals(orgLevelKey)) { |
|
|
|
orgSidPath = orgSidPath.substring(0, i4); |
|
|
|
qw.like("s.orgSidPath", orgSidPath); |
|
|
|
} else if ("5".equals(orgLevelKey)) { |
|
|
|
qw.eq("a.createBySid", query.getUserSid()); |
|
|
|
} else { |
|
|
|
PagerVo<AppBusrepairBillVo> p = new PagerVo<>(); |
|
|
|
return p; |
|
|
|
} |
|
|
|
} else { |
|
|
|
PagerVo<AppBusrepairBillVo> p = new PagerVo<>(); |
|
|
|
return p; |
|
|
|
} |
|
|
|
if (com.yxt.common.base.utils.StringUtils.isNotBlank(query.getName())) { |
|
|
|
qw.and(wrapper -> wrapper.like("a.billNo", query.getName()) |
|
|
|
.or().like("a.billType", query.getName()) |
|
|
|
.or().like("a.subject", query.getName()) |
|
|
|
.or().like("a.customerName", query.getName()) |
|
|
|
.or().like("v.vinNo", query.getName()) |
|
|
|
.or().like("v.vehMark", query.getName()) |
|
|
|
.or().like("a.nodeName", query.getName()) |
|
|
|
); |
|
|
|
} |
|
|
|
qw.eq("a.isDelete",0); |
|
|
|
qw.orderByDesc("a.id"); |
|
|
|
IPage<AsBusrepairBill> page = PagerUtil.queryToPage(pq); |
|
|
|
IPage<AppBusrepairBillVo> pagging = baseMapper.appRepairs(page, qw); |
|
|
|
PagerVo<AppBusrepairBillVo> p = PagerUtil.pageToVo(pagging, null); |
|
|
|
return p; |
|
|
|
} |
|
|
|
} |
|
|
|