| | |
| | | int goodsNum = this.lWhGoodsService.queryGoodsModelNum(0, warehouseId, baseGoodsModelsId, 1, null); |
| | | lWhProcureModel.setWorehouseCount(goodsNum); |
| | | } |
| | | if (businessType == 1) { |
| | | lWhProcureModel.setBusinessType(4); |
| | | } |
| | | lWhProcureModel.setCounts(model.getCounts()); |
| | | lWhProcureModel.setBusinessId(lWhFormTransferId); |
| | | lWhProcureModel.setBaseGoodsModelsId(baseGoodsModelsId); |
| | |
| | | // 单据类型 1 采购2 调拨 3出库4部门分发 |
| | | //部门分发类型 |
| | | if (businessType == 1 && "A".equals(baseModelMap.get("type"))) { |
| | | lWhProcureModel.setBusinessType(4); |
| | | LWhProcureModelUserRecord lWhProcureModelUserRecord = new LWhProcureModelUserRecord(); |
| | | lWhProcureModelUserRecord.setId(IdUtil.generateId()); |
| | | lWhProcureModelUserRecord.setTransBusinessId(lWhFormTransferId); |
| | |
| | | * @Author 卢庆阳 |
| | | * @Date 2023/10/31 |
| | | */ |
| | | public Map<String, Object> export(Long id) { |
| | | public Map<String, Object> export(Long id, Integer type) { |
| | | String sql = "SELECT\n" |
| | | + "\tft.BUSINESS_FORM_CODE,\n" |
| | | + "\tft.OPERATOR_NAME,\n" |
| | | + "\tft.CREATE_TIME,\n" |
| | | + "\tft.IN_AGENCY_NAME,\n" |
| | | + "\tft.OUT_AGENCY_NAME,\n" |
| | | + "\tGOODS_NAME,\n" |
| | | + "\tpm.BASE_GOODS_MODELS_NAME,\n" |
| | |
| | | List<TemplateExcelTransfer> list = Lists.newArrayList(); |
| | | select.forEach(item -> { |
| | | TemplateExcelTransfer templateExcelTransfer = MapUtils.convertMapToObj(item, TemplateExcelTransfer.class); |
| | | if (type == 1) { |
| | | templateExcelTransfer.setTenantName(templateExcelTransfer.getOutAgencyName()); |
| | | } else { |
| | | templateExcelTransfer.setTenantName(templateExcelTransfer.getInAgencyName()); |
| | | } |
| | | list.add(templateExcelTransfer); |
| | | }); |
| | | |
| | |
| | | String businessFormCode = entity.getBusinessFormCode(); |
| | | Long createTime = entity.getCreateTime(); |
| | | String operatorName = entity.getOperatorName(); |
| | | |
| | | String tenantName; |
| | | if (type == 1) { |
| | | tenantName = entity.getInAgencyName(); |
| | | } else { |
| | | tenantName = entity.getOutAgencyName(); |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("code", businessFormCode); |
| | | map.put("date", DateUtils.toShowDate(createTime)); |
| | | map.put("tenantName", tenantName); |
| | | map.put("name", operatorName); |
| | | map.put("countNum", countNum); |
| | | map.put("totalAmount", totalAmount); |