admin-web/src/views/departmentitem/itemdis/distribution/index.vue
@@ -114,7 +114,7 @@ }, { type: 'select', dataIndex: 'inAgencyId', dataIndex: 'departmentId', label: '分发部门', placeholder: '请选择', optionsConfig: { @@ -172,7 +172,7 @@ qryType: 1, pageNum: this.pageNum, pageSize: this.pageSize, outAgencyId: this.userInfo.tenantId, departmentId: this.userInfo.tenantId, ...this.filterFrom, }).then((res) => { this.list = res.datas; consum-base/src/main/java/com/consum/base/controller/LWhFormTransferController.java
@@ -1,8 +1,25 @@ package com.consum.base.controller; import cn.afterturn.easypoi.excel.ExcelExportUtil; import cn.afterturn.easypoi.excel.entity.TemplateExportParams; import cn.hutool.core.util.ReflectUtil; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.Comparator; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.stream.Collectors; import javax.servlet.http.HttpServletResponse; import org.apache.commons.compress.utils.Lists; import org.apache.poi.ss.usermodel.Workbook; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.consum.base.BaseController; import com.consum.base.core.utils.CommonUtil; import com.consum.base.core.utils.IdUtil; @@ -20,31 +37,31 @@ import com.consum.base.pojo.response.GoodsTemplateCountVO; import com.consum.base.pojo.response.LWHFromTransferExtendVO; import com.consum.base.pojo.response.TransferInfoVO; import com.consum.base.service.*; import com.consum.base.service.BaseWarehouseService; import com.consum.base.service.LGoodsUserRecordCoreService; import com.consum.base.service.LWhFormTransferService; import com.consum.base.service.LWhProcureModelService; import com.consum.base.service.LWhProcureModelUserRecordService; import com.consum.base.service.LWhProcureModelUserService; import com.consum.base.service.impl.LWhFormTransferCoreService; import com.consum.model.po.*; import com.consum.model.po.BaseWarehouse; import com.consum.model.po.FinSysTenantUser; import com.consum.model.po.LWhFormTransfer; import com.consum.model.po.LWhProcureModelUser; import com.consum.model.po.LWhProcureModelUserRecord; import com.iplatform.model.po.S_user_core; import com.walker.db.page.GenericPager; import com.walker.infrastructure.utils.CollectionUtils; import com.walker.infrastructure.utils.DateUtils; import com.walker.web.ResponseValue; import cn.afterturn.easypoi.excel.ExcelExportUtil; import cn.afterturn.easypoi.excel.entity.TemplateExportParams; import cn.hutool.core.util.ReflectUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.apache.commons.compress.utils.Lists; import org.apache.poi.ss.usermodel.Workbook; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletResponse; import java.lang.reflect.Field; import java.util.*; import java.util.stream.Collectors; /** * @Description 调拨管理 @@ -324,10 +341,14 @@ CommonUtil.copyProperties(param, param2); param = param2; S_user_core currentUser = this.getCurrentUser(); if (currentUser == null) { FinSysTenantUser sysInfo = this.getSysInfo(); if (sysInfo == null) { return ResponseValue.error("登录用户信息不存在"); } String tenantId = sysInfo.getTenantId(); if (param.getOutAgencyId() == null) { param.setOutAgencyId(Long.valueOf(tenantId)); } GenericPager<Map<String, Object>> transferInfoDetailsVoGenericPager = this.lWhFormTransferService.queryTransferInfo(param); return ResponseValue.success(transferInfoDetailsVoGenericPager); consum-base/src/main/java/com/consum/base/pojo/query/TransferQry.java
@@ -14,7 +14,6 @@ @Data public class TransferQry { /** * 调拨单号/分发单号 */ @@ -25,6 +24,12 @@ */ @ApiModelProperty(value = "物品模版名称") private String goodsTemplateName; /** * 物品模版id */ @ApiModelProperty(value = "物品模版id") private Long goodsTemplateId; /** * 出库仓库机构编号(调拨机构) */ @@ -87,7 +92,6 @@ private Integer qryType; @ApiModelProperty(value = "分发部门,部门分发时仓库id就是分发部门") private Long inWarehouseId; private Long departmentId; } consum-base/src/main/java/com/consum/base/service/impl/LWhFormTransferServiceImpl.java
@@ -293,6 +293,11 @@ paramts.put("goodsTemplateName", StringUtils.CHAR_PERCENT + param.getGoodsTemplateName() + StringUtils.CHAR_PERCENT); } // 物品id if (param.getGoodsTemplateId() != null) { sql.append("AND bgt.id = :goodsTemplateId "); paramts.put("goodsTemplateId", param.getGoodsTemplateId()); } // 调拨机构 if (param.getOutAgencyId() != null) { sql.append(" and OUT_AGENCY_ID = :OUT_AGENCY_ID "); @@ -332,9 +337,9 @@ paramts.put("inTimeEnd", param.getEndTime() * 1000000 + 240000); } // 分发部门 if (param.getInWarehouseId() != null) { if (param.getDepartmentId() != null) { sql.append("and ft.IN_WAREHOUSE_ID = :inWarehouseId "); paramts.put("inWarehouseId", param.getInWarehouseId()); paramts.put("inWarehouseId", param.getDepartmentId()); } sql.append(" ORDER BY ft.CREATE_TIME DESC"); @@ -551,6 +556,11 @@ paramts.put("goodsName", StringUtils.CHAR_PERCENT + transferQry.getGoodsTemplateName() + StringUtils.CHAR_PERCENT); } // 物品id if (transferQry.getGoodsTemplateId() != null) { sql.append("AND bgt.id =:goodsTemplateId "); paramts.put("goodsTemplateId", transferQry.getGoodsTemplateId()); } // 规格型号 if (transferQry.getBaseGoodsModelsId() != null) { sql.append("AND bgm.id =:goodsModelId "); @@ -558,13 +568,13 @@ } // 调拨机构 if (transferQry.getOutAgencyId() != null) { sql.append("AND OUT_AGENCY_ID = :OUT_AGENCY_ID "); paramts.put("OUT_AGENCY_ID", transferQry.getOutAgencyId()); sql.append("AND OUT_AGENCY_ID like :OUT_AGENCY_ID "); paramts.put("OUT_AGENCY_ID", transferQry.getOutAgencyId() + StringUtils.CHAR_PERCENT); } // 分发部门 if (transferQry.getInWarehouseId() != null) { if (transferQry.getDepartmentId() != null) { sql.append("and ft.IN_WAREHOUSE_ID = :inWarehouseId "); paramts.put("inWarehouseId", transferQry.getInWarehouseId()); paramts.put("inWarehouseId", transferQry.getDepartmentId()); } // 创建人 if (StringUtils.isNotEmpty(transferQry.getOperatorName())) { @@ -607,6 +617,10 @@ sql.append("AND bgt.GOODS_NAME like :goodsName "); params.put("goodsName", StringUtils.CHAR_PERCENT + param.getGoodsTemplateName() + StringUtils.CHAR_PERCENT); } if (param.getGoodsTemplateId() != null) { sql.append("AND bgt.id = :goodsTemplateId "); params.put("goodsTemplateId", param.getGoodsTemplateId()); } if (param.getBaseGoodsModelsId() != null) { sql.append("AND bgm.id = :goodsModelId "); params.put("goodsModelId", param.getBaseGoodsModelsId());