refactor(crm): 统一配卷查询接口并增加筛选功能
- 将所有配卷查询接口统一为POST + Body BO方式 - 为配卷查询添加钢卷号、材料类型、质量状态、发货状态筛选条件 - 在合同详情页面为生产成果和发货配卷添加筛选表单 - 在订单页面为发货配卷添加筛选功能 - 在销售员页面为生产成果和计划发货添加筛选功能 - 更新异议管理页面的配卷查询参数结构 - 增加订单ID参数用于合同ID相关查询的兼容性处理
This commit is contained in:
@@ -25,8 +25,12 @@ import com.klp.crm.domain.vo.CrmOrderItemVo;
|
|||||||
import com.klp.crm.domain.vo.CrmOrderItemExportVo;
|
import com.klp.crm.domain.vo.CrmOrderItemExportVo;
|
||||||
import com.klp.crm.domain.vo.CrmContractOrderFinanceVo;
|
import com.klp.crm.domain.vo.CrmContractOrderFinanceVo;
|
||||||
import com.klp.crm.domain.bo.CrmOrderItemBo;
|
import com.klp.crm.domain.bo.CrmOrderItemBo;
|
||||||
|
import com.klp.crm.domain.bo.OrderCoilQueryBo;
|
||||||
|
import com.klp.crm.domain.bo.SalesmanCoilQueryBo;
|
||||||
|
import com.klp.crm.domain.bo.ContractCoilQueryBo;
|
||||||
import com.klp.crm.service.ICrmOrderItemService;
|
import com.klp.crm.service.ICrmOrderItemService;
|
||||||
import com.klp.domain.vo.WmsMaterialCoilVo;
|
import com.klp.domain.vo.WmsMaterialCoilVo;
|
||||||
|
import com.klp.domain.bo.WmsMaterialCoilBo;
|
||||||
import com.klp.common.core.page.TableDataInfo;
|
import com.klp.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -134,19 +138,63 @@ public class CrmOrderItemController extends BaseController {
|
|||||||
@PathVariable Long contractId) {
|
@PathVariable Long contractId) {
|
||||||
return R.ok(iCrmOrderItemService.queryFinanceAndObjectionByContractId(contractId));
|
return R.ok(iCrmOrderItemService.queryFinanceAndObjectionByContractId(contractId));
|
||||||
}
|
}
|
||||||
// 根据订单id查询发货单据中的配卷(分页)。
|
// ==================== 钢卷查询(统一使用 POST + RequestBody BO) ====================
|
||||||
@GetMapping("/coils/order/{orderId}")
|
|
||||||
public TableDataInfo<WmsMaterialCoilVo> getCoilsByOrderId(@NotNull(message = "订单ID不能为空")
|
/**
|
||||||
@PathVariable Long orderId,
|
* 根据订单ID分页查询发货配卷,支持钢卷信息筛选
|
||||||
PageQuery pageQuery) {
|
*/
|
||||||
return iCrmOrderItemService.queryCoilsByOrderId(orderId, pageQuery);
|
@PostMapping("/coils/order/query")
|
||||||
|
public TableDataInfo<WmsMaterialCoilVo> getCoilsByOrderId(@RequestBody @Validated OrderCoilQueryBo bo) {
|
||||||
|
return iCrmOrderItemService.queryCoilsByOrderId(bo.getOrderId(), toPageQuery(bo), bo.getCoilBo());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据销售员分页查询生产成果,支持钢卷信息筛选
|
||||||
|
*/
|
||||||
|
@PostMapping("/coils/salesman/query")
|
||||||
|
public TableDataInfo<WmsMaterialCoilVo> getCoilsBySalesman(@RequestBody @Validated SalesmanCoilQueryBo bo) {
|
||||||
|
return iCrmOrderItemService.queryCoilsBySalesman(bo.getSalesman(), toPageQuery(bo), bo.getCoilBo());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据合同ID分页查询生产成果,支持钢卷信息筛选
|
||||||
|
*/
|
||||||
|
@PostMapping("/coils/contract/query")
|
||||||
|
public TableDataInfo<WmsMaterialCoilVo> getCoilsByContractIdPaginated(@RequestBody @Validated ContractCoilQueryBo bo) {
|
||||||
|
return iCrmOrderItemService.queryCoilsByContractIdPaginated(bo.getOrderId(), toPageQuery(bo), bo.getCoilBo());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据订单ID统计配卷汇总,支持钢卷信息筛选
|
||||||
|
*/
|
||||||
|
@PostMapping("/coils/order/statistics")
|
||||||
|
public R<java.util.Map<String, java.math.BigDecimal>> getCoilsByOrderIdStatistics(@RequestBody @Validated OrderCoilQueryBo bo) {
|
||||||
|
return R.ok(iCrmOrderItemService.queryCoilsByOrderIdStatistics(bo.getOrderId(), bo.getCoilBo()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据销售员统计生产成果汇总,支持钢卷信息筛选
|
||||||
|
*/
|
||||||
|
@PostMapping("/coils/salesman/statistics")
|
||||||
|
public R<java.util.Map<String, java.math.BigDecimal>> getCoilsBySalesmanStatistics(@RequestBody @Validated SalesmanCoilQueryBo bo) {
|
||||||
|
return R.ok(iCrmOrderItemService.queryCoilsBySalesmanStatistics(bo.getSalesman(), bo.getCoilBo()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据合同ID统计生产成果汇总,支持钢卷信息筛选
|
||||||
|
*/
|
||||||
|
@PostMapping("/coils/contract/statistics")
|
||||||
|
public R<java.util.Map<String, java.math.BigDecimal>> getCoilsByContractIdStatistics(@RequestBody @Validated ContractCoilQueryBo bo) {
|
||||||
|
return R.ok(iCrmOrderItemService.queryCoilsByContractIdStatistics(bo.getOrderId(), bo.getCoilBo()));
|
||||||
|
}
|
||||||
|
|
||||||
|
// ==================== 已有接口 ====================
|
||||||
|
|
||||||
// 根据合同id查询发货单据中的配卷。
|
// 根据合同id查询发货单据中的配卷。
|
||||||
@GetMapping("/coils/contract/{contractId}")
|
@GetMapping("/coils/contract/{contractId}")
|
||||||
public R<List<WmsMaterialCoilVo>> getCoilsByContractId(@NotNull(message = "合同ID不能为空")
|
public R<List<WmsMaterialCoilVo>> getCoilsByContractId(@NotNull(message = "合同ID不能为空")
|
||||||
@PathVariable Long contractId) {
|
@PathVariable Long orderId) {
|
||||||
return R.ok(iCrmOrderItemService.queryCoilsByContractId(contractId));
|
return R.ok(iCrmOrderItemService.queryCoilsByContractId(orderId));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据客户id查询该客户下属订单关联的异议和财务信息。
|
// 根据客户id查询该客户下属订单关联的异议和财务信息。
|
||||||
@@ -163,38 +211,16 @@ public class CrmOrderItemController extends BaseController {
|
|||||||
return R.ok(iCrmOrderItemService.queryCoilsByCustomerId(customerId));
|
return R.ok(iCrmOrderItemService.queryCoilsByCustomerId(customerId));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据销售员查询生产成果(钢卷列表),分页
|
// ==================== 私有辅助方法 ====================
|
||||||
@GetMapping("/coils/bySalesman")
|
|
||||||
public TableDataInfo<WmsMaterialCoilVo> getCoilsBySalesman(@RequestParam String salesman,
|
|
||||||
PageQuery pageQuery) {
|
|
||||||
return iCrmOrderItemService.queryCoilsBySalesman(salesman, pageQuery);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 根据合同ID查询生产成果(钢卷列表),分页
|
private PageQuery toPageQuery(OrderCoilQueryBo bo) { return buildPageQuery(bo.getPageNum(), bo.getPageSize()); }
|
||||||
@GetMapping("/coils/byContract/{contractId}")
|
private PageQuery toPageQuery(SalesmanCoilQueryBo bo) { return buildPageQuery(bo.getPageNum(), bo.getPageSize()); }
|
||||||
public TableDataInfo<WmsMaterialCoilVo> getCoilsByContractIdPaginated(@NotNull(message = "合同ID不能为空")
|
private PageQuery toPageQuery(ContractCoilQueryBo bo) { return buildPageQuery(bo.getPageNum(), bo.getPageSize()); }
|
||||||
@PathVariable Long contractId,
|
|
||||||
PageQuery pageQuery) {
|
|
||||||
return iCrmOrderItemService.queryCoilsByContractIdPaginated(contractId, pageQuery);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 根据订单ID统计配卷汇总
|
private PageQuery buildPageQuery(Integer pageNum, Integer pageSize) {
|
||||||
@GetMapping("/coils/order/{orderId}/statistics")
|
PageQuery pageQuery = new PageQuery();
|
||||||
public R<java.util.Map<String, java.math.BigDecimal>> getCoilsByOrderIdStatistics(@NotNull(message = "订单ID不能为空")
|
pageQuery.setPageNum(pageNum);
|
||||||
@PathVariable Long orderId) {
|
pageQuery.setPageSize(pageSize);
|
||||||
return R.ok(iCrmOrderItemService.queryCoilsByOrderIdStatistics(orderId));
|
return pageQuery;
|
||||||
}
|
|
||||||
|
|
||||||
// 根据销售员统计生产成果汇总
|
|
||||||
@GetMapping("/coils/bySalesman/statistics")
|
|
||||||
public R<java.util.Map<String, java.math.BigDecimal>> getCoilsBySalesmanStatistics(@RequestParam String salesman) {
|
|
||||||
return R.ok(iCrmOrderItemService.queryCoilsBySalesmanStatistics(salesman));
|
|
||||||
}
|
|
||||||
|
|
||||||
// 根据合同ID统计生产成果汇总
|
|
||||||
@GetMapping("/coils/byContract/{contractId}/statistics")
|
|
||||||
public R<java.util.Map<String, java.math.BigDecimal>> getCoilsByContractIdStatistics(@NotNull(message = "合同ID不能为空")
|
|
||||||
@PathVariable Long contractId) {
|
|
||||||
return R.ok(iCrmOrderItemService.queryCoilsByContractIdStatistics(contractId));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.klp.crm.domain.bo;
|
||||||
|
|
||||||
|
import com.klp.domain.bo.WmsMaterialCoilBo;
|
||||||
|
import lombok.Data;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同钢卷查询请求对象
|
||||||
|
*
|
||||||
|
* @author klp
|
||||||
|
* @date 2026-07-09
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ContractCoilQueryBo implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 合同ID(必填) */
|
||||||
|
@NotNull(message = "合同ID不能为空")
|
||||||
|
private Long orderId;
|
||||||
|
|
||||||
|
/** 分页页码 */
|
||||||
|
private Integer pageNum;
|
||||||
|
|
||||||
|
/** 分页大小 */
|
||||||
|
private Integer pageSize;
|
||||||
|
|
||||||
|
/** 钢卷筛选条件 */
|
||||||
|
private WmsMaterialCoilBo coilBo;
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.klp.crm.domain.bo;
|
||||||
|
|
||||||
|
import com.klp.domain.bo.WmsMaterialCoilBo;
|
||||||
|
import lombok.Data;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单钢卷查询请求对象
|
||||||
|
*
|
||||||
|
* @author klp
|
||||||
|
* @date 2026-07-09
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OrderCoilQueryBo implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 订单ID(必填) */
|
||||||
|
@NotNull(message = "订单ID不能为空")
|
||||||
|
private Long orderId;
|
||||||
|
|
||||||
|
/** 分页页码 */
|
||||||
|
private Integer pageNum;
|
||||||
|
|
||||||
|
/** 分页大小 */
|
||||||
|
private Integer pageSize;
|
||||||
|
|
||||||
|
/** 钢卷筛选条件 */
|
||||||
|
private WmsMaterialCoilBo coilBo;
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.klp.crm.domain.bo;
|
||||||
|
|
||||||
|
import com.klp.domain.bo.WmsMaterialCoilBo;
|
||||||
|
import lombok.Data;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 销售员钢卷查询请求对象
|
||||||
|
*
|
||||||
|
* @author klp
|
||||||
|
* @date 2026-07-09
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SalesmanCoilQueryBo implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 销售员(必填) */
|
||||||
|
@NotBlank(message = "销售员不能为空")
|
||||||
|
private String salesman;
|
||||||
|
|
||||||
|
/** 分页页码 */
|
||||||
|
private Integer pageNum;
|
||||||
|
|
||||||
|
/** 分页大小 */
|
||||||
|
private Integer pageSize;
|
||||||
|
|
||||||
|
/** 钢卷筛选条件 */
|
||||||
|
private WmsMaterialCoilBo coilBo;
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import com.klp.crm.domain.vo.CrmContractOrderFinanceVo;
|
import com.klp.crm.domain.vo.CrmContractOrderFinanceVo;
|
||||||
import com.klp.domain.vo.WmsMaterialCoilVo;
|
import com.klp.domain.vo.WmsMaterialCoilVo;
|
||||||
|
import com.klp.domain.bo.WmsMaterialCoilBo;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -59,12 +60,12 @@ public interface ICrmOrderItemService {
|
|||||||
/**
|
/**
|
||||||
* 根据订单ID查询发货单配卷(分页)
|
* 根据订单ID查询发货单配卷(分页)
|
||||||
*/
|
*/
|
||||||
TableDataInfo<WmsMaterialCoilVo> queryCoilsByOrderId(Long orderId, PageQuery pageQuery);
|
TableDataInfo<WmsMaterialCoilVo> queryCoilsByOrderId(Long orderId, PageQuery pageQuery, WmsMaterialCoilBo coilBo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据合同ID查询发货单配卷
|
* 根据合同ID查询发货单配卷
|
||||||
*/
|
*/
|
||||||
List<WmsMaterialCoilVo> queryCoilsByContractId(Long contractId);
|
List<WmsMaterialCoilVo> queryCoilsByContractId(Long orderId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据客户ID查询下属订单的异议和财务信息
|
* 根据客户ID查询下属订单的异议和财务信息
|
||||||
@@ -79,25 +80,25 @@ public interface ICrmOrderItemService {
|
|||||||
/**
|
/**
|
||||||
* 根据销售员查询生产成果(钢卷列表)分页
|
* 根据销售员查询生产成果(钢卷列表)分页
|
||||||
*/
|
*/
|
||||||
TableDataInfo<WmsMaterialCoilVo> queryCoilsBySalesman(String salesman, PageQuery pageQuery);
|
TableDataInfo<WmsMaterialCoilVo> queryCoilsBySalesman(String salesman, PageQuery pageQuery, WmsMaterialCoilBo coilBo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据合同ID查询生产成果(钢卷列表)分页
|
* 根据合同ID查询生产成果(钢卷列表)分页
|
||||||
*/
|
*/
|
||||||
TableDataInfo<WmsMaterialCoilVo> queryCoilsByContractIdPaginated(Long contractId, PageQuery pageQuery);
|
TableDataInfo<WmsMaterialCoilVo> queryCoilsByContractIdPaginated(Long orderId, PageQuery pageQuery, WmsMaterialCoilBo coilBo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据订单ID统计配卷汇总数据(数量、毛重、净重)
|
* 根据订单ID统计配卷汇总数据(数量、毛重、净重)
|
||||||
*/
|
*/
|
||||||
java.util.Map<String, java.math.BigDecimal> queryCoilsByOrderIdStatistics(Long orderId);
|
java.util.Map<String, java.math.BigDecimal> queryCoilsByOrderIdStatistics(Long orderId, WmsMaterialCoilBo coilBo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据销售员统计生产成果汇总数据(数量、毛重、净重)
|
* 根据销售员统计生产成果汇总数据(数量、毛重、净重)
|
||||||
*/
|
*/
|
||||||
java.util.Map<String, java.math.BigDecimal> queryCoilsBySalesmanStatistics(String salesman);
|
java.util.Map<String, java.math.BigDecimal> queryCoilsBySalesmanStatistics(String salesman, WmsMaterialCoilBo coilBo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据合同ID统计生产成果汇总数据(数量、毛重、净重)
|
* 根据合同ID统计生产成果汇总数据(数量、毛重、净重)
|
||||||
*/
|
*/
|
||||||
java.util.Map<String, java.math.BigDecimal> queryCoilsByContractIdStatistics(Long contractId);
|
java.util.Map<String, java.math.BigDecimal> queryCoilsByContractIdStatistics(Long orderId, WmsMaterialCoilBo coilBo);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -260,21 +260,21 @@ public class CrmOrderItemServiceImpl implements ICrmOrderItemService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CrmContractOrderFinanceVo queryFinanceAndObjectionByContractId(Long contractId) {
|
public CrmContractOrderFinanceVo queryFinanceAndObjectionByContractId(Long orderId) {
|
||||||
CrmContractOrderFinanceVo result = new CrmContractOrderFinanceVo();
|
CrmContractOrderFinanceVo result = new CrmContractOrderFinanceVo();
|
||||||
|
|
||||||
LambdaQueryWrapper<CrmSalesObjection> objectionWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<CrmSalesObjection> objectionWrapper = new LambdaQueryWrapper<>();
|
||||||
objectionWrapper.in(CrmSalesObjection::getOrderId, contractId);
|
objectionWrapper.in(CrmSalesObjection::getOrderId, orderId);
|
||||||
List<CrmSalesObjectionVo> objectionList = crmSalesObjectionMapper.selectVoList(objectionWrapper);
|
List<CrmSalesObjectionVo> objectionList = crmSalesObjectionMapper.selectVoList(objectionWrapper);
|
||||||
result.setObjectionList(objectionList);
|
result.setObjectionList(objectionList);
|
||||||
|
|
||||||
LambdaQueryWrapper<com.klp.domain.WmsReceivable> receivableWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<com.klp.domain.WmsReceivable> receivableWrapper = new LambdaQueryWrapper<>();
|
||||||
receivableWrapper.in(WmsReceivable::getOrderId, contractId);
|
receivableWrapper.in(WmsReceivable::getOrderId, orderId);
|
||||||
List<WmsReceivableVo> receivableList = wmsReceivableMapper.selectVoList(receivableWrapper);
|
List<WmsReceivableVo> receivableList = wmsReceivableMapper.selectVoList(receivableWrapper);
|
||||||
result.setReceivableList(receivableList);
|
result.setReceivableList(receivableList);
|
||||||
|
|
||||||
LambdaQueryWrapper<WmsDeliveryWaybill> waybillWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<WmsDeliveryWaybill> waybillWrapper = new LambdaQueryWrapper<>();
|
||||||
waybillWrapper.in(WmsDeliveryWaybill::getOrderId, contractId);
|
waybillWrapper.in(WmsDeliveryWaybill::getOrderId, orderId);
|
||||||
List<WmsDeliveryWaybillVo> wmsDeliveryWaybills = wmsDeliveryWaybillMapper.selectVoList(waybillWrapper);
|
List<WmsDeliveryWaybillVo> wmsDeliveryWaybills = wmsDeliveryWaybillMapper.selectVoList(waybillWrapper);
|
||||||
result.setWmsDeliveryWaybills(wmsDeliveryWaybills);
|
result.setWmsDeliveryWaybills(wmsDeliveryWaybills);
|
||||||
|
|
||||||
@@ -345,9 +345,9 @@ public class CrmOrderItemServiceImpl implements ICrmOrderItemService {
|
|||||||
* 根据合同ID解析关联的线圈ID串(通过crm_order→wms_coil_contract_rel)
|
* 根据合同ID解析关联的线圈ID串(通过crm_order→wms_coil_contract_rel)
|
||||||
* @return 逗号分隔的coilId字符串,无数据返回null
|
* @return 逗号分隔的coilId字符串,无数据返回null
|
||||||
*/
|
*/
|
||||||
private String resolveCoilIdsByContractId(Long contractId) {
|
private String resolveCoilIdsByContractId(Long orderId) {
|
||||||
LambdaQueryWrapper<WmsCoilContractRel> relWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<WmsCoilContractRel> relWrapper = new LambdaQueryWrapper<>();
|
||||||
relWrapper.eq(WmsCoilContractRel::getContractId, contractId);
|
relWrapper.eq(WmsCoilContractRel::getContractId, orderId);
|
||||||
relWrapper.eq(WmsCoilContractRel::getDelFlag, 0);
|
relWrapper.eq(WmsCoilContractRel::getDelFlag, 0);
|
||||||
List<WmsCoilContractRel> rels = coilContractRelMapper.selectList(relWrapper);
|
List<WmsCoilContractRel> rels = coilContractRelMapper.selectList(relWrapper);
|
||||||
if (rels == null || rels.isEmpty()) {
|
if (rels == null || rels.isEmpty()) {
|
||||||
@@ -363,34 +363,40 @@ public class CrmOrderItemServiceImpl implements ICrmOrderItemService {
|
|||||||
// ==================== 分页列表查询 ====================
|
// ==================== 分页列表查询 ====================
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo<WmsMaterialCoilVo> queryCoilsByOrderId(Long orderId, PageQuery pageQuery) {
|
public TableDataInfo<WmsMaterialCoilVo> queryCoilsByOrderId(Long orderId, PageQuery pageQuery, WmsMaterialCoilBo coilBo) {
|
||||||
String coilIds = resolveCoilIdsByOrderId(orderId);
|
String coilIds = resolveCoilIdsByOrderId(orderId);
|
||||||
if (coilIds == null) {
|
if (coilIds == null) {
|
||||||
return new TableDataInfo<>();
|
return new TableDataInfo<>();
|
||||||
}
|
}
|
||||||
WmsMaterialCoilBo coilBo = new WmsMaterialCoilBo();
|
if (coilBo == null) {
|
||||||
|
coilBo = new WmsMaterialCoilBo();
|
||||||
|
}
|
||||||
coilBo.setCoilIds(coilIds);
|
coilBo.setCoilIds(coilIds);
|
||||||
return iWmsMaterialCoilService.queryPageList(coilBo, pageQuery);
|
return iWmsMaterialCoilService.queryPageList(coilBo, pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo<WmsMaterialCoilVo> queryCoilsBySalesman(String salesman, PageQuery pageQuery) {
|
public TableDataInfo<WmsMaterialCoilVo> queryCoilsBySalesman(String salesman, PageQuery pageQuery, WmsMaterialCoilBo coilBo) {
|
||||||
String coilIds = resolveCoilIdsBySalesman(salesman);
|
String coilIds = resolveCoilIdsBySalesman(salesman);
|
||||||
if (coilIds == null) {
|
if (coilIds == null) {
|
||||||
return new TableDataInfo<>();
|
return new TableDataInfo<>();
|
||||||
}
|
}
|
||||||
WmsMaterialCoilBo coilBo = new WmsMaterialCoilBo();
|
if (coilBo == null) {
|
||||||
|
coilBo = new WmsMaterialCoilBo();
|
||||||
|
}
|
||||||
coilBo.setCoilIds(coilIds);
|
coilBo.setCoilIds(coilIds);
|
||||||
return iWmsMaterialCoilService.queryPageList(coilBo, pageQuery);
|
return iWmsMaterialCoilService.queryPageList(coilBo, pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo<WmsMaterialCoilVo> queryCoilsByContractIdPaginated(Long contractId, PageQuery pageQuery) {
|
public TableDataInfo<WmsMaterialCoilVo> queryCoilsByContractIdPaginated(Long contractId, PageQuery pageQuery, WmsMaterialCoilBo coilBo) {
|
||||||
String coilIds = resolveCoilIdsByContractId(contractId);
|
String coilIds = resolveCoilIdsByContractId(contractId);
|
||||||
if (coilIds == null) {
|
if (coilIds == null) {
|
||||||
return new TableDataInfo<>();
|
return new TableDataInfo<>();
|
||||||
}
|
}
|
||||||
WmsMaterialCoilBo coilBo = new WmsMaterialCoilBo();
|
if (coilBo == null) {
|
||||||
|
coilBo = new WmsMaterialCoilBo();
|
||||||
|
}
|
||||||
coilBo.setCoilIds(coilIds);
|
coilBo.setCoilIds(coilIds);
|
||||||
return iWmsMaterialCoilService.queryPageList(coilBo, pageQuery);
|
return iWmsMaterialCoilService.queryPageList(coilBo, pageQuery);
|
||||||
}
|
}
|
||||||
@@ -398,34 +404,40 @@ public class CrmOrderItemServiceImpl implements ICrmOrderItemService {
|
|||||||
// ==================== 统计汇总查询 ====================
|
// ==================== 统计汇总查询 ====================
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, java.math.BigDecimal> queryCoilsByOrderIdStatistics(Long orderId) {
|
public Map<String, java.math.BigDecimal> queryCoilsByOrderIdStatistics(Long orderId, WmsMaterialCoilBo coilBo) {
|
||||||
String coilIds = resolveCoilIdsByOrderId(orderId);
|
String coilIds = resolveCoilIdsByOrderId(orderId);
|
||||||
if (coilIds == null) {
|
if (coilIds == null) {
|
||||||
return emptyStatistics();
|
return emptyStatistics();
|
||||||
}
|
}
|
||||||
WmsMaterialCoilBo coilBo = new WmsMaterialCoilBo();
|
if (coilBo == null) {
|
||||||
|
coilBo = new WmsMaterialCoilBo();
|
||||||
|
}
|
||||||
coilBo.setCoilIds(coilIds);
|
coilBo.setCoilIds(coilIds);
|
||||||
return iWmsMaterialCoilService.getStatistics(coilBo);
|
return iWmsMaterialCoilService.getStatistics(coilBo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, java.math.BigDecimal> queryCoilsBySalesmanStatistics(String salesman) {
|
public Map<String, java.math.BigDecimal> queryCoilsBySalesmanStatistics(String salesman, WmsMaterialCoilBo coilBo) {
|
||||||
String coilIds = resolveCoilIdsBySalesman(salesman);
|
String coilIds = resolveCoilIdsBySalesman(salesman);
|
||||||
if (coilIds == null) {
|
if (coilIds == null) {
|
||||||
return emptyStatistics();
|
return emptyStatistics();
|
||||||
}
|
}
|
||||||
WmsMaterialCoilBo coilBo = new WmsMaterialCoilBo();
|
if (coilBo == null) {
|
||||||
|
coilBo = new WmsMaterialCoilBo();
|
||||||
|
}
|
||||||
coilBo.setCoilIds(coilIds);
|
coilBo.setCoilIds(coilIds);
|
||||||
return iWmsMaterialCoilService.getStatistics(coilBo);
|
return iWmsMaterialCoilService.getStatistics(coilBo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, java.math.BigDecimal> queryCoilsByContractIdStatistics(Long contractId) {
|
public Map<String, java.math.BigDecimal> queryCoilsByContractIdStatistics(Long orderId, WmsMaterialCoilBo coilBo) {
|
||||||
String coilIds = resolveCoilIdsByContractId(contractId);
|
String coilIds = resolveCoilIdsByContractId(orderId);
|
||||||
if (coilIds == null) {
|
if (coilIds == null) {
|
||||||
return emptyStatistics();
|
return emptyStatistics();
|
||||||
}
|
}
|
||||||
WmsMaterialCoilBo coilBo = new WmsMaterialCoilBo();
|
if (coilBo == null) {
|
||||||
|
coilBo = new WmsMaterialCoilBo();
|
||||||
|
}
|
||||||
coilBo.setCoilIds(coilIds);
|
coilBo.setCoilIds(coilIds);
|
||||||
return iWmsMaterialCoilService.getStatistics(coilBo);
|
return iWmsMaterialCoilService.getStatistics(coilBo);
|
||||||
}
|
}
|
||||||
@@ -433,10 +445,10 @@ public class CrmOrderItemServiceImpl implements ICrmOrderItemService {
|
|||||||
// ==================== 已有方法(非分页) ====================
|
// ==================== 已有方法(非分页) ====================
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<WmsMaterialCoilVo> queryCoilsByContractId(Long contractId) {
|
public List<WmsMaterialCoilVo> queryCoilsByContractId(Long orderId) {
|
||||||
|
|
||||||
LambdaQueryWrapper<WmsDeliveryWaybill> waybillWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<WmsDeliveryWaybill> waybillWrapper = new LambdaQueryWrapper<>();
|
||||||
waybillWrapper.eq(WmsDeliveryWaybill::getOrderId, contractId);
|
waybillWrapper.eq(WmsDeliveryWaybill::getOrderId, orderId);
|
||||||
List<WmsDeliveryWaybill> waybills = wmsDeliveryWaybillMapper.selectList(waybillWrapper);
|
List<WmsDeliveryWaybill> waybills = wmsDeliveryWaybillMapper.selectList(waybillWrapper);
|
||||||
if (waybills == null || waybills.isEmpty()) {
|
if (waybills == null || waybills.isEmpty()) {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// ==================== 配卷列表查询 ====================
|
// ==================== 配卷列表查询(统一 POST + Body BO) ====================
|
||||||
|
|
||||||
// 指定客户的发货配卷列表
|
// 指定客户的发货配卷列表
|
||||||
export function listDeliveryCoilsByCustomer(customerId) {
|
export function listDeliveryCoilsByCustomer(customerId) {
|
||||||
@@ -10,74 +10,76 @@ export function listDeliveryCoilsByCustomer(customerId) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 指定合同的发货配卷列表(分页)
|
// 根据订单ID分页查询发货配卷
|
||||||
export function listDeliveryCoilsByOrder(orderId, query) {
|
export function listDeliveryCoilsByOrder(queryBo) {
|
||||||
return request({
|
return request({
|
||||||
url: `/crm/orderItem/coils/order/${orderId}`,
|
url: '/crm/orderItem/coils/order/query',
|
||||||
method: 'get',
|
method: 'post',
|
||||||
params: query
|
data: queryBo
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 指定销售员的发货配卷列表(分页)
|
// 根据销售员分页查询生产成果
|
||||||
export function listDeliveryCoilsByPrincipal(query) {
|
export function listProductCoilsBySalesman(queryBo) {
|
||||||
|
return request({
|
||||||
|
url: '/crm/orderItem/coils/salesman/query',
|
||||||
|
method: 'post',
|
||||||
|
data: queryBo
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据合同ID分页查询生产成果
|
||||||
|
export function listProductCoilsByContract(queryBo) {
|
||||||
|
return request({
|
||||||
|
url: '/crm/orderItem/coils/contract/query',
|
||||||
|
method: 'post',
|
||||||
|
data: queryBo
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 指定负责人的计划发货配卷列表(分页)
|
||||||
|
export function listDeliveryCoilsByPrincipal(queryBo) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/deliveryWaybillDetail/coilListByPrincipal',
|
url: '/wms/deliveryWaybillDetail/coilListByPrincipal',
|
||||||
method: 'get',
|
method: 'post',
|
||||||
params: query
|
data: queryBo
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 指定销售员的生产成果列表(分页)
|
// ==================== 配卷统计汇总(统一 POST + Body BO) ====================
|
||||||
export function listProductCoilsBySalesman(query) {
|
|
||||||
return request({
|
|
||||||
url: '/crm/orderItem/coils/bySalesman',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 指定合同的生产成果列表(分页)
|
|
||||||
export function listProductCoilsByContract(contractId, query) {
|
|
||||||
return request({
|
|
||||||
url: `/crm/orderItem/coils/byContract/${contractId}`,
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// ==================== 配卷统计汇总 ====================
|
|
||||||
|
|
||||||
// 根据订单ID统计发货配卷汇总
|
// 根据订单ID统计发货配卷汇总
|
||||||
export function getDeliveryCoilsStatisticsByOrder(orderId) {
|
export function getDeliveryCoilsStatisticsByOrder(queryBo) {
|
||||||
return request({
|
return request({
|
||||||
url: `/crm/orderItem/coils/order/${orderId}/statistics`,
|
url: '/crm/orderItem/coils/order/statistics',
|
||||||
method: 'get'
|
method: 'post',
|
||||||
|
data: queryBo
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据销售员统计生产成果汇总
|
// 根据销售员统计生产成果汇总
|
||||||
export function getProductCoilsStatisticsBySalesman(salesman) {
|
export function getProductCoilsStatisticsBySalesman(queryBo) {
|
||||||
return request({
|
return request({
|
||||||
url: '/crm/orderItem/coils/bySalesman/statistics',
|
url: '/crm/orderItem/coils/salesman/statistics',
|
||||||
method: 'get',
|
method: 'post',
|
||||||
params: { salesman }
|
data: queryBo
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据合同ID统计生产成果汇总
|
// 根据合同ID统计生产成果汇总
|
||||||
export function getProductCoilsStatisticsByContract(contractId) {
|
export function getProductCoilsStatisticsByContract(queryBo) {
|
||||||
return request({
|
return request({
|
||||||
url: `/crm/orderItem/coils/byContract/${contractId}/statistics`,
|
url: '/crm/orderItem/coils/contract/statistics',
|
||||||
method: 'get'
|
method: 'post',
|
||||||
|
data: queryBo
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据负责人统计发货配卷汇总
|
// 根据负责人统计发货配卷汇总
|
||||||
export function getDeliveryCoilsStatisticsByPrincipal(principal) {
|
export function getDeliveryCoilsStatisticsByPrincipal(queryBo) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/deliveryWaybillDetail/coilListByPrincipal/statistics',
|
url: '/wms/deliveryWaybillDetail/coilListByPrincipal/statistics',
|
||||||
method: 'get',
|
method: 'post',
|
||||||
params: { principal }
|
data: queryBo
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,13 +44,14 @@ export function delOrder(orderId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询该订单下的配卷(分页)
|
* 查询该订单下的配卷(分页),支持钢卷信息筛选
|
||||||
|
* @param {object} queryBo - { orderId, pageNum, pageSize, ...钢卷筛选条件 }
|
||||||
*/
|
*/
|
||||||
export function listOrderPackaging(orderId, query) {
|
export function listOrderPackaging(queryBo) {
|
||||||
return request({
|
return request({
|
||||||
url: `/crm/orderItem/coils/order/${orderId}`,
|
url: '/crm/orderItem/coils/order/query',
|
||||||
method: 'get',
|
method: 'post',
|
||||||
params: query
|
data: queryBo
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -70,10 +70,10 @@ export function getBoundCoilStatisticsList(query) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 按销售员查询订单明细的卷(分页)
|
// 按销售员查询订单明细的卷(分页)
|
||||||
export function listDeliveryWaybillDetailBySaleman(query) {
|
export function listDeliveryWaybillDetailBySaleman(queryBo) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/deliveryWaybillDetail/coilListByPrincipal',
|
url: '/wms/deliveryWaybillDetail/coilListByPrincipal',
|
||||||
method: 'get',
|
method: 'post',
|
||||||
params: query
|
data: queryBo
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -371,7 +371,7 @@ export default {
|
|||||||
// 获取订单已发货的钢卷
|
// 获取订单已发货的钢卷
|
||||||
getShippedCoils() {
|
getShippedCoils() {
|
||||||
if (this.orderId) {
|
if (this.orderId) {
|
||||||
listOrderPackaging(this.orderId, { pageNum: 1, pageSize: 10000 }).then(response => {
|
listOrderPackaging({ orderId: this.orderId, pageNum: 1, pageSize: 10000 }).then(response => {
|
||||||
this.shippedCoils = response.rows || [];
|
this.shippedCoils = response.rows || [];
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.shippedCoils = [];
|
this.shippedCoils = [];
|
||||||
|
|||||||
@@ -59,6 +59,35 @@
|
|||||||
|
|
||||||
<!-- 生产成果 -->
|
<!-- 生产成果 -->
|
||||||
<div v-show="activeTab === 'product'" v-loading="productCoilLoading">
|
<div v-show="activeTab === 'product'" v-loading="productCoilLoading">
|
||||||
|
<el-form :inline="true" size="small" class="coil-filter-bar">
|
||||||
|
<el-form-item label="钢卷号">
|
||||||
|
<el-input v-model="productCoilBo.currentCoilNo" placeholder="当前钢卷号" clearable @keyup.enter.native="handleProductFilter" style="width: 160px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="材料类型">
|
||||||
|
<el-select v-model="productCoilBo.materialType" placeholder="全部" clearable style="width: 100px;">
|
||||||
|
<el-option label="成品" value="成品" />
|
||||||
|
<el-option label="原料" value="原料" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="质量状态">
|
||||||
|
<el-select v-model="productCoilBo.qualityStatus" placeholder="全部" clearable style="width: 100px;">
|
||||||
|
<el-option label="正常" value="0" />
|
||||||
|
<el-option label="待检" value="1" />
|
||||||
|
<el-option label="不合格" value="2" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="发货状态">
|
||||||
|
<el-select v-model="productCoilBo.status" placeholder="全部" clearable style="width: 100px;">
|
||||||
|
<el-option label="在库" :value="0" />
|
||||||
|
<el-option label="在途" :value="1" />
|
||||||
|
<el-option label="已发货" :value="2" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" size="mini" @click="handleProductFilter">查询</el-button>
|
||||||
|
<el-button size="mini" @click="resetProductFilter">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
<CoilTable ref="productCoilTable" :data="productCoilList || []" :showSelection="true"
|
<CoilTable ref="productCoilTable" :data="productCoilList || []" :showSelection="true"
|
||||||
:pagination="productPagination" :total-statistics="productTotalStatistics"
|
:pagination="productPagination" :total-statistics="productTotalStatistics"
|
||||||
@selection-change="handleProductSelectionChange"
|
@selection-change="handleProductSelectionChange"
|
||||||
@@ -74,6 +103,35 @@
|
|||||||
|
|
||||||
<!-- 发货配卷 -->
|
<!-- 发货配卷 -->
|
||||||
<div v-show="activeTab === 'coil'" v-loading="deliveryCoilLoading">
|
<div v-show="activeTab === 'coil'" v-loading="deliveryCoilLoading">
|
||||||
|
<el-form :inline="true" size="small" class="coil-filter-bar">
|
||||||
|
<el-form-item label="钢卷号">
|
||||||
|
<el-input v-model="deliveryCoilBo.currentCoilNo" placeholder="当前钢卷号" clearable @keyup.enter.native="handleDeliveryFilter" style="width: 160px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="材料类型">
|
||||||
|
<el-select v-model="deliveryCoilBo.materialType" placeholder="全部" clearable style="width: 100px;">
|
||||||
|
<el-option label="成品" value="成品" />
|
||||||
|
<el-option label="原料" value="原料" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="质量状态">
|
||||||
|
<el-select v-model="deliveryCoilBo.qualityStatus" placeholder="全部" clearable style="width: 100px;">
|
||||||
|
<el-option label="正常" value="0" />
|
||||||
|
<el-option label="待检" value="1" />
|
||||||
|
<el-option label="不合格" value="2" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="发货状态">
|
||||||
|
<el-select v-model="deliveryCoilBo.status" placeholder="全部" clearable style="width: 100px;">
|
||||||
|
<el-option label="在库" :value="0" />
|
||||||
|
<el-option label="在途" :value="1" />
|
||||||
|
<el-option label="已发货" :value="2" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" size="mini" @click="handleDeliveryFilter">查询</el-button>
|
||||||
|
<el-button size="mini" @click="resetDeliveryFilter">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
<CoilTable :data="deliveryCoilList || []"
|
<CoilTable :data="deliveryCoilList || []"
|
||||||
:pagination="deliveryPagination" :total-statistics="deliveryTotalStatistics"
|
:pagination="deliveryPagination" :total-statistics="deliveryTotalStatistics"
|
||||||
@page-change="handleDeliveryPageChange" />
|
@page-change="handleDeliveryPageChange" />
|
||||||
@@ -205,10 +263,12 @@ export default {
|
|||||||
productCoilStatistics: {},
|
productCoilStatistics: {},
|
||||||
productPagination: { total: 0, currentPage: 1, pageSize: 20 },
|
productPagination: { total: 0, currentPage: 1, pageSize: 20 },
|
||||||
productCoilLoading: false,
|
productCoilLoading: false,
|
||||||
|
productCoilBo: {},
|
||||||
deliveryCoilList: [],
|
deliveryCoilList: [],
|
||||||
deliveryCoilStatistics: {},
|
deliveryCoilStatistics: {},
|
||||||
deliveryPagination: { total: 0, currentPage: 1, pageSize: 20 },
|
deliveryPagination: { total: 0, currentPage: 1, pageSize: 20 },
|
||||||
deliveryCoilLoading: false,
|
deliveryCoilLoading: false,
|
||||||
|
deliveryCoilBo: {},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -302,9 +362,11 @@ export default {
|
|||||||
},
|
},
|
||||||
fetchDeliveryCoils() {
|
fetchDeliveryCoils() {
|
||||||
this.deliveryCoilLoading = true;
|
this.deliveryCoilLoading = true;
|
||||||
listDeliveryCoilsByOrder(this.orderId, {
|
listDeliveryCoilsByOrder({
|
||||||
|
orderId: this.orderId,
|
||||||
pageNum: this.deliveryPagination.currentPage,
|
pageNum: this.deliveryPagination.currentPage,
|
||||||
pageSize: this.deliveryPagination.pageSize
|
pageSize: this.deliveryPagination.pageSize,
|
||||||
|
coilBo: this.deliveryCoilBo
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.deliveryCoilList = res.rows || [];
|
this.deliveryCoilList = res.rows || [];
|
||||||
this.deliveryPagination.total = res.total || 0;
|
this.deliveryPagination.total = res.total || 0;
|
||||||
@@ -314,9 +376,11 @@ export default {
|
|||||||
},
|
},
|
||||||
fetchProductCoils() {
|
fetchProductCoils() {
|
||||||
this.productCoilLoading = true;
|
this.productCoilLoading = true;
|
||||||
listProductCoilsByContract(this.orderId, {
|
listProductCoilsByContract({
|
||||||
|
contractId: this.orderId,
|
||||||
pageNum: this.productPagination.currentPage,
|
pageNum: this.productPagination.currentPage,
|
||||||
pageSize: this.productPagination.pageSize
|
pageSize: this.productPagination.pageSize,
|
||||||
|
coilBo: this.productCoilBo
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.productCoilList = res.rows || [];
|
this.productCoilList = res.rows || [];
|
||||||
this.productPagination.total = res.total || 0;
|
this.productPagination.total = res.total || 0;
|
||||||
@@ -325,15 +389,33 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
fetchDeliveryCoilStatistics() {
|
fetchDeliveryCoilStatistics() {
|
||||||
getDeliveryCoilsStatisticsByOrder(this.orderId).then(res => {
|
getDeliveryCoilsStatisticsByOrder({ orderId: this.orderId, coilBo: this.deliveryCoilBo }).then(res => {
|
||||||
this.deliveryCoilStatistics = res.data || {};
|
this.deliveryCoilStatistics = res.data || {};
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
fetchProductCoilStatistics() {
|
fetchProductCoilStatistics() {
|
||||||
getProductCoilsStatisticsByContract(this.orderId).then(res => {
|
getProductCoilsStatisticsByContract({ contractId: this.orderId, coilBo: this.productCoilBo }).then(res => {
|
||||||
this.productCoilStatistics = res.data || {};
|
this.productCoilStatistics = res.data || {};
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleProductFilter() {
|
||||||
|
this.productPagination.currentPage = 1;
|
||||||
|
this.fetchProductCoils();
|
||||||
|
this.fetchProductCoilStatistics();
|
||||||
|
},
|
||||||
|
resetProductFilter() {
|
||||||
|
this.productCoilBo = {};
|
||||||
|
this.handleProductFilter();
|
||||||
|
},
|
||||||
|
handleDeliveryFilter() {
|
||||||
|
this.deliveryPagination.currentPage = 1;
|
||||||
|
this.fetchDeliveryCoils();
|
||||||
|
this.fetchDeliveryCoilStatistics();
|
||||||
|
},
|
||||||
|
resetDeliveryFilter() {
|
||||||
|
this.deliveryCoilBo = {};
|
||||||
|
this.handleDeliveryFilter();
|
||||||
|
},
|
||||||
handleProductPageChange({ currentPage, pageSize }) {
|
handleProductPageChange({ currentPage, pageSize }) {
|
||||||
this.productPagination.currentPage = currentPage;
|
this.productPagination.currentPage = currentPage;
|
||||||
this.productPagination.pageSize = pageSize;
|
this.productPagination.pageSize = pageSize;
|
||||||
|
|||||||
@@ -469,7 +469,7 @@ export default {
|
|||||||
// 获取订单已发货的钢卷
|
// 获取订单已发货的钢卷
|
||||||
getShippedCoils() {
|
getShippedCoils() {
|
||||||
if (this.form.orderId) {
|
if (this.form.orderId) {
|
||||||
listOrderPackaging(this.form.orderId, { pageNum: 1, pageSize: 10000 }).then(response => {
|
listOrderPackaging({ orderId: this.form.orderId, pageNum: 1, pageSize: 10000 }).then(response => {
|
||||||
this.shippedCoils = response.rows || [];
|
this.shippedCoils = response.rows || [];
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.shippedCoils = [];
|
this.shippedCoils = [];
|
||||||
|
|||||||
@@ -86,6 +86,28 @@
|
|||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="发货配卷" name="coil">
|
<el-tab-pane label="发货配卷" name="coil">
|
||||||
<div class="order-record" v-if="activeTab === 'coil'">
|
<div class="order-record" v-if="activeTab === 'coil'">
|
||||||
|
<el-form :inline="true" size="small" class="coil-filter-bar" style="margin-bottom: 8px;">
|
||||||
|
<el-form-item label="钢卷号">
|
||||||
|
<el-input v-model="coilBo.currentCoilNo" placeholder="当前钢卷号" clearable @keyup.enter.native="handleCoilFilter" style="width: 160px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="材料类型">
|
||||||
|
<el-select v-model="coilBo.materialType" placeholder="全部" clearable style="width: 100px;">
|
||||||
|
<el-option label="成品" value="成品" />
|
||||||
|
<el-option label="原料" value="原料" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="发货状态">
|
||||||
|
<el-select v-model="coilBo.status" placeholder="全部" clearable style="width: 100px;">
|
||||||
|
<el-option label="在库" :value="0" />
|
||||||
|
<el-option label="在途" :value="1" />
|
||||||
|
<el-option label="已发货" :value="2" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" size="mini" @click="handleCoilFilter">查询</el-button>
|
||||||
|
<el-button size="mini" @click="resetCoilFilter">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
<!-- 发货配卷内容 -->
|
<!-- 发货配卷内容 -->
|
||||||
<CoilTable :data="coilList" />
|
<CoilTable :data="coilList" />
|
||||||
</div>
|
</div>
|
||||||
@@ -227,6 +249,7 @@ export default {
|
|||||||
customerList: [],
|
customerList: [],
|
||||||
contractList: [],
|
contractList: [],
|
||||||
coilList: [],
|
coilList: [],
|
||||||
|
coilBo: {},
|
||||||
deliveryWaybillList: [],
|
deliveryWaybillList: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -259,10 +282,22 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 查询发货配卷列表 */
|
/** 查询发货配卷列表 */
|
||||||
getCoilList() {
|
getCoilList() {
|
||||||
listOrderPackaging(this.currentOrder.orderId, { pageNum: 1, pageSize: 10000 }).then(response => {
|
listOrderPackaging({
|
||||||
|
orderId: this.currentOrder.orderId,
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10000,
|
||||||
|
coilBo: this.coilBo
|
||||||
|
}).then(response => {
|
||||||
this.coilList = response.rows || [];
|
this.coilList = response.rows || [];
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleCoilFilter() {
|
||||||
|
this.getCoilList();
|
||||||
|
},
|
||||||
|
resetCoilFilter() {
|
||||||
|
this.coilBo = {};
|
||||||
|
this.getCoilList();
|
||||||
|
},
|
||||||
/** 合同号改变事件 */
|
/** 合同号改变事件 */
|
||||||
handleContractChange(contractId) {
|
handleContractChange(contractId) {
|
||||||
const contract = this.contractList.find(item => item.contractId === contractId)
|
const contract = this.contractList.find(item => item.contractId === contractId)
|
||||||
|
|||||||
@@ -77,14 +77,65 @@
|
|||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="生产成果" name="production">
|
<el-tab-pane label="生产成果" name="production">
|
||||||
<div v-loading="productCoilLoading">
|
<div v-loading="productCoilLoading">
|
||||||
<CoilTable :data="productList || []" table-height="calc(100vh - 240px)"
|
<el-form :inline="true" size="small" class="coil-filter-bar" style="margin-bottom: 8px;">
|
||||||
|
<el-form-item label="钢卷号">
|
||||||
|
<el-input v-model="productCoilBo.currentCoilNo" placeholder="当前钢卷号" clearable @keyup.enter.native="handleProductFilter" style="width: 160px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="材料类型">
|
||||||
|
<el-select v-model="productCoilBo.materialType" placeholder="全部" clearable style="width: 100px;">
|
||||||
|
<el-option label="成品" value="成品" />
|
||||||
|
<el-option label="原料" value="原料" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="质量状态">
|
||||||
|
<el-select v-model="productCoilBo.qualityStatus" placeholder="全部" clearable style="width: 100px;">
|
||||||
|
<el-option label="正常" value="0" />
|
||||||
|
<el-option label="待检" value="1" />
|
||||||
|
<el-option label="不合格" value="2" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="发货状态">
|
||||||
|
<el-select v-model="productCoilBo.status" placeholder="全部" clearable style="width: 100px;">
|
||||||
|
<el-option label="在库" :value="0" />
|
||||||
|
<el-option label="在途" :value="1" />
|
||||||
|
<el-option label="已发货" :value="2" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" size="mini" @click="handleProductFilter">查询</el-button>
|
||||||
|
<el-button size="mini" @click="resetProductFilter">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<CoilTable :data="productList || []" table-height="calc(100vh - 290px)"
|
||||||
:pagination="productPagination" :total-statistics="productTotalStatistics"
|
:pagination="productPagination" :total-statistics="productTotalStatistics"
|
||||||
@page-change="handleProductPageChange" />
|
@page-change="handleProductPageChange" />
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="计划发货" name="planDelivery">
|
<el-tab-pane label="计划发货" name="planDelivery">
|
||||||
<div v-loading="deliveryCoilLoading">
|
<div v-loading="deliveryCoilLoading">
|
||||||
<CoilTable :data="deliveryList || []" table-height="calc(100vh - 240px)"
|
<el-form :inline="true" size="small" class="coil-filter-bar" style="margin-bottom: 8px;">
|
||||||
|
<el-form-item label="钢卷号">
|
||||||
|
<el-input v-model="deliveryCoilBo.currentCoilNo" placeholder="当前钢卷号" clearable @keyup.enter.native="handleDeliveryFilter" style="width: 160px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="材料类型">
|
||||||
|
<el-select v-model="deliveryCoilBo.materialType" placeholder="全部" clearable style="width: 100px;">
|
||||||
|
<el-option label="成品" value="成品" />
|
||||||
|
<el-option label="原料" value="原料" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="质量状态">
|
||||||
|
<el-select v-model="deliveryCoilBo.qualityStatus" placeholder="全部" clearable style="width: 100px;">
|
||||||
|
<el-option label="正常" value="0" />
|
||||||
|
<el-option label="待检" value="1" />
|
||||||
|
<el-option label="不合格" value="2" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" size="mini" @click="handleDeliveryFilter">查询</el-button>
|
||||||
|
<el-button size="mini" @click="resetDeliveryFilter">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<CoilTable :data="deliveryList || []" table-height="calc(100vh - 290px)"
|
||||||
:pagination="deliveryPagination" :total-statistics="deliveryTotalStatistics"
|
:pagination="deliveryPagination" :total-statistics="deliveryTotalStatistics"
|
||||||
@page-change="handleDeliveryPageChange" />
|
@page-change="handleDeliveryPageChange" />
|
||||||
</div>
|
</div>
|
||||||
@@ -181,6 +232,8 @@ export default {
|
|||||||
productPagination: { total: 0, currentPage: 1, pageSize: 20 },
|
productPagination: { total: 0, currentPage: 1, pageSize: 20 },
|
||||||
// 生产成果统计
|
// 生产成果统计
|
||||||
productCoilStatistics: {},
|
productCoilStatistics: {},
|
||||||
|
// 生产成果筛选
|
||||||
|
productCoilBo: {},
|
||||||
// 生产成果加载
|
// 生产成果加载
|
||||||
productCoilLoading: false,
|
productCoilLoading: false,
|
||||||
// 计划发货列表
|
// 计划发货列表
|
||||||
@@ -189,6 +242,8 @@ export default {
|
|||||||
deliveryPagination: { total: 0, currentPage: 1, pageSize: 20 },
|
deliveryPagination: { total: 0, currentPage: 1, pageSize: 20 },
|
||||||
// 计划发货统计
|
// 计划发货统计
|
||||||
deliveryCoilStatistics: {},
|
deliveryCoilStatistics: {},
|
||||||
|
// 计划发货筛选
|
||||||
|
deliveryCoilBo: {},
|
||||||
// 计划发货加载
|
// 计划发货加载
|
||||||
deliveryCoilLoading: false,
|
deliveryCoilLoading: false,
|
||||||
// 发货单据列表
|
// 发货单据列表
|
||||||
@@ -349,9 +404,10 @@ export default {
|
|||||||
fetchProductCoils(salesman) {
|
fetchProductCoils(salesman) {
|
||||||
this.productCoilLoading = true;
|
this.productCoilLoading = true;
|
||||||
return listProductCoilsBySalesman({
|
return listProductCoilsBySalesman({
|
||||||
salesman: salesman,
|
salesman,
|
||||||
pageNum: this.productPagination.currentPage,
|
pageNum: this.productPagination.currentPage,
|
||||||
pageSize: this.productPagination.pageSize
|
pageSize: this.productPagination.pageSize,
|
||||||
|
coilBo: this.productCoilBo
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.productList = res.rows || [];
|
this.productList = res.rows || [];
|
||||||
this.productPagination.total = res.total || 0;
|
this.productPagination.total = res.total || 0;
|
||||||
@@ -364,16 +420,28 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
fetchProductCoilStatistics(salesman) {
|
fetchProductCoilStatistics(salesman) {
|
||||||
getProductCoilsStatisticsBySalesman(salesman).then(res => {
|
getProductCoilsStatisticsBySalesman({ salesman, coilBo: this.productCoilBo }).then(res => {
|
||||||
this.productCoilStatistics = res.data || {};
|
this.productCoilStatistics = res.data || {};
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleProductFilter() {
|
||||||
|
this.productPagination.currentPage = 1;
|
||||||
|
if (this.selectedItem) {
|
||||||
|
this.fetchProductCoils(this.selectedItem.dictValue);
|
||||||
|
this.fetchProductCoilStatistics(this.selectedItem.dictValue);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
resetProductFilter() {
|
||||||
|
this.productCoilBo = {};
|
||||||
|
this.handleProductFilter();
|
||||||
|
},
|
||||||
fetchDeliveryCoils(principal) {
|
fetchDeliveryCoils(principal) {
|
||||||
this.deliveryCoilLoading = true;
|
this.deliveryCoilLoading = true;
|
||||||
return listDeliveryCoilsByPrincipal({
|
return listDeliveryCoilsByPrincipal({
|
||||||
principal: principal,
|
principal,
|
||||||
pageNum: this.deliveryPagination.currentPage,
|
pageNum: this.deliveryPagination.currentPage,
|
||||||
pageSize: this.deliveryPagination.pageSize
|
pageSize: this.deliveryPagination.pageSize,
|
||||||
|
coilBo: this.deliveryCoilBo
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.deliveryList = res.rows || [];
|
this.deliveryList = res.rows || [];
|
||||||
this.deliveryPagination.total = res.total || 0;
|
this.deliveryPagination.total = res.total || 0;
|
||||||
@@ -386,10 +454,21 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
fetchDeliveryCoilStatistics(principal) {
|
fetchDeliveryCoilStatistics(principal) {
|
||||||
getDeliveryCoilsStatisticsByPrincipal(principal).then(res => {
|
getDeliveryCoilsStatisticsByPrincipal({ principal, coilBo: this.deliveryCoilBo }).then(res => {
|
||||||
this.deliveryCoilStatistics = res.data || {};
|
this.deliveryCoilStatistics = res.data || {};
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleDeliveryFilter() {
|
||||||
|
this.deliveryPagination.currentPage = 1;
|
||||||
|
if (this.selectedItem) {
|
||||||
|
this.fetchDeliveryCoils(this.selectedItem.dictValue);
|
||||||
|
this.fetchDeliveryCoilStatistics(this.selectedItem.dictValue);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
resetDeliveryFilter() {
|
||||||
|
this.deliveryCoilBo = {};
|
||||||
|
this.handleDeliveryFilter();
|
||||||
|
},
|
||||||
handleProductPageChange({ currentPage, pageSize }) {
|
handleProductPageChange({ currentPage, pageSize }) {
|
||||||
this.productPagination.currentPage = currentPage;
|
this.productPagination.currentPage = currentPage;
|
||||||
this.productPagination.pageSize = pageSize;
|
this.productPagination.pageSize = pageSize;
|
||||||
|
|||||||
@@ -132,6 +132,35 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="detail-card-body" style="padding: 12px;">
|
<div class="detail-card-body" style="padding: 12px;">
|
||||||
<div v-loading="productCoilLoading">
|
<div v-loading="productCoilLoading">
|
||||||
|
<el-form :inline="true" size="small" class="coil-filter-bar" style="margin-bottom: 8px;">
|
||||||
|
<el-form-item label="钢卷号">
|
||||||
|
<el-input v-model="productCoilBo.currentCoilNo" placeholder="当前钢卷号" clearable @keyup.enter.native="handleProductFilter" style="width: 160px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="材料类型">
|
||||||
|
<el-select v-model="productCoilBo.materialType" placeholder="全部" clearable style="width: 100px;">
|
||||||
|
<el-option label="成品" value="成品" />
|
||||||
|
<el-option label="原料" value="原料" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="质量状态">
|
||||||
|
<el-select v-model="productCoilBo.qualityStatus" placeholder="全部" clearable style="width: 100px;">
|
||||||
|
<el-option label="正常" value="0" />
|
||||||
|
<el-option label="待检" value="1" />
|
||||||
|
<el-option label="不合格" value="2" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="发货状态">
|
||||||
|
<el-select v-model="productCoilBo.status" placeholder="全部" clearable style="width: 100px;">
|
||||||
|
<el-option label="在库" :value="0" />
|
||||||
|
<el-option label="在途" :value="1" />
|
||||||
|
<el-option label="已发货" :value="2" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" size="mini" @click="handleProductFilter">查询</el-button>
|
||||||
|
<el-button size="mini" @click="resetProductFilter">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
<CoilTable ref="productCoilTable" :data="productCoilList || []" :showSelection="true"
|
<CoilTable ref="productCoilTable" :data="productCoilList || []" :showSelection="true"
|
||||||
:pagination="productPagination" :total-statistics="productTotalStatistics"
|
:pagination="productPagination" :total-statistics="productTotalStatistics"
|
||||||
@selection-change="handleProductSelectionChange" @page-change="handleProductPageChange">
|
@selection-change="handleProductSelectionChange" @page-change="handleProductPageChange">
|
||||||
@@ -221,6 +250,7 @@ export default {
|
|||||||
productCoilStatistics: {},
|
productCoilStatistics: {},
|
||||||
productPagination: { total: 0, currentPage: 1, pageSize: 20 },
|
productPagination: { total: 0, currentPage: 1, pageSize: 20 },
|
||||||
productCoilLoading: false,
|
productCoilLoading: false,
|
||||||
|
productCoilBo: {},
|
||||||
batchTransferDialogVisible: false,
|
batchTransferDialogVisible: false,
|
||||||
batchTargetContractId: '',
|
batchTargetContractId: '',
|
||||||
batchTransferCoilIds: [],
|
batchTransferCoilIds: [],
|
||||||
@@ -387,9 +417,11 @@ export default {
|
|||||||
fetchProductCoils() {
|
fetchProductCoils() {
|
||||||
if (!this.currentOrder || !this.currentOrder.orderId) return
|
if (!this.currentOrder || !this.currentOrder.orderId) return
|
||||||
this.productCoilLoading = true
|
this.productCoilLoading = true
|
||||||
listProductCoilsByContract(this.currentOrder.orderId, {
|
listProductCoilsByContract({
|
||||||
|
contractId: this.currentOrder.orderId,
|
||||||
pageNum: this.productPagination.currentPage,
|
pageNum: this.productPagination.currentPage,
|
||||||
pageSize: this.productPagination.pageSize
|
pageSize: this.productPagination.pageSize,
|
||||||
|
coilBo: this.productCoilBo
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.productCoilList = res.rows || []
|
this.productCoilList = res.rows || []
|
||||||
this.productPagination.total = res.total || 0
|
this.productPagination.total = res.total || 0
|
||||||
@@ -399,10 +431,19 @@ export default {
|
|||||||
},
|
},
|
||||||
fetchProductCoilStatistics() {
|
fetchProductCoilStatistics() {
|
||||||
if (!this.currentOrder || !this.currentOrder.orderId) return
|
if (!this.currentOrder || !this.currentOrder.orderId) return
|
||||||
getProductCoilsStatisticsByContract(this.currentOrder.orderId).then(res => {
|
getProductCoilsStatisticsByContract({ contractId: this.currentOrder.orderId, coilBo: this.productCoilBo }).then(res => {
|
||||||
this.productCoilStatistics = res.data || {}
|
this.productCoilStatistics = res.data || {}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
handleProductFilter() {
|
||||||
|
this.productPagination.currentPage = 1
|
||||||
|
this.fetchProductCoils()
|
||||||
|
this.fetchProductCoilStatistics()
|
||||||
|
},
|
||||||
|
resetProductFilter() {
|
||||||
|
this.productCoilBo = {}
|
||||||
|
this.handleProductFilter()
|
||||||
|
},
|
||||||
handleProductSelectionChange(selection) {
|
handleProductSelectionChange(selection) {
|
||||||
this.selectedProductRows = selection
|
this.selectedProductRows = selection
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import com.klp.domain.vo.WmsDeliveryWaybillDetailVo;
|
|||||||
import com.klp.domain.bo.WmsDeliveryWaybillDetailBo;
|
import com.klp.domain.bo.WmsDeliveryWaybillDetailBo;
|
||||||
import com.klp.service.IWmsDeliveryWaybillDetailService;
|
import com.klp.service.IWmsDeliveryWaybillDetailService;
|
||||||
import com.klp.domain.bo.WmsMaterialCoilBo;
|
import com.klp.domain.bo.WmsMaterialCoilBo;
|
||||||
|
import com.klp.domain.bo.PrincipalCoilQueryBo;
|
||||||
import com.klp.service.IWmsMaterialCoilService;
|
import com.klp.service.IWmsMaterialCoilService;
|
||||||
import com.klp.common.core.page.TableDataInfo;
|
import com.klp.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
@@ -188,34 +189,34 @@ public class WmsDeliveryWaybillDetailController extends BaseController {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据负责人(principal)查询已发货绑定的钢卷列表(分页)
|
* 根据负责人(principal)查询已发货绑定的钢卷列表(分页),支持钢卷信息筛选
|
||||||
*/
|
*/
|
||||||
@GetMapping("/coilListByPrincipal")
|
@PostMapping("/coilListByPrincipal")
|
||||||
public TableDataInfo<WmsMaterialCoilVo> coilListByPrincipal(
|
public TableDataInfo<WmsMaterialCoilVo> coilListByPrincipal(@RequestBody PrincipalCoilQueryBo bo) {
|
||||||
@RequestParam(required = false) String principal,
|
List<Long> boundCoilIds = iWmsDeliveryWaybillDetailService.getBoundCoilIdsByPrincipal(bo.getPrincipal());
|
||||||
PageQuery pageQuery) {
|
|
||||||
List<Long> boundCoilIds = iWmsDeliveryWaybillDetailService.getBoundCoilIdsByPrincipal(principal);
|
|
||||||
if (boundCoilIds == null || boundCoilIds.isEmpty()) {
|
if (boundCoilIds == null || boundCoilIds.isEmpty()) {
|
||||||
return new TableDataInfo<>();
|
return new TableDataInfo<>();
|
||||||
}
|
}
|
||||||
WmsMaterialCoilBo wmsMaterialCoilBo = new WmsMaterialCoilBo();
|
WmsMaterialCoilBo coilBo = bo.getCoilBo() != null ? bo.getCoilBo() : new WmsMaterialCoilBo();
|
||||||
wmsMaterialCoilBo.setCoilIds(boundCoilIds.stream().map(String::valueOf).collect(Collectors.joining(",")));
|
coilBo.setCoilIds(boundCoilIds.stream().map(String::valueOf).collect(Collectors.joining(",")));
|
||||||
return iWmsMaterialCoilService.queryPageList(wmsMaterialCoilBo, pageQuery);
|
PageQuery pageQuery = new PageQuery();
|
||||||
|
pageQuery.setPageNum(bo.getPageNum());
|
||||||
|
pageQuery.setPageSize(bo.getPageSize());
|
||||||
|
return iWmsMaterialCoilService.queryPageList(coilBo, pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据负责人(principal)统计已发货绑定钢卷的汇总数据(数量、毛重、净重)
|
* 根据负责人(principal)统计已发货绑定钢卷的汇总数据,支持钢卷信息筛选
|
||||||
*/
|
*/
|
||||||
@GetMapping("/coilListByPrincipal/statistics")
|
@PostMapping("/coilListByPrincipal/statistics")
|
||||||
public R<java.util.Map<String, java.math.BigDecimal>> getCoilListByPrincipalStatistics(
|
public R<java.util.Map<String, java.math.BigDecimal>> getCoilListByPrincipalStatistics(@RequestBody PrincipalCoilQueryBo bo) {
|
||||||
@RequestParam(required = false) String principal) {
|
List<Long> boundCoilIds = iWmsDeliveryWaybillDetailService.getBoundCoilIdsByPrincipal(bo.getPrincipal());
|
||||||
List<Long> boundCoilIds = iWmsDeliveryWaybillDetailService.getBoundCoilIdsByPrincipal(principal);
|
|
||||||
if (boundCoilIds == null || boundCoilIds.isEmpty()) {
|
if (boundCoilIds == null || boundCoilIds.isEmpty()) {
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
WmsMaterialCoilBo wmsMaterialCoilBo = new WmsMaterialCoilBo();
|
WmsMaterialCoilBo coilBo = bo.getCoilBo() != null ? bo.getCoilBo() : new WmsMaterialCoilBo();
|
||||||
wmsMaterialCoilBo.setCoilIds(boundCoilIds.stream().map(String::valueOf).collect(Collectors.joining(",")));
|
coilBo.setCoilIds(boundCoilIds.stream().map(String::valueOf).collect(Collectors.joining(",")));
|
||||||
return R.ok(iWmsMaterialCoilService.getStatistics(wmsMaterialCoilBo));
|
return R.ok(iWmsMaterialCoilService.getStatistics(coilBo));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.klp.domain.bo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责人钢卷查询请求对象
|
||||||
|
*
|
||||||
|
* @author klp
|
||||||
|
* @date 2026-07-09
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PrincipalCoilQueryBo implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 负责人 */
|
||||||
|
private String principal;
|
||||||
|
|
||||||
|
/** 分页页码 */
|
||||||
|
private Integer pageNum;
|
||||||
|
|
||||||
|
/** 分页大小 */
|
||||||
|
private Integer pageSize;
|
||||||
|
|
||||||
|
/** 钢卷筛选条件 */
|
||||||
|
private WmsMaterialCoilBo coilBo;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user