Merge branch 'master' of http://42.192.7.176:3000/suojin/jonhon-mes-svr
commit
78a305e0d2
68 changed files with 1693 additions and 114 deletions
@ -0,0 +1,33 @@ |
|||||||
|
package org.springblade.job.processor.dashboard; |
||||||
|
|
||||||
|
import jakarta.annotation.Resource; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.extern.slf4j.Slf4j; |
||||||
|
import org.springblade.desk.order.feign.IOrderClient; |
||||||
|
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; |
||||||
|
|
||||||
|
import java.util.concurrent.CompletableFuture; |
||||||
|
|
||||||
|
/** |
||||||
|
* 工艺模块-返工任务 |
||||||
|
* @author liweidong |
||||||
|
*/ |
||||||
|
@Component |
||||||
|
@Data |
||||||
|
@Slf4j |
||||||
|
public class DataVerifyProcessor implements BasicProcessor { |
||||||
|
|
||||||
|
@Resource |
||||||
|
private IOrderClient client; |
||||||
|
|
||||||
|
@Override |
||||||
|
public ProcessResult process(TaskContext context) throws Exception { |
||||||
|
log.info("订单合规性校验任务开始"); |
||||||
|
CompletableFuture<Void> runFuture = CompletableFuture.runAsync(()->client.dataVerify()); |
||||||
|
log.info("订单合规性校验任务结束"); |
||||||
|
return new ProcessResult(true); |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,39 @@ |
|||||||
|
package org.springblade.job.processor.wms; |
||||||
|
|
||||||
|
import jakarta.annotation.Resource; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.extern.slf4j.Slf4j; |
||||||
|
import org.springblade.wms.feign.WmsTaskClient; |
||||||
|
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; |
||||||
|
|
||||||
|
/** |
||||||
|
* @version 1.0 |
||||||
|
* @program: jonhon-mes-svr |
||||||
|
* @ClassName ExecuteStGoodsExtUpdateProcessor |
||||||
|
* @description: |
||||||
|
* @autor: WuSiYu |
||||||
|
* @create 2026-04-30 10:08 |
||||||
|
**/ |
||||||
|
@Component |
||||||
|
@Data |
||||||
|
@Slf4j |
||||||
|
public class ExecuteStGoodsExtUpdateProcessor implements BasicProcessor { |
||||||
|
|
||||||
|
@Resource |
||||||
|
WmsTaskClient wmsTaskClient; |
||||||
|
@Override |
||||||
|
public ProcessResult process(TaskContext context) throws Exception { |
||||||
|
log.info("开始执行物料状态同步erp"); |
||||||
|
try { |
||||||
|
boolean result = wmsTaskClient.executeGoodsStatusUpdate(); |
||||||
|
log.info("===== 物料状态定时更新完成 ====="); |
||||||
|
return new ProcessResult(result); |
||||||
|
} catch (Exception e) { |
||||||
|
log.error("===== 物料状态定时更新异常 =====", e); |
||||||
|
return new ProcessResult(false, e.getMessage()); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,83 @@ |
|||||||
|
package org.springblade.desk.basic.excel; |
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||||
|
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
||||||
|
import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
||||||
|
import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.io.Serial; |
||||||
|
import java.io.Serializable; |
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
/** |
||||||
|
* [镀种分类] Excel实体类 |
||||||
|
* |
||||||
|
* @author BladeX |
||||||
|
* @since 2026-04-29 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@ColumnWidth(25) |
||||||
|
@HeadRowHeight(20) |
||||||
|
@ContentRowHeight(18) |
||||||
|
public class PlatingAssortmentExcel implements Serializable { |
||||||
|
|
||||||
|
@Serial |
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
/** |
||||||
|
* 编码 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("编码") |
||||||
|
private String code; |
||||||
|
|
||||||
|
/** |
||||||
|
* 名称 |
||||||
|
*/ |
||||||
|
@ColumnWidth(30) |
||||||
|
@ExcelProperty("名称") |
||||||
|
private String name; |
||||||
|
|
||||||
|
/** |
||||||
|
* 备注 |
||||||
|
*/ |
||||||
|
@ColumnWidth(40) |
||||||
|
@ExcelProperty("备注") |
||||||
|
private String memo; |
||||||
|
|
||||||
|
/** |
||||||
|
* 排序 |
||||||
|
*/ |
||||||
|
@ColumnWidth(10) |
||||||
|
@ExcelProperty("排序") |
||||||
|
private Long sort; |
||||||
|
|
||||||
|
/** |
||||||
|
* 班组成员 |
||||||
|
*/ |
||||||
|
@ColumnWidth(30) |
||||||
|
@ExcelProperty("班组成员") |
||||||
|
private String teamMember; |
||||||
|
|
||||||
|
/** |
||||||
|
* 状态 |
||||||
|
*/ |
||||||
|
@ColumnWidth(10) |
||||||
|
@ExcelProperty("状态") |
||||||
|
private String statusName; |
||||||
|
|
||||||
|
/** |
||||||
|
* 创建时间 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("创建时间") |
||||||
|
private Date createTime; |
||||||
|
|
||||||
|
/** |
||||||
|
* 创建人 |
||||||
|
*/ |
||||||
|
@ColumnWidth(15) |
||||||
|
@ExcelProperty("创建人") |
||||||
|
private String createUserRealName; |
||||||
|
} |
||||||
@ -0,0 +1,97 @@ |
|||||||
|
package org.springblade.desk.basic.pojo.entity; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.core.mp.base.BaseEntity; |
||||||
|
|
||||||
|
import java.io.Serial; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* [镀种分类] 实体类 |
||||||
|
* 对应表: BS_PLATING_ASSORTMENT |
||||||
|
* 业务类别固定为 5 (TYPE_PLATING_ASSORT) |
||||||
|
* 复制于 BS_BASIC_CLAZZ |
||||||
|
* @author BladeX |
||||||
|
* @since 2026-04-29 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@TableName("BS_PLATING_ASSORTMENT") |
||||||
|
@Schema(description = "PlatingAssortment Entity对象") |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
public class PlatingAssortment extends BaseEntity { |
||||||
|
|
||||||
|
@Serial |
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
/** |
||||||
|
* 编码 |
||||||
|
*/ |
||||||
|
public static final String COL_CODE = "CODE"; |
||||||
|
/** |
||||||
|
* 名称 |
||||||
|
*/ |
||||||
|
public static final String COL_NAME = "NAME"; |
||||||
|
/** |
||||||
|
* 备注 |
||||||
|
*/ |
||||||
|
public static final String COL_MEMO = "MEMO"; |
||||||
|
/** |
||||||
|
* 排序 |
||||||
|
*/ |
||||||
|
public static final String COL_SORT = "SORT"; |
||||||
|
/** |
||||||
|
* 班组成员 |
||||||
|
*/ |
||||||
|
public static final String COL_TEAM_MEMBER = "TEAM_MEMBER"; |
||||||
|
/** |
||||||
|
* 班组成员ID |
||||||
|
*/ |
||||||
|
public static final String COL_TEAM_MEMBER_ID = "TEAM_MEMBER_ID"; |
||||||
|
|
||||||
|
/** |
||||||
|
* 编码 |
||||||
|
*/ |
||||||
|
@Schema(description = "编码") |
||||||
|
private String code; |
||||||
|
|
||||||
|
/** |
||||||
|
* 名称 |
||||||
|
*/ |
||||||
|
@Schema(description = "名称") |
||||||
|
private String name; |
||||||
|
|
||||||
|
/** |
||||||
|
* 备注 |
||||||
|
*/ |
||||||
|
@Schema(description = "备注") |
||||||
|
private String memo; |
||||||
|
|
||||||
|
/** |
||||||
|
* 排序 |
||||||
|
*/ |
||||||
|
@Schema(description = "排序") |
||||||
|
private Long sort; |
||||||
|
|
||||||
|
/** |
||||||
|
* 班组成员名称 |
||||||
|
*/ |
||||||
|
@Schema(description = "班组成员名称") |
||||||
|
private String teamMember; |
||||||
|
|
||||||
|
/** |
||||||
|
* 班组成员ID |
||||||
|
*/ |
||||||
|
@Schema(description = "班组成员ID") |
||||||
|
private String teamMemberId; |
||||||
|
|
||||||
|
/** |
||||||
|
* 用户ID列表(非数据库字段) |
||||||
|
*/ |
||||||
|
@TableField(exist = false) |
||||||
|
@Schema(description = "用户ID列表") |
||||||
|
private List<Long> userIds; |
||||||
|
} |
||||||
@ -0,0 +1,36 @@ |
|||||||
|
package org.springblade.desk.basic.pojo.vo; |
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.desk.basic.pojo.entity.PlatingAssortment; |
||||||
|
|
||||||
|
/** |
||||||
|
* [镀种分类] VO类 |
||||||
|
* |
||||||
|
* @author BladeX |
||||||
|
* @since 2026-04-29 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
@Schema(description = "PlatingAssortmentVO对象") |
||||||
|
public class PlatingAssortmentVO extends PlatingAssortment { |
||||||
|
|
||||||
|
/** |
||||||
|
* 创建用户真实姓名 |
||||||
|
*/ |
||||||
|
@Schema(description = "创建用户真实姓名") |
||||||
|
private String createUserRealName; |
||||||
|
|
||||||
|
/** |
||||||
|
* 创建部门名称 |
||||||
|
*/ |
||||||
|
@Schema(description = "创建部门名称") |
||||||
|
private String createDeptName; |
||||||
|
|
||||||
|
/** |
||||||
|
* 更新用户真实姓名 |
||||||
|
*/ |
||||||
|
@Schema(description = "更新用户真实姓名") |
||||||
|
private String updateUserRealName; |
||||||
|
} |
||||||
@ -0,0 +1,21 @@ |
|||||||
|
package org.springblade.erpdata.pojo.vo; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
/** |
||||||
|
* @version 1.0 |
||||||
|
* @program: jonhon-mes-svr |
||||||
|
* @ClassName StGoodsExtStatusVO |
||||||
|
* @description: |
||||||
|
* @autor: WuSiYu |
||||||
|
* @create 2026-04-29 17:04 |
||||||
|
**/ |
||||||
|
|
||||||
|
@Data |
||||||
|
public class StGoodsExtStatusVO { |
||||||
|
|
||||||
|
private String prtno; |
||||||
|
private Double invqty1j; |
||||||
|
private Double planqty; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,29 @@ |
|||||||
|
package org.springblade.wms.feign; |
||||||
|
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||||
|
|
||||||
|
/** |
||||||
|
* @version 1.0 |
||||||
|
* @program: jonhon-mes-svr |
||||||
|
* @ClassName WmsTaskClient |
||||||
|
* @description: |
||||||
|
* @autor: WuSiYu |
||||||
|
* @create 2026-04-30 10:21 |
||||||
|
**/ |
||||||
|
@FeignClient( |
||||||
|
value = "blade-wms" |
||||||
|
) |
||||||
|
public interface WmsTaskClient { |
||||||
|
|
||||||
|
String API_PREFIX = "/feign/client/wms"; |
||||||
|
|
||||||
|
String EXECUTE_GOODS_STATUS_UPDATE = API_PREFIX + "/executeGoodsStatusUpdate"; |
||||||
|
|
||||||
|
/** |
||||||
|
* 物料状态监控同步erp |
||||||
|
*/ |
||||||
|
@PostMapping(EXECUTE_GOODS_STATUS_UPDATE) |
||||||
|
boolean executeGoodsStatusUpdate(); |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,290 @@ |
|||||||
|
package org.springblade.desk.basic.controller; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||||
|
import io.swagger.v3.oas.annotations.Operation; |
||||||
|
import io.swagger.v3.oas.annotations.Parameter; |
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag; |
||||||
|
import jakarta.annotation.Resource; |
||||||
|
import jakarta.servlet.http.HttpServletResponse; |
||||||
|
import jakarta.validation.Valid; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import lombok.extern.slf4j.Slf4j; |
||||||
|
import org.springblade.common.constant.CommonConstant; |
||||||
|
import org.springblade.core.boot.ctrl.BladeController; |
||||||
|
import org.springblade.core.excel.util.ExcelUtil; |
||||||
|
import org.springblade.core.log.annotation.ApiLog; |
||||||
|
import org.springblade.core.mp.support.Condition; |
||||||
|
import org.springblade.core.mp.support.Query; |
||||||
|
import org.springblade.core.secure.BladeUser; |
||||||
|
import org.springblade.core.tool.api.R; |
||||||
|
import org.springblade.core.tool.utils.DateUtil; |
||||||
|
import org.springblade.core.tool.utils.Func; |
||||||
|
import org.springblade.desk.basic.constant.BAModuleConst; |
||||||
|
import org.springblade.desk.basic.excel.PlatingAssortmentExcel; |
||||||
|
import org.springblade.desk.basic.pojo.entity.PlatingAssortment; |
||||||
|
import org.springblade.desk.basic.pojo.vo.PlatingAssortmentVO; |
||||||
|
import org.springblade.desk.basic.service.IPlatingAssortmentService; |
||||||
|
import org.springblade.desk.basic.util.ExcelExtUtil; |
||||||
|
import org.springblade.desk.basic.util.QueryUtils; |
||||||
|
import org.springblade.desk.basic.wrapper.PlatingAssortmentWrapper; |
||||||
|
import org.springblade.system.feign.IUserClient; |
||||||
|
import org.springblade.system.pojo.entity.User; |
||||||
|
import org.springframework.http.ResponseEntity; |
||||||
|
import org.springframework.transaction.annotation.Transactional; |
||||||
|
import org.springframework.web.bind.annotation.*; |
||||||
|
import org.springframework.web.multipart.MultipartFile; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
import java.util.Map; |
||||||
|
import java.util.Objects; |
||||||
|
import java.util.stream.Collectors; |
||||||
|
|
||||||
|
/** |
||||||
|
* [镀种分类] 控制器 |
||||||
|
* 专门管理镀种分类数据 |
||||||
|
* |
||||||
|
* @author BladeX |
||||||
|
* @since 2026-04-29 |
||||||
|
*/ |
||||||
|
@RestController |
||||||
|
@RequestMapping(BAModuleConst.CONTROLLER_PREFIX + "/PlatingAssortment") |
||||||
|
@Data |
||||||
|
@AllArgsConstructor |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
@Slf4j |
||||||
|
@Tag(name = "[BA][镀种分类]", description = "[镀种分类]接口") |
||||||
|
public class PlatingAssortmentController extends BladeController { |
||||||
|
|
||||||
|
@Resource |
||||||
|
private IPlatingAssortmentService service; |
||||||
|
|
||||||
|
@Resource |
||||||
|
private IUserClient userClient; |
||||||
|
|
||||||
|
/** |
||||||
|
* [镀种分类] 详情 |
||||||
|
*/ |
||||||
|
@GetMapping("/detail") |
||||||
|
@ApiOperationSupport(order = 10) |
||||||
|
@Operation(summary = "详情", description = "传入PlatingAssortment Obj") |
||||||
|
public R<PlatingAssortmentVO> detail(PlatingAssortment platingAssortment) { |
||||||
|
QueryWrapper<PlatingAssortment> qw = Condition.getQueryWrapper(platingAssortment); |
||||||
|
PlatingAssortment detail = service.getOne(qw); |
||||||
|
PlatingAssortmentVO detailVO = PlatingAssortmentWrapper.build().entityVO(detail); |
||||||
|
service.setVOValue(detailVO); |
||||||
|
return R.data(detailVO); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* [镀种分类] list分页 |
||||||
|
* |
||||||
|
* |
||||||
|
*/ |
||||||
|
@GetMapping("/list") |
||||||
|
@ApiOperationSupport(order = 20) |
||||||
|
@Operation(summary = "list分页", description = "传入PlatingAssortment Obj") |
||||||
|
public R<IPage<PlatingAssortmentVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> platingAssortment, |
||||||
|
Query query) { |
||||||
|
// 过滤空值
|
||||||
|
platingAssortment = platingAssortment.entrySet().stream() |
||||||
|
.filter(entry -> Objects.nonNull(entry.getValue())) |
||||||
|
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); |
||||||
|
|
||||||
|
QueryWrapper<PlatingAssortment> qw = Condition.getQueryWrapper(platingAssortment, PlatingAssortment.class); |
||||||
|
// 添加未删除的条件
|
||||||
|
qw.eq("IS_DELETED", CommonConstant.DELETE_FALSE); |
||||||
|
|
||||||
|
IPage<PlatingAssortment> pages = service.page(Condition.getPage(query), qw); |
||||||
|
IPage<PlatingAssortmentVO> pagesVO = PlatingAssortmentWrapper.build().pageVO(pages); |
||||||
|
pagesVO.getRecords().stream() |
||||||
|
.peek(service::setVOValue) |
||||||
|
.collect(Collectors.toList()); |
||||||
|
return R.data(pagesVO); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* [镀种分类] page分页(支持高级查询) |
||||||
|
*/ |
||||||
|
@GetMapping("/page") |
||||||
|
@ApiOperationSupport(order = 21) |
||||||
|
@Operation(summary = "page分页", description = "传入PlatingAssortmentVO Obj") |
||||||
|
public R<IPage<PlatingAssortmentVO>> page(PlatingAssortmentVO platingAssortment, Query query) { |
||||||
|
// 处理排序字段转换
|
||||||
|
QueryUtils.convertSortField(query); |
||||||
|
|
||||||
|
IPage<PlatingAssortmentVO> pagesVO = service.selectPlatingAssortmentPage( |
||||||
|
Condition.getPage(query), platingAssortment |
||||||
|
); |
||||||
|
return R.data(pagesVO); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* [镀种分类] 设置人员ID保存 |
||||||
|
*/ |
||||||
|
@PostMapping("/updateUserId") |
||||||
|
@ApiOperationSupport(order = 31) |
||||||
|
@ApiLog("更新镀种分类班组成员") |
||||||
|
@Operation(summary = "设置人员Id保存", description = "传入PlatingAssortment Obj") |
||||||
|
@Transactional(rollbackFor = Exception.class) |
||||||
|
public R updateTeamMembers(@Valid @RequestBody PlatingAssortment platingAssortment) { |
||||||
|
boolean result = service.updateTeamMembers(platingAssortment); |
||||||
|
return R.status(result); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* [镀种分类] list下拉选择(只返回启用的镀种分类) |
||||||
|
*/ |
||||||
|
@GetMapping("/listForSelectPlatingAssort") |
||||||
|
@ApiOperationSupport(order = 22) |
||||||
|
@Operation(summary = "list下拉选择", description = "返回启用的镀种分类列表") |
||||||
|
public R<List<PlatingAssortmentVO>> listForSelect() { |
||||||
|
LambdaQueryWrapper<PlatingAssortment> qw = Wrappers.lambdaQuery(); |
||||||
|
qw.eq(PlatingAssortment::getStatus, 1); // 只返回启用的
|
||||||
|
qw.eq(PlatingAssortment::getIsDeleted, CommonConstant.DELETE_FALSE); |
||||||
|
qw.orderByAsc(PlatingAssortment::getSort, PlatingAssortment::getId); |
||||||
|
|
||||||
|
List<PlatingAssortment> list = service.list(qw); |
||||||
|
List<PlatingAssortmentVO> listVO = PlatingAssortmentWrapper.build().listVO(list); |
||||||
|
return R.data(listVO); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* [镀种分类] 新增一条 |
||||||
|
*/ |
||||||
|
@PostMapping("/save") |
||||||
|
@ApiOperationSupport(order = 30) |
||||||
|
@ApiLog("新增镀种分类") |
||||||
|
@Operation(summary = "新增一条", description = "传入PlatingAssortment Obj") |
||||||
|
@Transactional(rollbackFor = Exception.class) |
||||||
|
public R save(@Valid @RequestBody PlatingAssortment addOne) { |
||||||
|
addOne.setId(null); |
||||||
|
return R.status(service.save(addOne)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* [镀种分类] 新增批量 |
||||||
|
*/ |
||||||
|
@PostMapping("/saveBat") |
||||||
|
@ApiOperationSupport(order = 31) |
||||||
|
@ApiLog("新增镀种分类") |
||||||
|
@Operation(summary = "新增批量", description = "传入PlatingAssortment List") |
||||||
|
@Transactional(rollbackFor = Exception.class) |
||||||
|
public R saveBat(@Valid @RequestBody List<PlatingAssortment> addList) { |
||||||
|
addList.forEach(one -> { |
||||||
|
one.setId(null); |
||||||
|
}); |
||||||
|
return R.status(service.saveBatch(addList)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* [镀种分类] 修改一条 |
||||||
|
*/ |
||||||
|
@PostMapping("/update") |
||||||
|
@ApiOperationSupport(order = 40) |
||||||
|
@ApiLog("修改镀种分类") |
||||||
|
@Operation(summary = "修改一条", description = "传入PlatingAssortment Obj") |
||||||
|
@Transactional(rollbackFor = Exception.class) |
||||||
|
public R update(@Valid @RequestBody PlatingAssortment updateOne) { |
||||||
|
return R.status(service.updateById(updateOne)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* [镀种分类] 修改批量 |
||||||
|
*/ |
||||||
|
@PostMapping("/updateBat") |
||||||
|
@ApiOperationSupport(order = 41) |
||||||
|
@ApiLog("修改镀种分类") |
||||||
|
@Operation(summary = "修改批量", description = "传入PlatingAssortment List") |
||||||
|
@Transactional(rollbackFor = Exception.class) |
||||||
|
public R updateBat(@Valid @RequestBody List<PlatingAssortment> updateList) { |
||||||
|
return R.status(service.updateBatchById(updateList)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* [镀种分类] 新增或修改一条 |
||||||
|
*/ |
||||||
|
@PostMapping("/submit") |
||||||
|
@ApiOperationSupport(order = 50) |
||||||
|
@Operation(summary = "新增或修改一条", description = "传入PlatingAssortment Obj") |
||||||
|
@Transactional(rollbackFor = Exception.class) |
||||||
|
public R submit(@Valid @RequestBody PlatingAssortment mergeOne) { |
||||||
|
return R.status(service.saveOrUpdate(mergeOne)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* [镀种分类] 新增或修改批量 |
||||||
|
*/ |
||||||
|
@PostMapping("/submitBat") |
||||||
|
@ApiOperationSupport(order = 51) |
||||||
|
@Operation(summary = "新增或修改批量", description = "传入PlatingAssortment List") |
||||||
|
@Transactional(rollbackFor = Exception.class) |
||||||
|
public R submitBat(@Valid @RequestBody List<PlatingAssortment> mergeList) { |
||||||
|
return R.status(service.saveOrUpdateBatch(mergeList)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* [镀种分类] 逻辑删除 |
||||||
|
*/ |
||||||
|
@PostMapping("/remove") |
||||||
|
@ApiOperationSupport(order = 61) |
||||||
|
@ApiLog("删除镀种分类") |
||||||
|
@Operation(summary = "逻辑删除", description = "传入ids") |
||||||
|
@Transactional(rollbackFor = Exception.class) |
||||||
|
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { |
||||||
|
return R.status(service.deleteLogic(Func.toLongList(ids))); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* [镀种分类] 导出Excel |
||||||
|
*/ |
||||||
|
@GetMapping("/exportExcel") |
||||||
|
@ApiOperationSupport(order = 70) |
||||||
|
@Operation(summary = "导出Excel", description = "传入PlatingAssortment") |
||||||
|
public void exportExcel(@Parameter(hidden = true) @RequestParam Map<String, Object> platingAssortment, |
||||||
|
BladeUser bladeUser, HttpServletResponse response) { |
||||||
|
QueryWrapper<PlatingAssortment> qw = Condition.getQueryWrapper(platingAssortment, PlatingAssortment.class); |
||||||
|
// 添加未删除的条件
|
||||||
|
qw.eq("IS_DELETED", CommonConstant.DELETE_FALSE); |
||||||
|
|
||||||
|
List<PlatingAssortmentExcel> list = service.exportPlatingAssortment(qw); |
||||||
|
ExcelUtil.export(response, "[镀种分类]数据" + DateUtil.time(), |
||||||
|
"[镀种分类]数据表", list, PlatingAssortmentExcel.class); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* [镀种分类] 下载Excel模板 |
||||||
|
*/ |
||||||
|
@GetMapping("/downloadExcelTemplate") |
||||||
|
@ApiOperationSupport(order = 71) |
||||||
|
@Operation(summary = "下载Excel模板", description = "") |
||||||
|
public ResponseEntity<org.springframework.core.io.Resource> downloadExcelTemplate() { |
||||||
|
return ExcelExtUtil.downloadXlsTemplate( |
||||||
|
"Excel/BA/ImportTemplate-PlatingAssortment.xls", |
||||||
|
"导入模版-镀种分类.xls"); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* [镀种分类] 导入Excel |
||||||
|
*/ |
||||||
|
@PostMapping("/importExcel") |
||||||
|
@ApiOperationSupport(order = 72) |
||||||
|
@ApiLog("导入镀种分类") |
||||||
|
@Operation(summary = "导入Excel", description = "MultipartFile") |
||||||
|
@Transactional(rollbackFor = Exception.class) |
||||||
|
public R importExcel(@RequestParam("file") MultipartFile file) { |
||||||
|
R checkR = ExcelExtUtil.importExcelCheck(file); |
||||||
|
if (checkR != null) { |
||||||
|
return checkR; |
||||||
|
} |
||||||
|
List<PlatingAssortment> importList = ExcelUtil.read( |
||||||
|
file, 0, 1, PlatingAssortment.class |
||||||
|
); |
||||||
|
return R.status(service.saveBatch(importList)); |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,39 @@ |
|||||||
|
package org.springblade.desk.basic.mapper; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import org.apache.ibatis.annotations.Param; |
||||||
|
import org.apache.ibatis.annotations.Mapper; |
||||||
|
import org.springblade.desk.basic.excel.PlatingAssortmentExcel; |
||||||
|
import org.springblade.desk.basic.pojo.entity.PlatingAssortment; |
||||||
|
import org.springblade.desk.basic.pojo.vo.PlatingAssortmentVO; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* [镀种分类] Mapper 接口 |
||||||
|
* |
||||||
|
* @author BladeX |
||||||
|
* @since 2026-04-29 |
||||||
|
*/ |
||||||
|
@Mapper |
||||||
|
public interface PlatingAssortmentMapper extends BaseMapper<PlatingAssortment> { |
||||||
|
|
||||||
|
/** |
||||||
|
* 自定义分页 |
||||||
|
* |
||||||
|
* @param page 分页参数 |
||||||
|
* @param platingAssortment 查询参数 |
||||||
|
* @return List<PlatingAssortmentVO> |
||||||
|
*/ |
||||||
|
List<PlatingAssortmentVO> selectPlatingAssortmentPage(IPage page, @Param("platingAssortment") PlatingAssortmentVO platingAssortment); |
||||||
|
|
||||||
|
/** |
||||||
|
* 获取导出数据 |
||||||
|
* |
||||||
|
* @param queryWrapper 查询条件 |
||||||
|
* @return List<PlatingAssortmentExcel> |
||||||
|
*/ |
||||||
|
List<PlatingAssortmentExcel> exportPlatingAssortment(@Param("ew") Wrapper<PlatingAssortment> queryWrapper); |
||||||
|
} |
||||||
@ -0,0 +1,74 @@ |
|||||||
|
<?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.desk.basic.mapper.PlatingAssortmentMapper"> |
||||||
|
|
||||||
|
<!-- 通用查询映射结果 --> |
||||||
|
<resultMap id="platingAssortmentResultMap" type="org.springblade.desk.basic.pojo.entity.PlatingAssortment"> |
||||||
|
<result column="ID" property="id"/> |
||||||
|
<result column="CODE" property="code"/> |
||||||
|
<result column="NAME" property="name"/> |
||||||
|
<result column="MEMO" property="memo"/> |
||||||
|
<result column="SORT" property="sort"/> |
||||||
|
<result column="TEAM_MEMBER" property="teamMember"/> |
||||||
|
<result column="TEAM_MEMBER_ID" property="teamMemberId"/> |
||||||
|
<result column="STATUS" property="status"/> |
||||||
|
<result column="CREATE_USER" property="createUser"/> |
||||||
|
<result column="CREATE_TIME" property="createTime"/> |
||||||
|
<result column="CREATE_DEPT" property="createDept"/> |
||||||
|
<result column="UPDATE_USER" property="updateUser"/> |
||||||
|
<result column="UPDATE_TIME" property="updateTime"/> |
||||||
|
<result column="IS_DELETED" property="isDeleted"/> |
||||||
|
</resultMap> |
||||||
|
|
||||||
|
<!-- 自定义分页查询 --> |
||||||
|
<select id="selectPlatingAssortmentPage" resultType="org.springblade.desk.basic.pojo.vo.PlatingAssortmentVO"> |
||||||
|
SELECT |
||||||
|
t.ID, |
||||||
|
t.CODE, |
||||||
|
t.NAME, |
||||||
|
t.MEMO, |
||||||
|
t.SORT, |
||||||
|
t.TEAM_MEMBER, |
||||||
|
t.TEAM_MEMBER_ID, |
||||||
|
t.STATUS, |
||||||
|
t.CREATE_USER, |
||||||
|
t.CREATE_TIME, |
||||||
|
t.CREATE_DEPT, |
||||||
|
t.UPDATE_USER, |
||||||
|
t.UPDATE_TIME, |
||||||
|
t.IS_DELETED |
||||||
|
FROM BS_PLATING_ASSORTMENT t |
||||||
|
WHERE t.IS_DELETED = 0 |
||||||
|
<if test="platingAssortment.code != null and platingAssortment.code != ''"> |
||||||
|
AND t.CODE LIKE '%' || #{platingAssortment.code} || '%' |
||||||
|
</if> |
||||||
|
<if test="platingAssortment.name != null and platingAssortment.name != ''"> |
||||||
|
AND t.NAME LIKE '%' || #{platingAssortment.name} || '%' |
||||||
|
</if> |
||||||
|
<if test="platingAssortment.status != null"> |
||||||
|
AND t.STATUS = #{platingAssortment.status} |
||||||
|
</if> |
||||||
|
ORDER BY t.SORT ASC, t.CREATE_TIME DESC |
||||||
|
</select> |
||||||
|
|
||||||
|
<!-- 导出数据查询 --> |
||||||
|
<select id="exportPlatingAssortment" resultType="org.springblade.desk.basic.excel.PlatingAssortmentExcel"> |
||||||
|
SELECT |
||||||
|
t.CODE, |
||||||
|
t.NAME, |
||||||
|
t.MEMO, |
||||||
|
t.SORT, |
||||||
|
t.TEAM_MEMBER, |
||||||
|
CASE t.STATUS |
||||||
|
WHEN 1 THEN '启用' |
||||||
|
WHEN 0 THEN '禁用' |
||||||
|
ELSE '未知' |
||||||
|
END AS statusName, |
||||||
|
t.CREATE_TIME, |
||||||
|
u.REAL_NAME AS createUserRealName |
||||||
|
FROM BS_PLATING_ASSORTMENT t |
||||||
|
LEFT JOIN BLADE_USER u ON t.CREATE_USER = u.ID |
||||||
|
${ew.customSqlSegment} |
||||||
|
</select> |
||||||
|
|
||||||
|
</mapper> |
||||||
@ -0,0 +1,51 @@ |
|||||||
|
package org.springblade.desk.basic.service; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import org.springblade.core.mp.base.BaseService; |
||||||
|
import org.springblade.desk.basic.excel.PlatingAssortmentExcel; |
||||||
|
import org.springblade.desk.basic.pojo.entity.PlatingAssortment; |
||||||
|
import org.springblade.desk.basic.pojo.vo.PlatingAssortmentVO; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* [镀种分类] 服务类 |
||||||
|
* |
||||||
|
* @author BladeX |
||||||
|
* @since 2026-04-29 |
||||||
|
*/ |
||||||
|
public interface IPlatingAssortmentService extends BaseService<PlatingAssortment> { |
||||||
|
|
||||||
|
/** |
||||||
|
* 自定义分页 |
||||||
|
* |
||||||
|
* @param page 分页参数 |
||||||
|
* @param platingAssortment 查询参数 |
||||||
|
* @return IPage<PlatingAssortmentVO> |
||||||
|
*/ |
||||||
|
IPage<PlatingAssortmentVO> selectPlatingAssortmentPage(IPage<PlatingAssortmentVO> page, PlatingAssortmentVO platingAssortment); |
||||||
|
|
||||||
|
/** |
||||||
|
* 导出数据 |
||||||
|
* |
||||||
|
* @param queryWrapper 查询条件 |
||||||
|
* @return List<PlatingAssortmentExcel> |
||||||
|
*/ |
||||||
|
List<PlatingAssortmentExcel> exportPlatingAssortment(Wrapper<PlatingAssortment> queryWrapper); |
||||||
|
|
||||||
|
/** |
||||||
|
* 设置VO值(填充用户名称等) |
||||||
|
* |
||||||
|
* @param vo VO对象 |
||||||
|
*/ |
||||||
|
void setVOValue(PlatingAssortmentVO vo); |
||||||
|
|
||||||
|
/** |
||||||
|
* 更新班组成员 |
||||||
|
* |
||||||
|
* @param platingAssortment 包含userIds的实体 |
||||||
|
* @return 是否成功 |
||||||
|
*/ |
||||||
|
boolean updateTeamMembers(PlatingAssortment platingAssortment); |
||||||
|
} |
||||||
@ -0,0 +1,119 @@ |
|||||||
|
package org.springblade.desk.basic.service.impl; |
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||||
|
import jakarta.annotation.Resource; |
||||||
|
import lombok.extern.slf4j.Slf4j; |
||||||
|
import org.springblade.common.constant.CommonConstant; |
||||||
|
import org.springblade.core.mp.base.BaseServiceImpl; |
||||||
|
import org.springblade.desk.basic.mapper.PlatingAssortmentMapper; |
||||||
|
import org.springblade.desk.basic.pojo.entity.PlatingAssortment; |
||||||
|
import org.springblade.desk.basic.pojo.vo.PlatingAssortmentVO; |
||||||
|
import org.springblade.desk.basic.service.IPlatingAssortmentService; |
||||||
|
import org.springblade.desk.basic.excel.PlatingAssortmentExcel; |
||||||
|
import org.springblade.system.feign.IUserClient; |
||||||
|
import org.springblade.system.pojo.entity.User; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
import org.springframework.transaction.annotation.Transactional; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
import java.util.stream.Collectors; |
||||||
|
|
||||||
|
/** |
||||||
|
* [镀种分类] 服务实现类 |
||||||
|
* |
||||||
|
* @author BladeX |
||||||
|
* @since 2026-04-29 |
||||||
|
*/ |
||||||
|
@Slf4j |
||||||
|
@Service |
||||||
|
public class PlatingAssortmentServiceImpl extends BaseServiceImpl<PlatingAssortmentMapper, PlatingAssortment> implements IPlatingAssortmentService { |
||||||
|
|
||||||
|
@Resource |
||||||
|
private IUserClient userClient; |
||||||
|
|
||||||
|
@Override |
||||||
|
public IPage<PlatingAssortmentVO> selectPlatingAssortmentPage(IPage<PlatingAssortmentVO> page, PlatingAssortmentVO platingAssortment) { |
||||||
|
return page.setRecords(baseMapper.selectPlatingAssortmentPage(page, platingAssortment)); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public List<PlatingAssortmentExcel> exportPlatingAssortment(Wrapper<PlatingAssortment> queryWrapper) { |
||||||
|
return baseMapper.exportPlatingAssortment(queryWrapper); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void setVOValue(PlatingAssortmentVO vo) { |
||||||
|
if (vo == null) { |
||||||
|
return; |
||||||
|
} |
||||||
|
|
||||||
|
// 设置创建人名称
|
||||||
|
if (vo.getCreateUser() != null && vo.getCreateUser() > 0) { |
||||||
|
try { |
||||||
|
User createUser = userClient.userInfoById(vo.getCreateUser()).getData(); |
||||||
|
if (createUser != null) { |
||||||
|
vo.setCreateUserRealName(createUser.getRealName()); |
||||||
|
} |
||||||
|
} catch (Exception e) { |
||||||
|
log.warn("获取创建人信息失败: userId={}", vo.getCreateUser(), e); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
// 设置更新人名称
|
||||||
|
if (vo.getUpdateUser() != null && vo.getUpdateUser() > 0) { |
||||||
|
try { |
||||||
|
User updateUser = userClient.userInfoById(vo.getUpdateUser()).getData(); |
||||||
|
if (updateUser != null) { |
||||||
|
vo.setUpdateUserRealName(updateUser.getRealName()); |
||||||
|
} |
||||||
|
} catch (Exception e) { |
||||||
|
log.warn("获取更新人信息失败: userId={}", vo.getUpdateUser(), e); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
@Transactional(rollbackFor = Exception.class) |
||||||
|
public boolean updateTeamMembers(PlatingAssortment platingAssortment) { |
||||||
|
if (platingAssortment.getId() == null) { |
||||||
|
throw new IllegalArgumentException("ID不能为空"); |
||||||
|
} |
||||||
|
|
||||||
|
PlatingAssortment existing = getById(platingAssortment.getId()); |
||||||
|
if (existing == null) { |
||||||
|
throw new IllegalArgumentException("记录不存在"); |
||||||
|
} |
||||||
|
|
||||||
|
List<Long> userIds = platingAssortment.getUserIds(); |
||||||
|
String teamMemberIds = null; |
||||||
|
String teamMemberNames = null; |
||||||
|
|
||||||
|
if (userIds != null && !userIds.isEmpty()) { |
||||||
|
// 转换为逗号分隔的ID字符串
|
||||||
|
teamMemberIds = userIds.stream() |
||||||
|
.map(Object::toString) |
||||||
|
.collect(Collectors.joining(",")); |
||||||
|
|
||||||
|
// 查询用户信息获取真实姓名
|
||||||
|
try { |
||||||
|
List<User> users = userClient.userListByIds(teamMemberIds); |
||||||
|
if (users != null && !users.isEmpty()) { |
||||||
|
teamMemberNames = users.stream() |
||||||
|
.map(User::getRealName) |
||||||
|
.collect(Collectors.joining(",")); |
||||||
|
} |
||||||
|
} catch (Exception e) { |
||||||
|
log.error("获取用户信息失败", e); |
||||||
|
throw new RuntimeException("获取用户信息失败"); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
existing.setTeamMemberId(teamMemberIds); |
||||||
|
existing.setTeamMember(teamMemberNames); |
||||||
|
|
||||||
|
return updateById(existing); |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,43 @@ |
|||||||
|
package org.springblade.desk.basic.wrapper; |
||||||
|
|
||||||
|
import org.springblade.core.mp.support.BaseEntityWrapper; |
||||||
|
import org.springblade.desk.basic.pojo.entity.PlatingAssortment; |
||||||
|
import org.springblade.desk.basic.pojo.vo.PlatingAssortmentVO; |
||||||
|
|
||||||
|
import java.util.Objects; |
||||||
|
|
||||||
|
/** |
||||||
|
* [镀种分类] Wrapper类 |
||||||
|
* |
||||||
|
* @author BladeX |
||||||
|
* @since 2026-04-29 |
||||||
|
*/ |
||||||
|
public class PlatingAssortmentWrapper extends BaseEntityWrapper<PlatingAssortment, PlatingAssortmentVO> { |
||||||
|
|
||||||
|
public static PlatingAssortmentWrapper build() { |
||||||
|
return new PlatingAssortmentWrapper(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public PlatingAssortmentVO entityVO(PlatingAssortment platingAssortment) { |
||||||
|
if (Objects.isNull(platingAssortment)) { |
||||||
|
return null; |
||||||
|
} |
||||||
|
PlatingAssortmentVO platingAssortmentVO = Objects.requireNonNull(new PlatingAssortmentVO()); |
||||||
|
platingAssortmentVO.setId(platingAssortment.getId()); |
||||||
|
platingAssortmentVO.setCode(platingAssortment.getCode()); |
||||||
|
platingAssortmentVO.setName(platingAssortment.getName()); |
||||||
|
platingAssortmentVO.setMemo(platingAssortment.getMemo()); |
||||||
|
platingAssortmentVO.setSort(platingAssortment.getSort()); |
||||||
|
platingAssortmentVO.setTeamMember(platingAssortment.getTeamMember()); |
||||||
|
platingAssortmentVO.setTeamMemberId(platingAssortment.getTeamMemberId()); |
||||||
|
platingAssortmentVO.setStatus(platingAssortment.getStatus()); |
||||||
|
platingAssortmentVO.setCreateUser(platingAssortment.getCreateUser()); |
||||||
|
platingAssortmentVO.setCreateDept(platingAssortment.getCreateDept()); |
||||||
|
platingAssortmentVO.setCreateTime(platingAssortment.getCreateTime()); |
||||||
|
platingAssortmentVO.setUpdateUser(platingAssortment.getUpdateUser()); |
||||||
|
platingAssortmentVO.setUpdateTime(platingAssortment.getUpdateTime()); |
||||||
|
platingAssortmentVO.setIsDeleted(platingAssortment.getIsDeleted()); |
||||||
|
return platingAssortmentVO; |
||||||
|
} |
||||||
|
} |
||||||
Binary file not shown.
@ -0,0 +1,19 @@ |
|||||||
|
package org.springblade.erpdata.mapper; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.Mapper; |
||||||
|
import org.springblade.erpdata.pojo.vo.StGoodsExtStatusVO; |
||||||
|
|
||||||
|
/** |
||||||
|
* @version 1.0 |
||||||
|
* @program: jonhon-mes-svr |
||||||
|
* @ClassName ErpDataWmsMapper |
||||||
|
* @description: |
||||||
|
* @autor: WuSiYu |
||||||
|
* @create 2026-04-29 16:52 |
||||||
|
**/ |
||||||
|
|
||||||
|
public interface ErpDataWmsMapper extends Mapper { |
||||||
|
|
||||||
|
StGoodsExtStatusVO getGoodsExtStatus(String goodsCode); |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,16 @@ |
|||||||
|
<?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.ErpDataWmsMapper"> |
||||||
|
|
||||||
|
<select id="getGoodsExtStatus" resultType="org.springblade.erpdata.pojo.vo.StGoodsExtStatusVO"> |
||||||
|
SELECT |
||||||
|
erp.prtno, |
||||||
|
-- ERP 一级库存、计划数量 |
||||||
|
NVL(erp.invqty1j, 0) AS invqty1j, |
||||||
|
NVL(erp.planqty, 0) AS planqty |
||||||
|
|
||||||
|
FROM dba_mgr.v_mes_rb_prtstuff erp |
||||||
|
WHERE erp.prtno = #{goodsCode} |
||||||
|
</select> |
||||||
|
|
||||||
|
</mapper> |
||||||
Binary file not shown.
@ -0,0 +1,32 @@ |
|||||||
|
package org.springblade.wms.feign; |
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.Hidden; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import lombok.extern.slf4j.Slf4j; |
||||||
|
import org.springblade.core.tenant.annotation.NonDS; |
||||||
|
import org.springblade.wms.service.IStGoodsExtService; |
||||||
|
import org.springframework.web.bind.annotation.RestController; |
||||||
|
|
||||||
|
/** |
||||||
|
* @version 1.0 |
||||||
|
* @program: jonhon-mes-svr |
||||||
|
* @ClassName WmsTaskClient |
||||||
|
* @description: |
||||||
|
* @autor: WuSiYu |
||||||
|
* @create 2026-04-30 10:20 |
||||||
|
**/ |
||||||
|
@NonDS |
||||||
|
@Hidden |
||||||
|
@RestController |
||||||
|
@AllArgsConstructor |
||||||
|
@Slf4j |
||||||
|
public class WmsTaskClientImpl implements WmsTaskClient{ |
||||||
|
|
||||||
|
private final IStGoodsExtService stGoodsExtService; |
||||||
|
|
||||||
|
@Override |
||||||
|
public boolean executeGoodsStatusUpdate() { |
||||||
|
stGoodsExtService.executeGoodsStatusUpdate(); |
||||||
|
return true; |
||||||
|
} |
||||||
|
} |
||||||
Loading…
Reference in new issue