diff --git a/src/main/java/com/glxp/api/controller/auth/LoginController.java b/src/main/java/com/glxp/api/controller/auth/LoginController.java index 9f6780f5..82d3fc33 100644 --- a/src/main/java/com/glxp/api/controller/auth/LoginController.java +++ b/src/main/java/com/glxp/api/controller/auth/LoginController.java @@ -7,6 +7,7 @@ import com.glxp.api.constant.BusinessType; import com.glxp.api.constant.Constant; import com.glxp.api.controller.BaseController; import com.glxp.api.dao.auth.AuthLicenseDao; +import com.glxp.api.dao.auth.InvWarehouseDao; import com.glxp.api.entity.auth.*; import com.glxp.api.entity.system.CompanyEntity; import com.glxp.api.entity.system.SysPdaKeyEntity; @@ -24,6 +25,7 @@ import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.service.auth.*; import com.glxp.api.util.*; +import com.glxp.api.vo.inv.InvWarehouseTreeVo; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -308,6 +310,8 @@ public class LoginController extends BaseController { //------------------------------------------UDIMS接口----------------------------------------------------------- + @Autowired + private InvWarehouseDao invWarehouseDao; /** * 平台验证 * @@ -347,7 +351,7 @@ public class LoginController extends BaseController { } FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest(); filterInvWarehouseRequest.setSpUse(true); - List invList = invWarehouseService.findInvListByUser(filterInvWarehouseRequest); + List invList = invWarehouseDao.selectInvListTreeByUser(filterInvWarehouseRequest); Map res = new WeakHashMap<>(2); res.put("license", authLicense); res.put("invList", invList); diff --git a/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java b/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java index 79c3e88e..3cabb78d 100644 --- a/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java +++ b/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java @@ -13,10 +13,7 @@ import com.glxp.api.entity.inout.IoOrderEntity; import com.glxp.api.entity.purchase.SupCertEntity; import com.glxp.api.entity.purchase.SupManufacturerEntity; import com.glxp.api.entity.purchase.SupProductEntity; -import com.glxp.api.entity.system.SysPdfTemplateRelevanceCodeEntity; -import com.glxp.api.entity.system.SystemPDFModuleEntity; -import com.glxp.api.entity.system.SystemPDFTemplateEntity; -import com.glxp.api.entity.system.SystemPDFTemplateRelevanceEntity; +import com.glxp.api.entity.system.*; import com.glxp.api.req.basic.FilterOrderPrintRequest; import com.glxp.api.req.inout.FilterOrderRequest; import com.glxp.api.req.inout.InspectionPDFTemplateRequest; @@ -34,8 +31,10 @@ import com.glxp.api.service.system.SystemPDFModuleService; import com.glxp.api.service.system.SystemPDFTemplateRelevanceCodeService; import com.glxp.api.service.system.SystemPDFTemplateRelevanceService; import com.glxp.api.service.system.SystemPDFTemplateService; +import com.glxp.api.util.FileUtils; import com.glxp.api.util.JasperUtils; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; @@ -72,6 +71,8 @@ public class BasicOrderPrintController { IoCodeService ioCodeService; @Resource SystemPDFTemplateRelevanceCodeService systemPDFTemplateRelevanceCodeService; + @Value("${file_path}") + private String filePath; //校验模板是否正确 @AuthRuleAnnotation("") @@ -202,7 +203,7 @@ public class BasicOrderPrintController { data.put("data", list); String param = JSON.toJSONString(data); - JasperUtils.jasperReport(request, response, param, systemPDFTemplateEntity.getPath(), "pdf"); + JasperUtils.jasperReport(request, response, param, filePath+"pdf/template/"+FileUtils.getLastFileName(systemPDFTemplateEntity.getPath()), "pdf"); } @@ -220,4 +221,76 @@ public class BasicOrderPrintController { return name; } + //-----------打印码 + @AuthRuleAnnotation("") + @PostMapping("/udiwms/pdf/template/inspection/order/code/file") + public BaseResponse inspectionStockQRCodeTextPDFFromTemplateStatementFile( + @RequestBody FilterOrderPrintRequest filterOrderPrintRequest) throws Exception { + + //查询模板文件是否存在 + SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(filterOrderPrintRequest.getLabelId()+""); + if (null == sysPdfTemplateRelevanceStatemenEntity) { + return ResultVOUtils.error(ResultEnum.DATA_NOT, "所属模块错误"); + } + + SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(String.valueOf(sysPdfTemplateRelevanceStatemenEntity.getTemplateId())); + if (null == systemPDFTemplateEntity) { + return ResultVOUtils.error(ResultEnum.DATA_NOT, "模板错误"); + } + return ResultVOUtils.success(sysPdfTemplateRelevanceStatemenEntity.getTemplateId()); + } + + + @AuthRuleAnnotation("") + @PostMapping("/udiwms/pdf/template/text/inspection/order/code/file") + public BaseResponse stockQRCodeTextPDFFromTemplateStatementFile( + @RequestBody FilterOrderPrintRequest filterOrderPrintRequest, + HttpServletRequest request, HttpServletResponse response) throws Exception { + + + List list = new ArrayList<>(); + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");//定义新的日期格式 + SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(filterOrderPrintRequest.getLabelId() + ""); + if (sysPdfTemplateRelevanceStatemenEntity == null) return ResultVOUtils.error(500, "未找到单据模板模块设置,请检查"); + SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(String.valueOf(sysPdfTemplateRelevanceStatemenEntity.getTemplateId())); + if (null == systemPDFTemplateEntity) { + return ResultVOUtils.error(ResultEnum.DATA_NOT, "模板错误"); + } + + + //查询单据表 + FilterOrderRequest filterOrderRequest = new FilterOrderRequest(); + filterOrderRequest.setBillNo(filterOrderPrintRequest.getOrderIdFk()); + IoOrderResponse ioOrderResponse = ioOrderService.filterList(filterOrderRequest).get(0); + //查询业务单详情 + List ioCodeEntityList = ioCodeService.findByOrderId(filterOrderPrintRequest.getOrderIdFk()); + int i = 1; + if (ioCodeEntityList != null && ioCodeEntityList.size() > 0) { + for (IoCodeEntity obj : ioCodeEntityList) { + //查询产品表 + UdiProductEntity udiProductEntity = udiProductService.findByNameCode(obj.getNameCode()); + //组装数据 + Map bizData = new HashMap<>(); + bizData.put("index", i); + bizData.put("nameCode", obj.getNameCode() == null ? ' ' : obj.getNameCode()); + bizData.put("udiCode", udiProductEntity.getUuid() == null ? ' ' : udiProductEntity.getUuid()); + bizData.put("cpmctymc", udiProductEntity.getCpmctymc() == null ? ' ' : udiProductEntity.getCpmctymc()); + bizData.put("ggxh", udiProductEntity.getGgxh() == null ? ' ' : udiProductEntity.getGgxh()); + bizData.put("batchNo", obj.getBatchNo() == null ? ' ' : obj.getBatchNo()); + bizData.put("productDate", obj.getProduceDate()); + bizData.put("expireDate", obj.getExpireDate()); + bizData.put("ylqxzcrbarmc", udiProductEntity.getYlqxzcrbarmc() == null ? ' ' : udiProductEntity.getYlqxzcrbarmc()); + list.add(bizData); + i++; + } + + Map data = new HashMap<>(); + data.put("data", list); + String param = JSON.toJSONString(data); + JasperUtils.jasperReport(request, response, param, filePath + "/pdf/template/" + FileUtils.getLastFileName(systemPDFTemplateEntity.getPath()), "pdf"); + return ResultVOUtils.success(); + } + return ResultVOUtils.success(); + } + } diff --git a/src/main/java/com/glxp/api/controller/inv/InvInnerOrderPrintController.java b/src/main/java/com/glxp/api/controller/inv/InvInnerOrderPrintController.java index b64f4696..018359a0 100644 --- a/src/main/java/com/glxp/api/controller/inv/InvInnerOrderPrintController.java +++ b/src/main/java/com/glxp/api/controller/inv/InvInnerOrderPrintController.java @@ -186,34 +186,34 @@ public class InvInnerOrderPrintController { } else { Map data = new HashMap(); data.put("data", printEntities); - JasperUtils.jasperReport(request, response, data, filePath + "/pdf/template/" + systemPDFTemplateEntity.getPath(), "pdf"); + JasperUtils.jasperReport(request, response, data, filePath + "/pdf/template/" + FileUtils.getLastFileName(systemPDFTemplateEntity.getPath()), "pdf"); } - String orderId=""; + String orderId = ""; for (InnerOrderPrintResponse InnerOrderPrintResponse : mStockPrintEntities) { InvInnerOrderPrintEntity innerOrderPrintEntity = new InvInnerOrderPrintEntity(); innerOrderPrintEntity.setStatus(1); innerOrderPrintEntity.setId(InnerOrderPrintResponse.getId()); invInnerOrderPrintService.updateOrder(innerOrderPrintEntity); - orderId=InnerOrderPrintResponse.getId()+""; + orderId = InnerOrderPrintResponse.getId() + ""; } //查询订单id - InvInnerOrderPrintEntity innerOrderPrintEntity=invInnerOrderPrintService.selectById(orderId); + InvInnerOrderPrintEntity innerOrderPrintEntity = invInnerOrderPrintService.selectById(orderId); //更新内部码状态 - InnerOrderEntity innerOrderEntity=innerOrderService.findByRecordKey(innerOrderPrintEntity.getOrderIdFk()); - if(innerOrderEntity!=null){ + InnerOrderEntity innerOrderEntity = innerOrderService.findByRecordKey(innerOrderPrintEntity.getOrderIdFk()); + if (innerOrderEntity != null) { innerOrderEntity.setGenStatus(2); innerOrderEntity.setId(innerOrderEntity.getId()); innerOrderService.update(innerOrderEntity); } - IoOrderEntity ioOrderEntity=new IoOrderEntity(); + IoOrderEntity ioOrderEntity = new IoOrderEntity(); ioOrderEntity.setInCodeStatus(1); ioOrderEntity.setBillNo(innerOrderPrintEntity.getOrderIdFk()); ioOrderService.updateByBillNo(ioOrderEntity); @@ -229,7 +229,7 @@ public class InvInnerOrderPrintController { @RequestBody InspectionPDFTemplateRequest inspectionPDFTemplateRequest) throws Exception { //查询模板文件是否存在 - SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(inspectionPDFTemplateRequest.getLabelId()+""); + SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(inspectionPDFTemplateRequest.getLabelId() + ""); if (null == sysPdfTemplateRelevanceStatemenEntity) { return ResultVOUtils.error(ResultEnum.DATA_NOT, "所属模块错误"); } @@ -247,7 +247,7 @@ public class InvInnerOrderPrintController { @RequestBody InnerOrderQRCodeTextPDFTemplateRequest stockQRCodeTextPDFTemplateRequest, HttpServletRequest request, HttpServletResponse response) throws Exception { - SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(stockQRCodeTextPDFTemplateRequest.getLabelId()+""); + SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(stockQRCodeTextPDFTemplateRequest.getLabelId() + ""); if (sysPdfTemplateRelevanceStatemenEntity == null) return ResultVOUtils.error(500, "未找到单据模板模块设置,请检查"); SystemPDFTemplateEntity systemPDFTemplateEntity = @@ -280,7 +280,9 @@ public class InvInnerOrderPrintController { } - String param = JSON.toJSONString(printEntities); + Map map=new HashMap<>(); + map.put("data",printEntities); + String param = JSON.toJSONString(map); JasperUtils.jasperReport(request, response, param, filePath + "/pdf/template/" + systemPDFTemplateEntity.getPath(), "pdf"); String orderId = ""; diff --git a/src/main/java/com/glxp/api/controller/system/SysPdfTemplateController.java b/src/main/java/com/glxp/api/controller/system/SysPdfTemplateController.java index 05fca5c9..78a3bf67 100644 --- a/src/main/java/com/glxp/api/controller/system/SysPdfTemplateController.java +++ b/src/main/java/com/glxp/api/controller/system/SysPdfTemplateController.java @@ -73,10 +73,10 @@ public class SysPdfTemplateController { SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(String.valueOf(filterPdfTemplateRequest.getId())); String data = ""; - if (systemPDFTemplateEntity.getModule() == 3) { + if (systemPDFTemplateEntity.getModule() == 2 || systemPDFTemplateEntity.getModule() == 3) { data = "{\"data\":[{\"batchNo\":\"2020\",\"billNo\":\"2022040811589\",\"billType\":\"ST39730635520\",\"billdate\":\"2022-04-08\",\"corpId\":\"39864007581\",\"corpName\":\"漳州**有限公司\",\"count\":\"4\",\"customerId\":\"39864007581\",\"expireDate\":\"251020\",\"id\":\"10\",\"index\":\"1\",\"locInv\":\"总库\",\"orderIdFk\":\"SM412208685600\",\"printStatus\":\"102\",\"productDate\":\"201020\",\"productId\":\"169\",\"productName\":\"一次性使用开环式微创肛肠吻合器\",\"sourceType\":\"1\",\"spec\":\"TST33-T80——2993规格\",\"status\":\"5\",\"sweepCount\":\"0\",\"title\":\"漳州**医院\",\"type\":\"2\",\"unitIdFk\":\"39864007581\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"苏械注准2022000000\",\"price\":\"10.00\"},{\"batchNo\":\"2023\",\"billNo\":\"2022040811589\",\"billType\":\"ST39730635520\",\"billdate\":\"2022-04-08\",\"corpId\":\"39864007581\",\"corpName\":\"漳州**有限公司\",\"count\":\"4\",\"customerId\":\"39864007581\",\"expireDate\":\"251020\",\"id\":\"10\",\"index\":\"2\",\"locInv\":\"总库\",\"orderIdFk\":\"SM412208685600\",\"printStatus\":\"102\",\"productDate\":\"201020\",\"productId\":\"169\",\"productName\":\"一次性使用开环式微创肛肠吻合器\",\"sourceType\":\"1\",\"spec\":\"TST33-T80——2993规格\",\"status\":\"5\",\"sweepCount\":\"0\",\"title\":\"漳州**医院\",\"type\":\"2\",\"unitIdFk\":\"39864007581\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"苏械注准2022000000\",\"price\":\"10.00\"},{\"batchNo\":\"2021\",\"billNo\":\"2022040811589\",\"billType\":\"ST39730635520\",\"billdate\":\"2022-04-08\",\"corpId\":\"39864007581\",\"corpName\":\"漳州**有限公司\",\"count\":\"4\",\"customerId\":\"39864007581\",\"expireDate\":\"251020\",\"id\":\"10\",\"index\":\"3\",\"locInv\":\"总库\",\"orderIdFk\":\"SM412208685600\",\"printStatus\":\"102\",\"productDate\":\"201020\",\"productId\":\"169\",\"productName\":\"一次性使用开环式微创肛肠吻合器\",\"sourceType\":\"1\",\"spec\":\"TST33-T80——2993规格\",\"status\":\"5\",\"sweepCount\":\"0\",\"title\":\"漳州**医院\",\"type\":\"2\",\"unitIdFk\":\"39864007581\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"苏械注准2022000000\",\"price\":\"10.00\"}]}"; - } else if (systemPDFTemplateEntity.getModule() == 2) { + } else if (systemPDFTemplateEntity.getModule() == 0) { data = "{\"data\":[{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\"}]}"; } else if (systemPDFTemplateEntity.getModule() == 1) { diff --git a/src/main/java/com/glxp/api/dao/auth/InvWarehouseDao.java b/src/main/java/com/glxp/api/dao/auth/InvWarehouseDao.java index c3e631c8..309de92c 100644 --- a/src/main/java/com/glxp/api/dao/auth/InvWarehouseDao.java +++ b/src/main/java/com/glxp/api/dao/auth/InvWarehouseDao.java @@ -6,6 +6,7 @@ import com.glxp.api.entity.auth.InvWarehouseEntity; import com.glxp.api.req.auth.FilterInvSubWarehouseRequest; import com.glxp.api.req.auth.FilterInvWarehouseRequest; import com.glxp.api.res.auth.InvSubWarehouseResponse; +import com.glxp.api.vo.inv.InvWarehouseTreeVo; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -92,6 +93,14 @@ public interface InvWarehouseDao extends BaseMapperPlus selectInvListByUser(FilterInvWarehouseRequest filterInvWarehouseRequest); + /** + * 查询用户关联的仓库列表树,包含仓库单据,只查询仓库编码,名称,父ID字段 + * + * @param userId + * @return + */ + List selectInvListTreeByUser(FilterInvWarehouseRequest filterInvWarehouseRequest); + List selectInvById(@Param("InvList") List InvList); /** diff --git a/src/main/java/com/glxp/api/entity/basic/UdiProductEntity.java b/src/main/java/com/glxp/api/entity/basic/UdiProductEntity.java index 15034ffa..7eec6130 100644 --- a/src/main/java/com/glxp/api/entity/basic/UdiProductEntity.java +++ b/src/main/java/com/glxp/api/entity/basic/UdiProductEntity.java @@ -85,7 +85,7 @@ public class UdiProductEntity { private Long relSupId; - private Boolean groupBuy; + private boolean groupBuy; public Boolean getAllowNoBatch() { diff --git a/src/main/java/com/glxp/api/req/basic/FilterOrderPrintRequest.java b/src/main/java/com/glxp/api/req/basic/FilterOrderPrintRequest.java index bfa3de4d..ee95b9c8 100644 --- a/src/main/java/com/glxp/api/req/basic/FilterOrderPrintRequest.java +++ b/src/main/java/com/glxp/api/req/basic/FilterOrderPrintRequest.java @@ -15,5 +15,6 @@ public class FilterOrderPrintRequest { private String templateId; private String orderIdFk; private Integer status; + private Integer labelId; } diff --git a/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java b/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java index 856f4813..b426efe3 100644 --- a/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java @@ -153,6 +153,7 @@ public class IoOrderServiceImpl implements IoOrderService { orderEntity.setRelKey(UUID.fastUUID().toString(true)); } orderEntity.setExportStatus(0); //上传状态:未上传 + orderEntity.setInCodeStatus(0); return orderDao.insert(orderEntity); } diff --git a/src/main/java/com/glxp/api/util/FileUtils.java b/src/main/java/com/glxp/api/util/FileUtils.java index f9cdcf09..42a57a17 100644 --- a/src/main/java/com/glxp/api/util/FileUtils.java +++ b/src/main/java/com/glxp/api/util/FileUtils.java @@ -1,5 +1,7 @@ package com.glxp.api.util; +import cn.hutool.core.util.StrUtil; + import java.io.BufferedReader; import java.io.ByteArrayOutputStream; import java.io.File; @@ -529,6 +531,16 @@ public class FileUtils { } } + public static String getLastFileName(String fileName) { + String fileNameNow = fileName.substring(fileName.lastIndexOf("/") + 1); + if (StrUtil.isEmpty(fileNameNow)) + return fileName; + else + return fileNameNow; + + } + + /** * 得到相对路径。 * 文件名不是目录名的子节点时返回文件名。 @@ -538,6 +550,7 @@ public class FileUtils { * @return 得到文件名相对于目录名的相对路径,目录下不存在该文件时返回文件名 * @since 1.0 */ + public static String getSubpath(String pathName, String fileName) { int index = fileName.indexOf(pathName); if (index != -1) { diff --git a/src/main/java/com/glxp/api/vo/inv/InvWarehouseTreeVo.java b/src/main/java/com/glxp/api/vo/inv/InvWarehouseTreeVo.java new file mode 100644 index 00000000..aa26b3c7 --- /dev/null +++ b/src/main/java/com/glxp/api/vo/inv/InvWarehouseTreeVo.java @@ -0,0 +1,15 @@ +package com.glxp.api.vo.inv; + +import com.glxp.api.entity.auth.InvWarehouseEntity; +import com.glxp.api.entity.auth.WarehouseBussinessTypeEntity; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +@Data +public class InvWarehouseTreeVo extends InvWarehouseEntity { + + List bussinessTypeList = new ArrayList<>(); + +} diff --git a/src/main/resources/mybatis/mapper/auth/InvWarehouseDao.xml b/src/main/resources/mybatis/mapper/auth/InvWarehouseDao.xml index b1fd31c8..c233d610 100644 --- a/src/main/resources/mybatis/mapper/auth/InvWarehouseDao.xml +++ b/src/main/resources/mybatis/mapper/auth/InvWarehouseDao.xml @@ -392,6 +392,38 @@ GROUP BY auth_warehouse.code + + + + + +