diff --git a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehiclecertificate/BaseVehicleCertificateService.java b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehiclecertificate/BaseVehicleCertificateService.java index 34054ec849..6e2aca813e 100644 --- a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehiclecertificate/BaseVehicleCertificateService.java +++ b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehiclecertificate/BaseVehicleCertificateService.java @@ -53,6 +53,7 @@ public class BaseVehicleCertificateService extends MybatisBaseService buildQueryWrapper(BaseVehicleCertificateQuery pagerQuery) { QueryWrapper qw = new QueryWrapper<>(); qw.eq("bvc.isDelete", 0); + qw.eq("bvc.createOrgSid",pagerQuery.getCreateOrgSid()); if (pagerQuery != null) { if (StringUtils.isNotBlank(pagerQuery.getCertificationNo())) {//合格证编号 qw.like("bvc.certificationNo", pagerQuery.getCertificationNo()); diff --git a/anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java b/anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java index 70a157add7..753c91ea76 100644 --- a/anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java +++ b/anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java @@ -22,7 +22,7 @@ public enum ProcDefEnum { SALESORDER("销售订单审批流程", "process_p5ils2rn:4:490008"), BASEOUTSOURCINGAPPLICATION("外采申请", "process_5tqysnjc:4:495004"),//TODO BASEMODELMODPRICE("车型调价申请", "process_kydcif7k:5:280004"), - BASEINTERNALPURCHASE("调车申请", "process_i6luw5xq:1:400004"), + BASEINTERNALPURCHASE("调车申请", "process_i6luw5xq:1:497508"), SCMCARTRANSFER("库存地点变更申请", "process_3bc4p2em:5:382504"), //TODO FINCOSTAPPLY("费用申请","process_u0pahv0s:5:457512"), FINPAYAPPLY("付款申请","process_gin2tntb:3:457508"), diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertinventory/ScmCertInventory.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertinventory/ScmCertInventory.java new file mode 100644 index 0000000000..46a8dd098d --- /dev/null +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertinventory/ScmCertInventory.java @@ -0,0 +1,80 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.scm.api.scmcertinventory; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: anrui_scm(合格证盘点记录、待盘点记录)
+ * File: ScmCertInventory.java
+ * Class: com.yxt.anrui.scm.api.scmcertinventory.ScmCertInventory
+ * Description: 合格证盘点记录.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-08-11 15:46:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "合格证盘点记录", description = "合格证盘点记录") +@TableName("scm_cert_inventory") +public class ScmCertInventory extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("合格证编号") + private String certNo; // 合格证编号 + @ApiModelProperty("车辆sid") + private String vehSid; // 车辆sid + @ApiModelProperty("车架号") + private String vinNo; // 车架号 + @ApiModelProperty("存放地点sid") + private String locationSid; // 存放地点sid + @ApiModelProperty("存放地点") + private String location; // 存放地点 + @ApiModelProperty("最新盘库日期") + private String inventoryDate; // 最新盘库日期 + @ApiModelProperty("最新盘库人员sid") + private String inventorySid; // 最新盘库人员sid + @ApiModelProperty("最新盘库人员姓名") + private String inventoryName; // 最新盘库人员姓名 + @ApiModelProperty("盘库状态 1通过/2未通过") + private String inventoryState; // 盘库状态 1通过/2未通过 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("使用组织名称") + private String useOrgName; // 使用组织名称 + +} diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertinventory/ScmCertInventoryDetailsVo.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertinventory/ScmCertInventoryDetailsVo.java new file mode 100644 index 0000000000..1fe220f9fc --- /dev/null +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertinventory/ScmCertInventoryDetailsVo.java @@ -0,0 +1,81 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.scm.api.scmcertinventory; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: anrui_scm(合格证盘点记录、待盘点记录)
+ * File: ScmCertInventoryVo.java
+ * Class: com.yxt.anrui.scm.api.scmcertinventory.ScmCertInventoryVo
+ * Description: 合格证盘点记录 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-08-11 15:46:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "合格证盘点记录 视图数据详情", description = "合格证盘点记录 视图数据详情") +public class ScmCertInventoryDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("合格证编号") + private String certNo; // 合格证编号 + @ApiModelProperty("车辆sid") + private String vehSid; // 车辆sid + @ApiModelProperty("车架号") + private String vinNo; // 车架号 + @ApiModelProperty("存放地点sid") + private String locationSid; // 存放地点sid + @ApiModelProperty("存放地点") + private String location; // 存放地点 + @ApiModelProperty("最新盘库日期") + private String inventoryDate; // 最新盘库日期 + @ApiModelProperty("最新盘库人员sid") + private String inventorySid; // 最新盘库人员sid + @ApiModelProperty("最新盘库人员姓名") + private String inventoryName; // 最新盘库人员姓名 + @ApiModelProperty("盘库状态 1通过/2未通过") + private String inventoryState; // 盘库状态 1通过/2未通过 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("使用组织名称") + private String useOrgName; // 使用组织名称 + +} \ No newline at end of file diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertinventory/ScmCertInventoryDto.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertinventory/ScmCertInventoryDto.java new file mode 100644 index 0000000000..efc71add5d --- /dev/null +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertinventory/ScmCertInventoryDto.java @@ -0,0 +1,81 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.scm.api.scmcertinventory; + + +import com.yxt.common.core.dto.Dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: anrui_scm(合格证盘点记录、待盘点记录)
+ * File: ScmCertInventoryDto.java
+ * Class: com.yxt.anrui.scm.api.scmcertinventory.ScmCertInventoryDto
+ * Description: 合格证盘点记录 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-08-11 15:46:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "合格证盘点记录 数据传输对象", description = "合格证盘点记录 数据传输对象") +public class ScmCertInventoryDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("合格证编号") + private String certNo; // 合格证编号 + @ApiModelProperty("车辆sid") + private String vehSid; // 车辆sid + @ApiModelProperty("车架号") + private String vinNo; // 车架号 + @ApiModelProperty("存放地点sid") + private String locationSid; // 存放地点sid + @ApiModelProperty("存放地点") + private String location; // 存放地点 + @ApiModelProperty("最新盘库日期") + private String inventoryDate; // 最新盘库日期 + @ApiModelProperty("最新盘库人员sid") + private String inventorySid; // 最新盘库人员sid + @ApiModelProperty("最新盘库人员姓名") + private String inventoryName; // 最新盘库人员姓名 + @ApiModelProperty("盘库状态 1通过/2未通过") + private String inventoryState; // 盘库状态 1通过/2未通过 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("使用组织名称") + private String useOrgName; // 使用组织名称 + +} \ No newline at end of file diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertinventory/ScmCertInventoryFeign.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertinventory/ScmCertInventoryFeign.java new file mode 100644 index 0000000000..f77c045651 --- /dev/null +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertinventory/ScmCertInventoryFeign.java @@ -0,0 +1,78 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.scm.api.scmcertinventory; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * Project: anrui_scm(合格证盘点记录、待盘点记录)
+ * File: ScmCertInventoryFeign.java
+ * Class: com.yxt.anrui.scm.api.scmcertinventory.ScmCertInventoryFeign
+ * Description: 合格证盘点记录.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-08-11 15:46:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "合格证盘点记录") +@FeignClient( + contextId = "anrui_scm-ScmCertInventory", + name = "anrui_scm", + path = "v1/scmcertinventory", + fallback = ScmCertInventoryFeignFallback.class) +public interface ScmCertInventoryFeign { + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + @ResponseBody + public ResultBean> listPage(@RequestBody PagerQuery pq); + + @ApiOperation("新增或修改") + @PostMapping("/save") + @ResponseBody + public ResultBean save(@RequestBody ScmCertInventoryDto dto); + + @ApiOperation("根据sid删除记录") + @DeleteMapping("/delBySids") + @ResponseBody + public ResultBean delBySids(@RequestBody String[] sids); + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + @ResponseBody + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid); +} \ No newline at end of file diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertinventory/ScmCertInventoryFeignFallback.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertinventory/ScmCertInventoryFeignFallback.java new file mode 100644 index 0000000000..555c882c64 --- /dev/null +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertinventory/ScmCertInventoryFeignFallback.java @@ -0,0 +1,72 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.scm.api.scmcertinventory; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * Project: anrui_scm(合格证盘点记录、待盘点记录)
+ * File: ScmCertInventoryFeignFallback.java
+ * Class: com.yxt.anrui.scm.api.scmcertinventory.ScmCertInventoryFeignFallback
+ * Description: 合格证盘点记录.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-08-11 15:46:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Component +public class ScmCertInventoryFeignFallback implements ScmCertInventoryFeign { + + @Override + public ResultBean> listPage(PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + return rb.setMsg("接口anrui_scm/scmcertinventory/listPage无法访问"); + } + + @Override + public ResultBean save(ScmCertInventoryDto dto){ + return ResultBean.fireFail().setMsg("接口anrui_scm/scmcertinventory/save无法访问"); + } + + @Override + public ResultBean delBySids( String[] sids){ + return ResultBean.fireFail().setMsg("接口anrui_scm/scmcertinventory/delBySids无法访问"); + } + + @Override + public ResultBean fetchDetailsBySid(String sid){ + ResultBean rb = ResultBean.fireFail(); + return rb.setMsg("接口anrui_scm/scmcertinventory/fetchDetailsBySid无法访问"); + } +} \ No newline at end of file diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertinventory/ScmCertInventoryQuery.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertinventory/ScmCertInventoryQuery.java new file mode 100644 index 0000000000..424f01f814 --- /dev/null +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertinventory/ScmCertInventoryQuery.java @@ -0,0 +1,66 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.scm.api.scmcertinventory; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: anrui_scm(合格证盘点记录、待盘点记录)
+ * File: ScmCertInventoryQuery.java
+ * Class: com.yxt.anrui.scm.api.scmcertinventory.ScmCertInventoryQuery
+ * Description: 合格证盘点记录 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-08-11 15:46:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "合格证盘点记录 查询条件", description = "合格证盘点记录 查询条件") +public class ScmCertInventoryQuery implements Query { + + @ApiModelProperty("合格证编号") + private String certNo; // 合格证编号 + @ApiModelProperty("车架号") + private String vinNo; // 车架号 + @ApiModelProperty("存放地点sid") + private String locationSid; // 存放地点sid + @ApiModelProperty("最新盘库开始日期") + private String inventoryStartDate; // 最新盘库开始日期 + @ApiModelProperty("最新盘库结束日期") + private String inventoryEndDate; // 最新盘库结束日期 + @ApiModelProperty("盘库状态 1通过/2未通过") + private String inventoryState; // 盘库状态 1通过/2未通过 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid +} diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertinventory/ScmCertInventoryVo.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertinventory/ScmCertInventoryVo.java new file mode 100644 index 0000000000..bb15c1fdc9 --- /dev/null +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertinventory/ScmCertInventoryVo.java @@ -0,0 +1,74 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.scm.api.scmcertinventory; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: anrui_scm(合格证盘点记录、待盘点记录)
+ * File: ScmCertInventoryVo.java
+ * Class: com.yxt.anrui.scm.api.scmcertinventory.ScmCertInventoryVo
+ * Description: 合格证盘点记录 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-08-11 15:46:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "合格证盘点记录 视图数据对象", description = "合格证盘点记录 视图数据对象") +public class ScmCertInventoryVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("备注") + private String remarks; // 备注 + @ApiModelProperty("合格证编号") + private String certNo; // 合格证编号 + @ApiModelProperty("车辆sid") + private String vehSid; // 车辆sid + @ApiModelProperty("车架号") + private String vinNo; // 车架号 + @ApiModelProperty("存放地点sid") + private String locationSid; // 存放地点sid + @ApiModelProperty("存放地点") + private String location; // 存放地点 + @ApiModelProperty("最新盘库日期") + private String inventoryDate; // 最新盘库日期 + @ApiModelProperty("最新盘库人员sid") + private String inventorySid; // 最新盘库人员sid + @ApiModelProperty("最新盘库人员姓名") + private String inventoryName; // 最新盘库人员姓名 + @ApiModelProperty("盘库状态 1通过/2未通过") + private String inventoryState; // 盘库状态 1通过/2未通过 +} diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertstayinventory/ScmCertStayInventory.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertstayinventory/ScmCertStayInventory.java new file mode 100644 index 0000000000..810ed31409 --- /dev/null +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertstayinventory/ScmCertStayInventory.java @@ -0,0 +1,78 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.scm.api.scmcertstayinventory; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: anrui_scm(合格证盘点记录、待盘点记录)
+ * File: ScmCertStayInventory.java
+ * Class: com.yxt.anrui.scm.api.scmcertstayinventory.ScmCertStayInventory
+ * Description: 合格证待盘点记录.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-08-11 15:46:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "合格证待盘点记录", description = "合格证待盘点记录") +@TableName("scm_cert_stay_inventory") +public class ScmCertStayInventory extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("合格证编号") + private String certNo; // 合格证编号 + @ApiModelProperty("车辆sid") + private String vehSid; // 车辆sid + @ApiModelProperty("车架号") + private String vinNo; // 车架号 + @ApiModelProperty("存放地点sid") + private String locationSid; // 存放地点sid + @ApiModelProperty("存放地点") + private String location; // 存放地点 + @ApiModelProperty("上次盘库日期") + private String inventoryDate; // 上次盘库日期 + @ApiModelProperty("上次盘库人员sid") + private String inventorySid; // 上次盘库人员sid + @ApiModelProperty("上次盘库人员姓名") + private String inventoryName; // 上次盘库人员姓名 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("使用组织名称") + private String useOrgName; // 使用组织名称 + +} diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertstayinventory/ScmCertStayInventoryDetailsVo.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertstayinventory/ScmCertStayInventoryDetailsVo.java new file mode 100644 index 0000000000..6a0273e7d2 --- /dev/null +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertstayinventory/ScmCertStayInventoryDetailsVo.java @@ -0,0 +1,79 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.scm.api.scmcertstayinventory; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: anrui_scm(合格证盘点记录、待盘点记录)
+ * File: ScmCertStayInventoryVo.java
+ * Class: com.yxt.anrui.scm.api.scmcertstayinventory.ScmCertStayInventoryVo
+ * Description: 合格证待盘点记录 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-08-11 15:46:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "合格证待盘点记录 视图数据详情", description = "合格证待盘点记录 视图数据详情") +public class ScmCertStayInventoryDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("合格证编号") + private String certNo; // 合格证编号 + @ApiModelProperty("车辆sid") + private String vehSid; // 车辆sid + @ApiModelProperty("车架号") + private String vinNo; // 车架号 + @ApiModelProperty("存放地点sid") + private String locationSid; // 存放地点sid + @ApiModelProperty("存放地点") + private String location; // 存放地点 + @ApiModelProperty("上次盘库日期") + private String inventoryDate; // 上次盘库日期 + @ApiModelProperty("上次盘库人员sid") + private String inventorySid; // 上次盘库人员sid + @ApiModelProperty("上次盘库人员姓名") + private String inventoryName; // 上次盘库人员姓名 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("使用组织名称") + private String useOrgName; // 使用组织名称 + +} \ No newline at end of file diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertstayinventory/ScmCertStayInventoryDto.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertstayinventory/ScmCertStayInventoryDto.java new file mode 100644 index 0000000000..26323c7f18 --- /dev/null +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertstayinventory/ScmCertStayInventoryDto.java @@ -0,0 +1,79 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.scm.api.scmcertstayinventory; + + +import com.yxt.common.core.dto.Dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: anrui_scm(合格证盘点记录、待盘点记录)
+ * File: ScmCertStayInventoryDto.java
+ * Class: com.yxt.anrui.scm.api.scmcertstayinventory.ScmCertStayInventoryDto
+ * Description: 合格证待盘点记录 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-08-11 15:46:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "合格证待盘点记录 数据传输对象", description = "合格证待盘点记录 数据传输对象") +public class ScmCertStayInventoryDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("合格证编号") + private String certNo; // 合格证编号 + @ApiModelProperty("车辆sid") + private String vehSid; // 车辆sid + @ApiModelProperty("车架号") + private String vinNo; // 车架号 + @ApiModelProperty("存放地点sid") + private String locationSid; // 存放地点sid + @ApiModelProperty("存放地点") + private String location; // 存放地点 + @ApiModelProperty("上次盘库日期") + private String inventoryDate; // 上次盘库日期 + @ApiModelProperty("上次盘库人员sid") + private String inventorySid; // 上次盘库人员sid + @ApiModelProperty("上次盘库人员姓名") + private String inventoryName; // 上次盘库人员姓名 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("使用组织名称") + private String useOrgName; // 使用组织名称 + +} \ No newline at end of file diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertstayinventory/ScmCertStayInventoryFeign.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertstayinventory/ScmCertStayInventoryFeign.java new file mode 100644 index 0000000000..7da7aff1d3 --- /dev/null +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertstayinventory/ScmCertStayInventoryFeign.java @@ -0,0 +1,78 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.scm.api.scmcertstayinventory; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * Project: anrui_scm(合格证盘点记录、待盘点记录)
+ * File: ScmCertStayInventoryFeign.java
+ * Class: com.yxt.anrui.scm.api.scmcertstayinventory.ScmCertStayInventoryFeign
+ * Description: 合格证待盘点记录.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-08-11 15:46:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "合格证待盘点记录") +@FeignClient( + contextId = "anrui_scm-ScmCertStayInventory", + name = "anrui_scm", + path = "v1/scmcertstayinventory", + fallback = ScmCertStayInventoryFeignFallback.class) +public interface ScmCertStayInventoryFeign { + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + @ResponseBody + public ResultBean> listPage(@RequestBody PagerQuery pq); + + @ApiOperation("新增或修改") + @PostMapping("/save") + @ResponseBody + public ResultBean save(@RequestBody ScmCertStayInventoryDto dto); + + @ApiOperation("根据sid删除记录") + @DeleteMapping("/delBySids") + @ResponseBody + public ResultBean delBySids(@RequestBody String[] sids); + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + @ResponseBody + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid); +} \ No newline at end of file diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertstayinventory/ScmCertStayInventoryFeignFallback.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertstayinventory/ScmCertStayInventoryFeignFallback.java new file mode 100644 index 0000000000..33dacee8a0 --- /dev/null +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertstayinventory/ScmCertStayInventoryFeignFallback.java @@ -0,0 +1,72 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.scm.api.scmcertstayinventory; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * Project: anrui_scm(合格证盘点记录、待盘点记录)
+ * File: ScmCertStayInventoryFeignFallback.java
+ * Class: com.yxt.anrui.scm.api.scmcertstayinventory.ScmCertStayInventoryFeignFallback
+ * Description: 合格证待盘点记录.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-08-11 15:46:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Component +public class ScmCertStayInventoryFeignFallback implements ScmCertStayInventoryFeign { + + @Override + public ResultBean> listPage(PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + return rb.setMsg("接口anrui_scm/scmcertstayinventory/listPage无法访问"); + } + + @Override + public ResultBean save(ScmCertStayInventoryDto dto){ + return ResultBean.fireFail().setMsg("接口anrui_scm/scmcertstayinventory/save无法访问"); + } + + @Override + public ResultBean delBySids( String[] sids){ + return ResultBean.fireFail().setMsg("接口anrui_scm/scmcertstayinventory/delBySids无法访问"); + } + + @Override + public ResultBean fetchDetailsBySid(String sid){ + ResultBean rb = ResultBean.fireFail(); + return rb.setMsg("接口anrui_scm/scmcertstayinventory/fetchDetailsBySid无法访问"); + } +} \ No newline at end of file diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertstayinventory/ScmCertStayInventoryQuery.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertstayinventory/ScmCertStayInventoryQuery.java new file mode 100644 index 0000000000..52da2b6ae8 --- /dev/null +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertstayinventory/ScmCertStayInventoryQuery.java @@ -0,0 +1,77 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.scm.api.scmcertstayinventory; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: anrui_scm(合格证盘点记录、待盘点记录)
+ * File: ScmCertStayInventoryQuery.java
+ * Class: com.yxt.anrui.scm.api.scmcertstayinventory.ScmCertStayInventoryQuery
+ * Description: 合格证待盘点记录 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-08-11 15:46:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "合格证待盘点记录 查询条件", description = "合格证待盘点记录 查询条件") +public class ScmCertStayInventoryQuery implements Query { + + @ApiModelProperty("合格证编号") + private String certNo; // 合格证编号 + @ApiModelProperty("车辆sid") + private String vehSid; // 车辆sid + @ApiModelProperty("车架号") + private String vinNo; // 车架号 + @ApiModelProperty("存放地点sid") + private String locationSid; // 存放地点sid + @ApiModelProperty("存放地点") + private String location; // 存放地点 + @ApiModelProperty("上次盘库日期") + private String inventoryDate; // 上次盘库日期 + @ApiModelProperty("上次盘库人员sid") + private String inventorySid; // 上次盘库人员sid + @ApiModelProperty("上次盘库人员姓名") + private String inventoryName; // 上次盘库人员姓名 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("使用组织名称") + private String useOrgName; // 使用组织名称 + +} diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertstayinventory/ScmCertStayInventoryVo.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertstayinventory/ScmCertStayInventoryVo.java new file mode 100644 index 0000000000..2b622dcc4b --- /dev/null +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmcertstayinventory/ScmCertStayInventoryVo.java @@ -0,0 +1,79 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.scm.api.scmcertstayinventory; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: anrui_scm(合格证盘点记录、待盘点记录)
+ * File: ScmCertStayInventoryVo.java
+ * Class: com.yxt.anrui.scm.api.scmcertstayinventory.ScmCertStayInventoryVo
+ * Description: 合格证待盘点记录 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-08-11 15:46:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "合格证待盘点记录 视图数据对象", description = "合格证待盘点记录 视图数据对象") +public class ScmCertStayInventoryVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("合格证编号") + private String certNo; // 合格证编号 + @ApiModelProperty("车辆sid") + private String vehSid; // 车辆sid + @ApiModelProperty("车架号") + private String vinNo; // 车架号 + @ApiModelProperty("存放地点sid") + private String locationSid; // 存放地点sid + @ApiModelProperty("存放地点") + private String location; // 存放地点 + @ApiModelProperty("上次盘库日期") + private String inventoryDate; // 上次盘库日期 + @ApiModelProperty("上次盘库人员sid") + private String inventorySid; // 上次盘库人员sid + @ApiModelProperty("上次盘库人员姓名") + private String inventoryName; // 上次盘库人员姓名 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("使用组织名称") + private String useOrgName; // 使用组织名称 + +} diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmcertinventory/ScmCertInventoryMapper.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmcertinventory/ScmCertInventoryMapper.java new file mode 100644 index 0000000000..842857ee4e --- /dev/null +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmcertinventory/ScmCertInventoryMapper.java @@ -0,0 +1,65 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.scm.biz.scmcertinventory; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import com.yxt.anrui.scm.api.scmcertinventory.ScmCertInventory; +import com.yxt.anrui.scm.api.scmcertinventory.ScmCertInventoryVo; + +import java.util.List; + +/** + * Project: anrui_scm(合格证盘点记录、待盘点记录)
+ * File: ScmCertInventoryMapper.java
+ * Class: com.yxt.anrui.scm.biz.scmcertinventory.ScmCertInventoryMapper
+ * Description: 合格证盘点记录.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-08-11 15:46:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface ScmCertInventoryMapper extends BaseMapper { + + //@Update("update scm_cert_inventory set name=#{msg} where id=#{id}") + //IPage voPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from scm_cert_inventory") + List selectListVo(); +} \ No newline at end of file diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmcertinventory/ScmCertInventoryMapper.xml b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmcertinventory/ScmCertInventoryMapper.xml new file mode 100644 index 0000000000..495253dff6 --- /dev/null +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmcertinventory/ScmCertInventoryMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmcertinventory/ScmCertInventoryRest.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmcertinventory/ScmCertInventoryRest.java new file mode 100644 index 0000000000..5f2babc591 --- /dev/null +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmcertinventory/ScmCertInventoryRest.java @@ -0,0 +1,98 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.scm.biz.scmcertinventory; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import com.yxt.anrui.scm.api.scmcertinventory.ScmCertInventoryQuery; +import com.yxt.anrui.scm.api.scmcertinventory.ScmCertInventoryVo; +import com.yxt.anrui.scm.api.scmcertinventory.ScmCertInventoryDetailsVo; +import com.yxt.anrui.scm.api.scmcertinventory.ScmCertInventoryDto; +import com.yxt.anrui.scm.api.scmcertinventory.ScmCertInventoryFeign; + +/** + * Project: anrui_scm(合格证盘点记录、待盘点记录)
+ * File: ScmCertInventoryFeignFallback.java
+ * Class: com.yxt.anrui.scm.biz.scmcertinventory.ScmCertInventoryRest
+ * Description: 合格证盘点记录.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-08-11 15:46:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "合格证盘点记录") +@RestController("com.yxt.anrui.scm.biz.scmcertinventory.ScmCertInventoryRest") +@RequestMapping("v1/scmcertinventory") +public class ScmCertInventoryRest implements ScmCertInventoryFeign { + + @Autowired + private ScmCertInventoryService scmCertInventoryService; + + @Override + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = scmCertInventoryService.listPageVo(pq); + return rb.success().setData(pv); + } + + @Override + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody ScmCertInventoryDto dto){ + ResultBean rb = ResultBean.fireFail(); + scmCertInventoryService.saveOrUpdateDto(dto); + return rb.success(); + } + + @Override + @ApiOperation("根据sid批量删除") + @PostMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + scmCertInventoryService.delBySids(sids); + return rb.success(); + } + + @Override + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + ScmCertInventoryDetailsVo vo = scmCertInventoryService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmcertinventory/ScmCertInventoryService.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmcertinventory/ScmCertInventoryService.java new file mode 100644 index 0000000000..9a3d6088c2 --- /dev/null +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmcertinventory/ScmCertInventoryService.java @@ -0,0 +1,124 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.scm.biz.scmcertinventory; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.anrui.scm.api.scmcertinventory.ScmCertInventory; +import com.yxt.anrui.scm.api.scmcertinventory.ScmCertInventoryQuery; +import com.yxt.anrui.scm.api.scmcertinventory.ScmCertInventoryVo; +import com.yxt.anrui.scm.api.scmcertinventory.ScmCertInventoryDetailsVo; +import com.yxt.anrui.scm.api.scmcertinventory.ScmCertInventoryDto; + +import org.springframework.stereotype.Service; + +/** + * Project: anrui_scm(合格证盘点记录、待盘点记录)
+ * File: ScmCertInventoryService.java
+ * Class: com.yxt.anrui.scm.biz.scmcertinventory.ScmCertInventoryService
+ * Description: 合格证盘点记录 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-08-11 15:46:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class ScmCertInventoryService extends MybatisBaseService { + private QueryWrapper createQueryWrapper(ScmCertInventoryQuery query) { + // todo: 这里根据具体业务调整查询条件 + // 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName())); + QueryWrapper qw = new QueryWrapper<>(); + return qw; + } + + public PagerVo listPageVo(PagerQuery pq) { + ScmCertInventoryQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + String inventoryStartDate = query.getInventoryStartDate(); + String inventoryEndDate = query.getInventoryEndDate(); + qw.apply(StringUtils.isNotEmpty(inventoryStartDate), "date_format (inventoryDate,'%Y-%m-%d') >= date_format('" + inventoryStartDate + "','%Y-%m-%d')"). + apply(StringUtils.isNotEmpty(inventoryEndDate), "date_format (inventoryDate,'%Y-%m-%d') <= date_format('" + inventoryEndDate + "','%Y-%m-%d')" + ); + qw.eq("createOrgSid",query.getCreateOrgSid()); + if (StringUtils.isNotBlank(query.getCertNo())){ + qw.like("certNo",query.getCertNo()); + } + if (StringUtils.isNotBlank(query.getVinNo())){ + qw.like("vinNo",query.getVinNo()); + } + if (StringUtils.isNotBlank(query.getLocationSid())){ + qw.eq("locationSid",query.getLocationSid()); + } + if (StringUtils.isNotBlank(query.getInventoryState())){ + qw.eq("inventoryState",query.getInventoryState()); + } + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(ScmCertInventoryDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(ScmCertInventoryDto dto){ + ScmCertInventory entity = new ScmCertInventory(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(ScmCertInventoryDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + ScmCertInventory entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public ScmCertInventoryDetailsVo fetchDetailsVoBySid(String sid){ + ScmCertInventory entity = fetchBySid(sid); + ScmCertInventoryDetailsVo vo = new ScmCertInventoryDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } +} \ No newline at end of file diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmcertstayinventory/ScmCertStayInventoryMapper.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmcertstayinventory/ScmCertStayInventoryMapper.java new file mode 100644 index 0000000000..7cced5b8c1 --- /dev/null +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmcertstayinventory/ScmCertStayInventoryMapper.java @@ -0,0 +1,65 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.scm.biz.scmcertstayinventory; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import com.yxt.anrui.scm.api.scmcertstayinventory.ScmCertStayInventory; +import com.yxt.anrui.scm.api.scmcertstayinventory.ScmCertStayInventoryVo; + +import java.util.List; + +/** + * Project: anrui_scm(合格证盘点记录、待盘点记录)
+ * File: ScmCertStayInventoryMapper.java
+ * Class: com.yxt.anrui.scm.biz.scmcertstayinventory.ScmCertStayInventoryMapper
+ * Description: 合格证待盘点记录.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-08-11 15:46:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface ScmCertStayInventoryMapper extends BaseMapper { + + //@Update("update scm_cert_stay_inventory set name=#{msg} where id=#{id}") + //IPage voPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from scm_cert_stay_inventory") + List selectListVo(); +} \ No newline at end of file diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmcertstayinventory/ScmCertStayInventoryMapper.xml b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmcertstayinventory/ScmCertStayInventoryMapper.xml new file mode 100644 index 0000000000..c54e7483aa --- /dev/null +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmcertstayinventory/ScmCertStayInventoryMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmcertstayinventory/ScmCertStayInventoryRest.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmcertstayinventory/ScmCertStayInventoryRest.java new file mode 100644 index 0000000000..96624df1c0 --- /dev/null +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmcertstayinventory/ScmCertStayInventoryRest.java @@ -0,0 +1,98 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.scm.biz.scmcertstayinventory; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import com.yxt.anrui.scm.api.scmcertstayinventory.ScmCertStayInventoryQuery; +import com.yxt.anrui.scm.api.scmcertstayinventory.ScmCertStayInventoryVo; +import com.yxt.anrui.scm.api.scmcertstayinventory.ScmCertStayInventoryDetailsVo; +import com.yxt.anrui.scm.api.scmcertstayinventory.ScmCertStayInventoryDto; +import com.yxt.anrui.scm.api.scmcertstayinventory.ScmCertStayInventoryFeign; + +/** + * Project: anrui_scm(合格证盘点记录、待盘点记录)
+ * File: ScmCertStayInventoryFeignFallback.java
+ * Class: com.yxt.anrui.scm.biz.scmcertstayinventory.ScmCertStayInventoryRest
+ * Description: 合格证待盘点记录.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-08-11 15:46:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "合格证待盘点记录") +@RestController("com.yxt.anrui.scm.biz.scmcertstayinventory.ScmCertStayInventoryRest") +@RequestMapping("v1/scmcertstayinventory") +public class ScmCertStayInventoryRest implements ScmCertStayInventoryFeign { + + @Autowired + private ScmCertStayInventoryService scmCertStayInventoryService; + + @Override + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = scmCertStayInventoryService.listPageVo(pq); + return rb.success().setData(pv); + } + + @Override + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody ScmCertStayInventoryDto dto){ + ResultBean rb = ResultBean.fireFail(); + scmCertStayInventoryService.saveOrUpdateDto(dto); + return rb.success(); + } + + @Override + @ApiOperation("根据sid批量删除") + @PostMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + scmCertStayInventoryService.delBySids(sids); + return rb.success(); + } + + @Override + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + ScmCertStayInventoryDetailsVo vo = scmCertStayInventoryService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmcertstayinventory/ScmCertStayInventoryService.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmcertstayinventory/ScmCertStayInventoryService.java new file mode 100644 index 0000000000..a5e63bc7da --- /dev/null +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmcertstayinventory/ScmCertStayInventoryService.java @@ -0,0 +1,106 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.scm.biz.scmcertstayinventory; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.anrui.scm.api.scmcertstayinventory.ScmCertStayInventory; +import com.yxt.anrui.scm.api.scmcertstayinventory.ScmCertStayInventoryQuery; +import com.yxt.anrui.scm.api.scmcertstayinventory.ScmCertStayInventoryVo; +import com.yxt.anrui.scm.api.scmcertstayinventory.ScmCertStayInventoryDetailsVo; +import com.yxt.anrui.scm.api.scmcertstayinventory.ScmCertStayInventoryDto; + +import org.springframework.stereotype.Service; + +/** + * Project: anrui_scm(合格证盘点记录、待盘点记录)
+ * File: ScmCertStayInventoryService.java
+ * Class: com.yxt.anrui.scm.biz.scmcertstayinventory.ScmCertStayInventoryService
+ * Description: 合格证待盘点记录 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-08-11 15:46:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class ScmCertStayInventoryService extends MybatisBaseService { + private QueryWrapper createQueryWrapper(ScmCertStayInventoryQuery query) { + // todo: 这里根据具体业务调整查询条件 + // 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName())); + QueryWrapper qw = new QueryWrapper<>(); + return qw; + } + + public PagerVo listPageVo(PagerQuery pq) { + ScmCertStayInventoryQuery query = pq.getParams(); + QueryWrapper qw = createQueryWrapper(query); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(ScmCertStayInventoryDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(ScmCertStayInventoryDto dto){ + ScmCertStayInventory entity = new ScmCertStayInventory(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(ScmCertStayInventoryDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + ScmCertStayInventory entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public ScmCertStayInventoryDetailsVo fetchDetailsVoBySid(String sid){ + ScmCertStayInventory entity = fetchBySid(sid); + ScmCertStayInventoryDetailsVo vo = new ScmCertStayInventoryDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } +} \ No newline at end of file