parent
ed2ba2d9de
commit
d3fcf94b7c
40 changed files with 1145 additions and 56 deletions
@ -0,0 +1,27 @@ |
||||
package org.springblade.job.processor.quality; |
||||
|
||||
import jakarta.annotation.Resource; |
||||
import org.springblade.desk.quality.feign.ITestPlanInCompleteTaskClient; |
||||
import org.springframework.stereotype.Component; |
||||
import tech.powerjob.worker.core.processor.ProcessResult; |
||||
import tech.powerjob.worker.core.processor.TaskContext; |
||||
import tech.powerjob.worker.core.processor.sdk.BasicProcessor; |
||||
|
||||
/** |
||||
* @author 石玖洲 |
||||
* @Description |
||||
* @create 2026-04-22 14:00 |
||||
*/ |
||||
@Component |
||||
public class TestPlanInCompleteProcessor implements BasicProcessor { |
||||
|
||||
@Resource |
||||
private ITestPlanInCompleteTaskClient client; |
||||
|
||||
|
||||
@Override |
||||
public ProcessResult process(TaskContext taskContext) throws Exception { |
||||
client.testPlanIncomplete(); |
||||
return new ProcessResult(true); |
||||
} |
||||
} |
||||
@ -0,0 +1,19 @@ |
||||
package org.springblade.desk.logistics.pojo.dto; |
||||
|
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.desk.logistics.pojo.vo.AllocationMessVO; |
||||
|
||||
/** |
||||
* @author 石玖洲 |
||||
* @Description |
||||
* @create 2026-04-22 15:22 |
||||
*/ |
||||
@EqualsAndHashCode(callSuper = true) |
||||
@Data |
||||
public class AllocationMessPageDTO extends AllocationMessVO { |
||||
|
||||
private Integer pageNum; |
||||
|
||||
private Integer pageSize; |
||||
} |
||||
@ -0,0 +1,92 @@ |
||||
package org.springblade.desk.logistics.pojo.vo; |
||||
|
||||
import lombok.Data; |
||||
|
||||
import java.io.Serializable; |
||||
|
||||
/** |
||||
* @author 石玖洲 |
||||
* @Description |
||||
* @create 2026-04-22 15:20 |
||||
*/ |
||||
@Data |
||||
public class AllocationMessVO implements Serializable { |
||||
|
||||
/** |
||||
* 配套单号 |
||||
*/ |
||||
private String pkno; |
||||
/** |
||||
* 父件号 |
||||
*/ |
||||
private String prntno; |
||||
/** |
||||
* 型号 |
||||
*/ |
||||
private String mtltmrk; |
||||
/** |
||||
* 生产标识 |
||||
*/ |
||||
private String prtlotno; |
||||
/** |
||||
* 需求日期 |
||||
*/ |
||||
private String pkreqdat; |
||||
/** |
||||
* 父件批次 |
||||
*/ |
||||
private String fjSplcode; |
||||
/** |
||||
* 父件配套数 |
||||
*/ |
||||
private String fjPkavqty; |
||||
/** |
||||
* 配套序号 |
||||
*/ |
||||
private String serialno; |
||||
/** |
||||
* 主制部门 |
||||
*/ |
||||
private String prtmdept; |
||||
/** |
||||
* 计划标记 |
||||
*/ |
||||
private String plnsign; |
||||
/** |
||||
* 制造订单号 |
||||
*/ |
||||
private String mono; |
||||
/** |
||||
* 计划员 |
||||
*/ |
||||
private String schemer; |
||||
/** |
||||
* 调度员 |
||||
*/ |
||||
private String planner1; |
||||
/** |
||||
* 配套日期 |
||||
*/ |
||||
private String subpkdate; |
||||
|
||||
/** |
||||
* 保管员 |
||||
*/ |
||||
private String warctlr; |
||||
/** |
||||
* 条码序号 |
||||
*/ |
||||
private String barcodeno; |
||||
/** |
||||
* 计划部门 |
||||
*/ |
||||
private String plandept; |
||||
/** |
||||
* 备注 |
||||
*/ |
||||
private String remark; |
||||
/** |
||||
* 物料标识 |
||||
*/ |
||||
private String prtclass; |
||||
} |
||||
@ -0,0 +1,26 @@ |
||||
package org.springblade.desk.quality.feign; |
||||
|
||||
import org.springblade.core.launch.constant.AppConstant; |
||||
import org.springframework.cloud.openfeign.FeignClient; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
||||
/** |
||||
* @author 石玖洲 |
||||
* @Description |
||||
* @create 2026-04-22 14:01 |
||||
*/ |
||||
@FeignClient( |
||||
value = AppConstant.APPLICATION_DESK_NAME |
||||
) |
||||
public interface ITestPlanInCompleteTaskClient { |
||||
|
||||
String API_PREFIX = "/feign/client/QA/PlanTest"; |
||||
|
||||
String TEST_PLAN_INCOMPLETE = API_PREFIX + "/testPlanIncomplete"; |
||||
|
||||
/** |
||||
* 转试计划未完成 |
||||
*/ |
||||
@GetMapping(TEST_PLAN_INCOMPLETE) |
||||
void testPlanIncomplete(); |
||||
} |
||||
@ -0,0 +1,42 @@ |
||||
package org.springblade.erpdata.feign; |
||||
|
||||
import org.springblade.common.constant.LauncherConstant; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.desk.logistics.pojo.dto.AllocationMessPageDTO; |
||||
import org.springblade.desk.logistics.pojo.vo.AllocationMessVO; |
||||
import org.springframework.cloud.openfeign.FeignClient; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author 石玖洲 |
||||
* @Description |
||||
* @create 2026-04-22 15:52 |
||||
*/ |
||||
@FeignClient( |
||||
value = LauncherConstant.APPLICATION_ERP_DATA_NAME, |
||||
fallback = IErpDataLogisticsClientFallback.class |
||||
) |
||||
public interface IErpDataLogisticsClient { |
||||
|
||||
String API_PREFIX = "/feign/erpdata/logistics"; |
||||
String QUERY_ALLOCATION_MESS = API_PREFIX + "/queryAllocationMess"; |
||||
String QUERY_ALLOCATION_MESS_NUM = API_PREFIX + "/queryAllocationMessNum"; |
||||
|
||||
/** |
||||
* 查询调拨单 |
||||
* @param dto 查询条件 |
||||
* @return 调拨单 |
||||
*/ |
||||
@GetMapping(QUERY_ALLOCATION_MESS) |
||||
R<List<AllocationMessVO>> queryAllocationMess(AllocationMessPageDTO dto); |
||||
|
||||
/** |
||||
* 查询调拨单数量 |
||||
* @param dto 查询条件 |
||||
* @return 数量 |
||||
*/ |
||||
@GetMapping(QUERY_ALLOCATION_MESS_NUM) |
||||
R<Integer> queryAllocationMessNum(AllocationMessPageDTO dto); |
||||
} |
||||
@ -0,0 +1,27 @@ |
||||
package org.springblade.erpdata.feign; |
||||
|
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.desk.logistics.pojo.dto.AllocationMessPageDTO; |
||||
import org.springblade.desk.logistics.pojo.vo.AllocationMessVO; |
||||
import org.springframework.stereotype.Component; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author 石玖洲 |
||||
* @Description |
||||
* @create 2026-04-22 15:55 |
||||
*/ |
||||
@Component |
||||
public class IErpDataLogisticsClientFallback implements IErpDataLogisticsClient{ |
||||
|
||||
@Override |
||||
public R<List<AllocationMessVO>> queryAllocationMess(AllocationMessPageDTO dto) { |
||||
return R.fail("获取数据失败"); |
||||
} |
||||
|
||||
@Override |
||||
public R<Integer> queryAllocationMessNum(AllocationMessPageDTO dto) { |
||||
return R.fail("获取数据失败"); |
||||
} |
||||
} |
||||
@ -0,0 +1,37 @@ |
||||
package org.springblade.desk.logistics.controller; |
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import io.swagger.v3.oas.annotations.Operation; |
||||
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
import jakarta.annotation.Resource; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.desk.logistics.pojo.dto.AllocationMessPageDTO; |
||||
import org.springblade.desk.logistics.service.IPrWorkOrderService; |
||||
import org.springframework.web.bind.annotation.PostMapping; |
||||
import org.springframework.web.bind.annotation.RequestBody; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @author 石玖洲 |
||||
* @Description |
||||
* @create 2026-04-22 15:00 |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/prWorkOrder") |
||||
@Tag(name = "车间订单->视图", description = "车间订单->视图") |
||||
public class PrWorkOrderController { |
||||
|
||||
@Resource |
||||
private IPrWorkOrderService prWorkOrderService; |
||||
@PostMapping(value = "/queryAllocationMess") |
||||
@ApiOperationSupport(order = 1) |
||||
@Operation(summary = "加载配套信息", description = "filterContext 查询参数") |
||||
private R<Map<String,Object>> queryAllocationMess(@RequestBody AllocationMessPageDTO allocationMessPageDTO) { |
||||
return R.data(prWorkOrderService.queryAllocationMess(allocationMessPageDTO)); |
||||
} |
||||
} |
||||
@ -0,0 +1,24 @@ |
||||
package org.springblade.desk.quality.feign; |
||||
|
||||
import io.swagger.v3.oas.annotations.Hidden; |
||||
import jakarta.annotation.Resource; |
||||
import org.springblade.desk.quality.service.IPlanTestService; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
/** |
||||
* @author 石玖洲 |
||||
* @Description |
||||
* @create 2026-04-22 14:36 |
||||
*/ |
||||
@RestController |
||||
@Hidden() |
||||
public class TestPlanInCompleteTaskClient implements ITestPlanInCompleteTaskClient{ |
||||
|
||||
@Resource |
||||
private IPlanTestService planTestService; |
||||
|
||||
@Override |
||||
public void testPlanIncomplete() { |
||||
planTestService.testPlanIncomplete(); |
||||
} |
||||
} |
||||
@ -0,0 +1,37 @@ |
||||
package org.springblade.erpdata.feign; |
||||
|
||||
import io.swagger.v3.oas.annotations.Hidden; |
||||
import jakarta.annotation.Resource; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.tenant.annotation.NonDS; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.desk.logistics.pojo.dto.AllocationMessPageDTO; |
||||
import org.springblade.desk.logistics.pojo.vo.AllocationMessVO; |
||||
import org.springblade.erpdata.service.IErpDataLogisticsService; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author 石玖洲 |
||||
* @Description |
||||
* @create 2026-04-22 15:50 |
||||
*/ |
||||
@NonDS |
||||
@Hidden |
||||
@RestController |
||||
@AllArgsConstructor |
||||
public class ErpDataLogisticsClient implements IErpDataLogisticsClient { |
||||
|
||||
@Resource |
||||
private final IErpDataLogisticsService erpDataLogisticsService; |
||||
@Override |
||||
public R<List<AllocationMessVO>> queryAllocationMess(AllocationMessPageDTO dto) { |
||||
return R.data(erpDataLogisticsService.queryAllocationMess(dto)); |
||||
} |
||||
|
||||
@Override |
||||
public R<Integer> queryAllocationMessNum(AllocationMessPageDTO dto) { |
||||
return R.data(erpDataLogisticsService.queryAllocationMessNum(dto)); |
||||
} |
||||
} |
||||
@ -0,0 +1,82 @@ |
||||
<?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.ErpDataOemMapper"> |
||||
<!-- 查询调拨单列表 --> |
||||
<select id="queryAllocationMess" resultType="org.springblade.desk.logistics.pojo.vo.AllocationMessVO"> |
||||
select ROWNUM no,a.* from dba_mgr.v_mes_rb_pkpqry a |
||||
<where> |
||||
<if test="dto.pkno != null and dto.pkno != ''"> |
||||
AND pkno LIKE CONCAT('%', #{dto.pkno}, '%') |
||||
</if> |
||||
<if test="dto.prntno != null and dto.prntno != ''"> |
||||
AND prntno LIKE CONCAT('%', #{dto.prntno}, '%') |
||||
</if> |
||||
<if test="dto.mtltmrk != null and dto.mtltmrk != ''"> |
||||
AND mtltmrk = #{dto.mtltmrk} |
||||
</if> |
||||
<if test="dto.prtlotno != null and dto.prtlotno != ''"> |
||||
AND prtlotno = #{dto.prtlotno} |
||||
</if> |
||||
<if test="dto.mono != null and dto.mono != ''"> |
||||
AND mono = #{dto.mono} |
||||
</if> |
||||
<if test="dto.schemer != null and dto.schemer != ''"> |
||||
AND schemer = #{dto.schemer} |
||||
</if> |
||||
<if test="dto.planner1 != null and dto.planner1 != ''"> |
||||
AND planner1 = #{dto.planner1} |
||||
</if> |
||||
<if test="dto.warctlr != null and dto.warctlr != ''"> |
||||
AND warctlr = #{dto.warctlr} |
||||
</if> |
||||
<if test="dto.plandept != null and dto.plandept != ''"> |
||||
AND plandept = #{dto.plandept} |
||||
</if> |
||||
<if test="dto.prtclass != null and dto.prtclass != ''"> |
||||
AND prtclass = #{dto.prtclass} |
||||
</if> |
||||
</where> |
||||
ORDER BY subpkdate DESC |
||||
<if test="dto.pageNum != null"> |
||||
WHERE no BETWEEN (#{dto.pageNum}-1)*#{dto.getPageSize} +1 AND #{dto.pageNum} * #{dto.getPageSize}; |
||||
</if> |
||||
</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}, '%') |
||||
</if> |
||||
<if test="dto.prntno != null and dto.prntno != ''"> |
||||
AND prntno LIKE CONCAT('%', #{dto.prntno}, '%') |
||||
</if> |
||||
<if test="dto.mtltmrk != null and dto.mtltmrk != ''"> |
||||
AND mtltmrk = #{dto.mtltmrk} |
||||
</if> |
||||
<if test="dto.prtlotno != null and dto.prtlotno != ''"> |
||||
AND prtlotno = #{dto.prtlotno} |
||||
</if> |
||||
<if test="dto.mono != null and dto.mono != ''"> |
||||
AND mono = #{dto.mono} |
||||
</if> |
||||
<if test="dto.schemer != null and dto.schemer != ''"> |
||||
AND schemer = #{dto.schemer} |
||||
</if> |
||||
<if test="dto.planner1 != null and dto.planner1 != ''"> |
||||
AND planner1 = #{dto.planner1} |
||||
</if> |
||||
<if test="dto.warctlr != null and dto.warctlr != ''"> |
||||
AND warctlr = #{dto.warctlr} |
||||
</if> |
||||
<if test="dto.plandept != null and dto.plandept != ''"> |
||||
AND plandept = #{dto.plandept} |
||||
</if> |
||||
<if test="dto.prtclass != null and dto.prtclass != ''"> |
||||
AND prtclass = #{dto.prtclass} |
||||
</if> |
||||
</where> |
||||
</select> |
||||
|
||||
</mapper> |
||||
@ -0,0 +1,29 @@ |
||||
package org.springblade.erpdata.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.Mapper; |
||||
import org.springblade.desk.logistics.pojo.dto.AllocationMessPageDTO; |
||||
import org.springblade.desk.logistics.pojo.vo.AllocationMessVO; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author 石玖洲 |
||||
* @Description |
||||
* @create 2026-04-22 16:16 |
||||
*/ |
||||
public interface ErpDataLogisticsServiceMapper extends Mapper { |
||||
|
||||
/** |
||||
* 查询调拨单 |
||||
* @param dto 查询条件 |
||||
* @return 调拨单列表 |
||||
*/ |
||||
List<AllocationMessVO> queryAllocationMess(AllocationMessPageDTO dto); |
||||
|
||||
/** |
||||
* 查询调拨单数量 |
||||
* @param dto 查询条件 |
||||
* @return 调拨单数量 |
||||
*/ |
||||
Integer queryAllocationMessNum(AllocationMessPageDTO dto); |
||||
} |
||||
@ -0,0 +1,28 @@ |
||||
package org.springblade.erpdata.service; |
||||
|
||||
import org.springblade.desk.logistics.pojo.dto.AllocationMessPageDTO; |
||||
import org.springblade.desk.logistics.pojo.vo.AllocationMessVO; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author 石玖洲 |
||||
* @Description |
||||
* @create 2026-04-22 16:08 |
||||
*/ |
||||
public interface IErpDataLogisticsService { |
||||
|
||||
/** |
||||
* 查询调拨单 |
||||
* @param dto 查询参数 |
||||
* @return 调拨单 |
||||
*/ |
||||
List<AllocationMessVO> queryAllocationMess(AllocationMessPageDTO dto); |
||||
|
||||
/** |
||||
* 查询调拨单数量 |
||||
* @param dto 查询参数 |
||||
* @return 调拨单 |
||||
*/ |
||||
Integer queryAllocationMessNum(AllocationMessPageDTO dto); |
||||
} |
||||
@ -0,0 +1,34 @@ |
||||
package org.springblade.erpdata.service.impl; |
||||
|
||||
import jakarta.annotation.Resource; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.desk.logistics.pojo.dto.AllocationMessPageDTO; |
||||
import org.springblade.desk.logistics.pojo.vo.AllocationMessVO; |
||||
import org.springblade.erpdata.mapper.ErpDataLogisticsServiceMapper; |
||||
import org.springblade.erpdata.service.IErpDataLogisticsService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author 石玖洲 |
||||
* @Description |
||||
* @create 2026-04-22 16:12 |
||||
*/ |
||||
@Service |
||||
@AllArgsConstructor |
||||
public class ErpDataLogisticsServiceImpl implements IErpDataLogisticsService { |
||||
|
||||
@Resource |
||||
private final ErpDataLogisticsServiceMapper erpDataLogisticsServiceMapper; |
||||
|
||||
@Override |
||||
public List<AllocationMessVO> queryAllocationMess(AllocationMessPageDTO dto) { |
||||
return erpDataLogisticsServiceMapper.queryAllocationMess(dto); |
||||
} |
||||
|
||||
@Override |
||||
public Integer queryAllocationMessNum(AllocationMessPageDTO dto) { |
||||
return erpDataLogisticsServiceMapper.queryAllocationMessNum(dto); |
||||
} |
||||
} |
||||
Loading…
Reference in new issue