新增配套信息统计

liweidong
ShiJiuZhou 4 days ago
parent 752fb9ee4c
commit 44b28688e1
  1. 23
      blade-service-api/blade-erpdata-api/src/main/java/org/springblade/erpdata/feign/IErpDataLogisticsClient.java
  2. 10
      blade-service-api/blade-erpdata-api/src/main/java/org/springblade/erpdata/feign/IErpDataLogisticsClientFallback.java
  3. 9
      blade-service/blade-desk/src/main/java/org/springblade/desk/produce/service/IWorkOrderService.java
  4. 11
      blade-service/blade-desk/src/main/java/org/springblade/desk/produce/service/impl/WorkOrderServiceImpl.java
  5. 7
      blade-service/blade-desk/src/main/java/org/springblade/desk/quality/controller/PlanTestController.java
  6. 10
      blade-service/blade-erpdata/src/main/java/org/springblade/erpdata/feign/ErpDataLogisticsClient.java
  7. 18
      blade-service/blade-erpdata/src/main/java/org/springblade/erpdata/mapper/ErpDataLogisticsMapper.java
  8. 221
      blade-service/blade-erpdata/src/main/java/org/springblade/erpdata/mapper/ErpDataLogisticsMapper.xml
  9. 18
      blade-service/blade-erpdata/src/main/java/org/springblade/erpdata/service/IErpDataLogisticsService.java
  10. 10
      blade-service/blade-erpdata/src/main/java/org/springblade/erpdata/service/impl/ErpDataLogisticsServiceImpl.java

@ -26,8 +26,11 @@ public interface IErpDataLogisticsClient {
String QUERY_ALLOCATION_MESS = API_PREFIX + "/queryAllocationMess";
String QUERY_ALLOCATION_MESS_NUM = API_PREFIX + "/queryAllocationMessNum";
String QUERY_ALLOCATION_STATISTICS = API_PREFIX + "/queryAllocationStatistics";
String QUERY_ALLOCATION_STATISTICS_NUM = API_PREFIX + "/queryAllocationStatisticsNum";
/**
* 查询调拨单
* 查询配套信息详情
* @param dto 查询条件
* @return 调拨单
*/
@ -35,10 +38,26 @@ public interface IErpDataLogisticsClient {
R<List<AllocationMessVO>> queryAllocationMess(@RequestBody AllocationMessPageDTO dto);
/**
* 查询调拨单数量
* 查询配套信息详情数量
* @param dto 查询条件
* @return 数量
*/
@PostMapping(QUERY_ALLOCATION_MESS_NUM)
R<Integer> queryAllocationMessNum(@RequestBody AllocationMessPageDTO dto);
/**
* 查询配套信息统计
* @param dto 查询条件
* @return 调拨单
*/
@PostMapping(QUERY_ALLOCATION_STATISTICS)
R<List<AllocationMessVO>> queryAllocationStatistics(@RequestBody AllocationMessPageDTO dto);
/**
* 查询配套信息统计数量
* @param dto 查询条件
* @return 数量
*/
@PostMapping(QUERY_ALLOCATION_STATISTICS_NUM)
R<Integer> queryAllocationStatisticsNum(@RequestBody AllocationMessPageDTO dto);
}

@ -24,4 +24,14 @@ public class IErpDataLogisticsClientFallback implements IErpDataLogisticsClient{
public R<Integer> queryAllocationMessNum(AllocationMessPageDTO dto) {
return R.fail("获取数据失败");
}
@Override
public R<List<AllocationMessVO>> queryAllocationStatistics(AllocationMessPageDTO dto) {
return R.fail("获取数据失败");
}
@Override
public R<Integer> queryAllocationStatisticsNum(AllocationMessPageDTO dto) {
return R.fail("获取数据失败");
}
}

@ -263,9 +263,16 @@ public interface IWorkOrderService extends BaseService<WorkOrder> {
void launchTest(Map<String,Object> data, BladeUser user) throws Exception;
/**
* 查询配信息
* 查询配信息
* @param dto 查询条件
* @return 分配信息
*/
Map<String,Object> queryAllocationMess(AllocationMessPageDTO dto);
/**
* 查询配套统计信息
* @param dto 查询条件
* @return 分配信息
*/
Map<String, Object> queryAllocationStatistics(AllocationMessPageDTO dto);
}

@ -2680,6 +2680,17 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO
return result;
}
@Override
public Map<String,Object> queryAllocationStatistics(AllocationMessPageDTO dto) {
List<AllocationMessVO> allocationMessList = erpDataLogisticsClient.queryAllocationStatistics(dto).getData();
int totalAllocationMessNum = erpDataLogisticsClient.queryAllocationStatisticsNum(dto).getData();
Map<String,Object> result = new HashMap<>(3);
result.put("current",dto.getCurrent());
result.put("record",allocationMessList);
result.put("total",totalAllocationMessNum);
return result;
}
@Override
public void launchTest(Map<String, Object> data, BladeUser user) throws Exception {
// 提取参数

@ -316,4 +316,11 @@ public class PlanTestController extends BladeController {
public R<Map<String,Object>> queryAllocationMess(@RequestBody AllocationMessPageDTO allocationMessPageDTO) {
return R.data(workOrderService.queryAllocationMess(allocationMessPageDTO));
}
@PostMapping(value = "/queryAllocationStatistics")
@ApiOperationSupport(order = 1)
@Operation(summary = "加载配套信息统计", description = "filterContext 查询参数")
public R<Map<String,Object>> queryAllocationStatistics(@RequestBody AllocationMessPageDTO allocationMessPageDTO) {
return R.data(workOrderService.queryAllocationStatistics(allocationMessPageDTO));
}
}

@ -34,4 +34,14 @@ public class ErpDataLogisticsClient implements IErpDataLogisticsClient {
public R<Integer> queryAllocationMessNum(AllocationMessPageDTO dto) {
return R.data(erpDataLogisticsService.queryAllocationMessNum(dto));
}
@Override
public R<List<AllocationMessVO>> queryAllocationStatistics(AllocationMessPageDTO dto) {
return R.data(erpDataLogisticsService.queryAllocationStatistics(dto));
}
@Override
public R<Integer> queryAllocationStatisticsNum(AllocationMessPageDTO dto) {
return R.data(erpDataLogisticsService.queryAllocationStatisticsNum(dto));
}
}

@ -14,16 +14,30 @@ import java.util.List;
public interface ErpDataLogisticsMapper extends Mapper {
/**
* 查询调拨单
* 查询配置信息详情
* @param dto 查询条件
* @return 调拨单列表
*/
List<AllocationMessVO> queryAllocationMess(@Param("dto") AllocationMessPageDTO dto);
/**
* 查询调拨单数量
* 查询配置信息详情数量
* @param dto 查询条件
* @return 调拨单数量
*/
Integer queryAllocationMessNum(@Param("dto") AllocationMessPageDTO dto);
/**
* 查询配置信息统计
* @param dto 查询条件
* @return 调拨单列表
*/
List<AllocationMessVO> queryAllocationStatistics(@Param("dto") AllocationMessPageDTO dto);
/**
* 查询配置信息统计数量
* @param dto 查询条件
* @return 调拨单数量
*/
Integer queryAllocationStatisticsNum(@Param("dto") AllocationMessPageDTO dto);
}

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.erpdata.mapper.ErpDataLogisticsMapper">
<!-- 查询调拨单列表 -->
<!-- 查询配套明细列表 -->
<select id="queryAllocationMess" resultType="org.springblade.desk.logistics.pojo.vo.AllocationMessVO">
SELECT * FROM (
SELECT t1.*, ROWNUM no FROM (
@ -20,6 +20,24 @@
<if test="dto.prtlotno != null and dto.prtlotno != ''">
AND a.prtlotno = #{dto.prtlotno}
</if>
<if test="dto.pkreqdat != null and dto.pkreqdat != ''">
AND a.pkreqdat = #{dto.pkreqdat}
</if>
<if test="dto.fjSplcode != null and dto.fjSplcode != ''">
AND a.fj_splcode = #{dto.fjSplcode}
</if>
<if test="dto.fjPkavqty != null and dto.fjPkavqty != ''">
AND a.fj_pkavqty = #{dto.fjPkavqty}
</if>
<if test="dto.serialno != null and dto.serialno != ''">
AND a.serialno = #{dto.serialno}
</if>
<if test="dto.prtmdept != null and dto.prtmdept != ''">
AND a.prtmdept = #{dto.prtmdept}
</if>
<if test="dto.plnsign != null and dto.plnsign != ''">
AND a.plnsign = #{dto.plnsign}
</if>
<if test="dto.mono != null and dto.mono != ''">
AND a.mono = #{dto.mono}
</if>
@ -29,12 +47,21 @@
<if test="dto.planner1 != null and dto.planner1 != ''">
AND a.planner1 = #{dto.planner1}
</if>
<if test="dto.subpkdate != null and dto.subpkdate != ''">
AND a.subpkdate = #{dto.subpkdate}
</if>
<if test="dto.warctlr != null and dto.warctlr != ''">
AND a.warctlr = #{dto.warctlr}
</if>
<if test="dto.barcodeno != null and dto.barcodeno != ''">
AND a.barcodeno = #{dto.barcodeno}
</if>
<if test="dto.plandept != null and dto.plandept != ''">
AND a.plandept = #{dto.plandept}
</if>
<if test="dto.remark != null and dto.remark != ''">
AND a.remark LIKE '%' || #{dto.remark} || '%'
</if>
<if test="dto.prtclass != null and dto.prtclass != ''">
AND a.prtclass = #{dto.prtclass}
</if>
@ -47,41 +74,211 @@
</select>
<!-- 查询调拨单数量 -->
<!-- 查询配套明细数量 -->
<select id="queryAllocationMessNum" resultType="java.lang.Integer">
SELECT COUNT(1) FROM dba_mgr.v_mes_rb_pkpqry
<where>
<if test="dto.pkno != null and dto.pkno != ''">
AND pkno LIKE CONCAT('%', #{dto.pkno}, '%')
AND a.pkno LIKE '%' || #{dto.pkno} || '%'
</if>
<if test="dto.prntno != null and dto.prntno != ''">
AND a.prntno LIKE '%' || #{dto.prntno} || '%'
</if>
<if test="dto.mtltmrk != null and dto.mtltmrk != ''">
AND a.mtltmrk = #{dto.mtltmrk}
</if>
<if test="dto.prtlotno != null and dto.prtlotno != ''">
AND a.prtlotno = #{dto.prtlotno}
</if>
<if test="dto.pkreqdat != null and dto.pkreqdat != ''">
AND a.pkreqdat = #{dto.pkreqdat}
</if>
<if test="dto.fjSplcode != null and dto.fjSplcode != ''">
AND a.fj_splcode = #{dto.fjSplcode}
</if>
<if test="dto.fjPkavqty != null and dto.fjPkavqty != ''">
AND a.fj_pkavqty = #{dto.fjPkavqty}
</if>
<if test="dto.serialno != null and dto.serialno != ''">
AND a.serialno = #{dto.serialno}
</if>
<if test="dto.prtmdept != null and dto.prtmdept != ''">
AND a.prtmdept = #{dto.prtmdept}
</if>
<if test="dto.plnsign != null and dto.plnsign != ''">
AND a.plnsign = #{dto.plnsign}
</if>
<if test="dto.mono != null and dto.mono != ''">
AND a.mono = #{dto.mono}
</if>
<if test="dto.schemer != null and dto.schemer != ''">
AND a.schemer = #{dto.schemer}
</if>
<if test="dto.planner1 != null and dto.planner1 != ''">
AND a.planner1 = #{dto.planner1}
</if>
<if test="dto.subpkdate != null and dto.subpkdate != ''">
AND a.subpkdate = #{dto.subpkdate}
</if>
<if test="dto.warctlr != null and dto.warctlr != ''">
AND a.warctlr = #{dto.warctlr}
</if>
<if test="dto.barcodeno != null and dto.barcodeno != ''">
AND a.barcodeno = #{dto.barcodeno}
</if>
<if test="dto.plandept != null and dto.plandept != ''">
AND a.plandept = #{dto.plandept}
</if>
<if test="dto.remark != null and dto.remark != ''">
AND a.remark LIKE '%' || #{dto.remark} || '%'
</if>
<if test="dto.prtclass != null and dto.prtclass != ''">
AND a.prtclass = #{dto.prtclass}
</if>
</where>
</select>
<select id="queryAllocationStatistics" resultType="org.springblade.desk.logistics.pojo.vo.AllocationMessVO">
SELECT * FROM (
SELECT t.*, ROWNUM no FROM (
SELECT
a.prtmdept,
a.subpkdate,
SUM(NVL(a.fj_pkavqty, 0)) AS fjpkavqty
FROM dba_mgr.v_mes_rb_pkpqry a
<where>
<if test="dto.pkno != null and dto.pkno != ''">
AND a.pkno LIKE '%' || #{dto.pkno} || '%'
</if>
<if test="dto.prntno != null and dto.prntno != ''">
AND a.prntno LIKE '%' || #{dto.prntno} || '%'
</if>
<if test="dto.mtltmrk != null and dto.mtltmrk != ''">
AND a.mtltmrk = #{dto.mtltmrk}
</if>
<if test="dto.prtlotno != null and dto.prtlotno != ''">
AND a.prtlotno = #{dto.prtlotno}
</if>
<if test="dto.pkreqdat != null and dto.pkreqdat != ''">
AND a.pkreqdat = #{dto.pkreqdat}
</if>
<if test="dto.fjSplcode != null and dto.fjSplcode != ''">
AND a.fj_splcode = #{dto.fjSplcode}
</if>
<if test="dto.fjPkavqty != null and dto.fjPkavqty != ''">
AND a.fj_pkavqty = #{dto.fjPkavqty}
</if>
<if test="dto.serialno != null and dto.serialno != ''">
AND a.serialno = #{dto.serialno}
</if>
<if test="dto.prtmdept != null and dto.prtmdept != ''">
AND a.prtmdept = #{dto.prtmdept}
</if>
<if test="dto.plnsign != null and dto.plnsign != ''">
AND a.plnsign = #{dto.plnsign}
</if>
<if test="dto.mono != null and dto.mono != ''">
AND a.mono = #{dto.mono}
</if>
<if test="dto.schemer != null and dto.schemer != ''">
AND a.schemer = #{dto.schemer}
</if>
<if test="dto.planner1 != null and dto.planner1 != ''">
AND a.planner1 = #{dto.planner1}
</if>
<if test="dto.subpkdate != null and dto.subpkdate != ''">
AND a.subpkdate = #{dto.subpkdate}
</if>
<if test="dto.warctlr != null and dto.warctlr != ''">
AND a.warctlr = #{dto.warctlr}
</if>
<if test="dto.barcodeno != null and dto.barcodeno != ''">
AND a.barcodeno = #{dto.barcodeno}
</if>
<if test="dto.plandept != null and dto.plandept != ''">
AND a.plandept = #{dto.plandept}
</if>
<if test="dto.remark != null and dto.remark != ''">
AND a.remark LIKE '%' || #{dto.remark} || '%'
</if>
<if test="dto.prtclass != null and dto.prtclass != ''">
AND a.prtclass = #{dto.prtclass}
</if>
</where>
GROUP BY a.prtmdept, a.subpkdate
ORDER BY a.subpkdate DESC, a.prtmdept DESC
) t
WHERE ROWNUM &lt;= #{dto.current} * #{dto.size}
)
WHERE no &gt;= (#{dto.current} - 1) * #{dto.size} + 1
</select>
<select id="queryAllocationStatisticsNum" resultType="java.lang.Integer">
SELECT COUNT(1)
FROM (
SELECT 1
FROM dba_mgr.v_mes_rb_pkpqry a
<where>
<if test="dto.pkno != null and dto.pkno != ''">
AND a.pkno LIKE '%' || #{dto.pkno} || '%'
</if>
<if test="dto.prntno != null and dto.prntno != ''">
AND prntno LIKE CONCAT('%', #{dto.prntno}, '%')
AND a.prntno LIKE '%' || #{dto.prntno} || '%'
</if>
<if test="dto.mtltmrk != null and dto.mtltmrk != ''">
AND mtltmrk = #{dto.mtltmrk}
AND a.mtltmrk = #{dto.mtltmrk}
</if>
<if test="dto.prtlotno != null and dto.prtlotno != ''">
AND prtlotno = #{dto.prtlotno}
AND a.prtlotno = #{dto.prtlotno}
</if>
<if test="dto.pkreqdat != null and dto.pkreqdat != ''">
AND a.pkreqdat = #{dto.pkreqdat}
</if>
<if test="dto.fjSplcode != null and dto.fjSplcode != ''">
AND a.fj_splcode = #{dto.fjSplcode}
</if>
<if test="dto.fjPkavqty != null and dto.fjPkavqty != ''">
AND a.fj_pkavqty = #{dto.fjPkavqty}
</if>
<if test="dto.serialno != null and dto.serialno != ''">
AND a.serialno = #{dto.serialno}
</if>
<if test="dto.prtmdept != null and dto.prtmdept != ''">
AND a.prtmdept = #{dto.prtmdept}
</if>
<if test="dto.plnsign != null and dto.plnsign != ''">
AND a.plnsign = #{dto.plnsign}
</if>
<if test="dto.mono != null and dto.mono != ''">
AND mono = #{dto.mono}
AND a.mono = #{dto.mono}
</if>
<if test="dto.schemer != null and dto.schemer != ''">
AND schemer = #{dto.schemer}
AND a.schemer = #{dto.schemer}
</if>
<if test="dto.planner1 != null and dto.planner1 != ''">
AND planner1 = #{dto.planner1}
AND a.planner1 = #{dto.planner1}
</if>
<if test="dto.subpkdate != null and dto.subpkdate != ''">
AND a.subpkdate = #{dto.subpkdate}
</if>
<if test="dto.warctlr != null and dto.warctlr != ''">
AND warctlr = #{dto.warctlr}
AND a.warctlr = #{dto.warctlr}
</if>
<if test="dto.barcodeno != null and dto.barcodeno != ''">
AND a.barcodeno = #{dto.barcodeno}
</if>
<if test="dto.plandept != null and dto.plandept != ''">
AND plandept = #{dto.plandept}
AND a.plandept = #{dto.plandept}
</if>
<if test="dto.remark != null and dto.remark != ''">
AND a.remark LIKE '%' || #{dto.remark} || '%'
</if>
<if test="dto.prtclass != null and dto.prtclass != ''">
AND prtclass = #{dto.prtclass}
AND a.prtclass = #{dto.prtclass}
</if>
</where>
GROUP BY a.prtmdept, a.subpkdate
) c
</select>
</mapper>

@ -13,16 +13,30 @@ import java.util.List;
public interface IErpDataLogisticsService {
/**
* 查询调拨单
* 查询配置信息明细
* @param dto 查询参数
* @return 调拨单
*/
List<AllocationMessVO> queryAllocationMess(AllocationMessPageDTO dto);
/**
* 查询调拨单数量
* 查询配置信息明细数量
* @param dto 查询参数
* @return 调拨单
*/
Integer queryAllocationMessNum(AllocationMessPageDTO dto);
/**
* 查询配置信息统计
* @param dto 查询参数
* @return 调拨单
*/
List<AllocationMessVO> queryAllocationStatistics(AllocationMessPageDTO dto);
/**
* 查询配置信息统计数量
* @param dto 查询参数
* @return 调拨单
*/
Integer queryAllocationStatisticsNum(AllocationMessPageDTO dto);
}

@ -31,4 +31,14 @@ public class ErpDataLogisticsServiceImpl implements IErpDataLogisticsService {
public Integer queryAllocationMessNum(AllocationMessPageDTO dto) {
return erpDataLogisticsServiceMapper.queryAllocationMessNum(dto);
}
@Override
public List<AllocationMessVO> queryAllocationStatistics(AllocationMessPageDTO dto) {
return erpDataLogisticsServiceMapper.queryAllocationStatistics(dto);
}
@Override
public Integer queryAllocationStatisticsNum(AllocationMessPageDTO dto) {
return erpDataLogisticsServiceMapper.queryAllocationStatisticsNum(dto);
}
}

Loading…
Cancel
Save