
19 changed files with 408 additions and 10 deletions
@ -0,0 +1,19 @@ |
|||||
|
package com.wh.pojo.api; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Data |
||||
|
public class InStoreHouseMainDetailVo implements Vo { |
||||
|
private String no; //varchar 50 编号
|
||||
|
private String applicationDate; //date 50 制单日期
|
||||
|
private String creatorName; /// varchar 50 制单人姓名
|
||||
|
private String custerName; // varchar 100 客户名称(企业)
|
||||
|
private String storeHouseName; // varchar 100 仓库名称
|
||||
|
private String auditorName; // varchar 50 审核人姓名
|
||||
|
private String state; // varchar 50 审核状态
|
||||
|
private String approvedDate; // varchar 50 审核日期
|
||||
|
private List<InStorehouseListing> list; |
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
package com.wh.pojo.api; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.util.List; |
||||
|
|
||||
|
@Data |
||||
|
public class InStoreHouseMainVo implements Vo { |
||||
|
private String no; //varchar 50 编号
|
||||
|
private String applicationDate; //date 50 制单日期
|
||||
|
private String creatorName; /// varchar 50 制单人姓名
|
||||
|
private String custerName; // varchar 100 客户名称(企业)
|
||||
|
private String storeHouseName; // varchar 100 仓库名称
|
||||
|
private String auditorName; // varchar 50 审核人姓名
|
||||
|
private String state; // varchar 50 审核状态
|
||||
|
private String approvedDate; // varchar 50 审核日期
|
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
package com.wh.pojo.api; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import lombok.Data; |
||||
|
import lombok.experimental.Accessors; |
||||
|
|
||||
|
@Data |
||||
|
@Accessors(chain = true) |
||||
|
public class InStorehouseMainQuery implements Query { |
||||
|
private String sid; |
||||
|
private String no; //varchar 50 编号
|
||||
|
private String applicationDateStart; //date 50 制单日期开始
|
||||
|
private String applicationDateEnd; //date 50 制单日期结束
|
||||
|
private String creatorSid; //varchar 64 制单人Sid
|
||||
|
private String creatorName; /// varchar 50 制单人姓名
|
||||
|
private String custerSid; //varchar 64 客户Sid(企业)
|
||||
|
private String custerName; // varchar 100 客户名称(企业)
|
||||
|
private String storeHouseSid; // varchar 64 仓库Sid
|
||||
|
private String storeHouseName; // varchar 100 仓库名称
|
||||
|
private String auditorSid; //varchar 64 审核人Sid
|
||||
|
private String auditorName; // varchar 50 审核人姓名
|
||||
|
private String approvedDate; // varchar 50 审核日期
|
||||
|
private String approvedRemark; // varchar 50 审核备注
|
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
package com.wh.pojo.api; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import lombok.Data; |
||||
|
import lombok.experimental.Accessors; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
|
||||
|
@Data |
||||
|
@Accessors(chain = true) |
||||
|
public class OutStorehouseDetailVo implements Vo { |
||||
|
private String no; //varchar 50 编号
|
||||
|
private String applicationDate; //date 50 制单日期
|
||||
|
private String creatorName; /// varchar 50 制单人姓名
|
||||
|
private String custerName; // varchar 100 客户名称(企业)
|
||||
|
private String storeHouseName; // varchar 100 仓库名称
|
||||
|
private String auditorName; // varchar 50 审核人姓名
|
||||
|
private String approvedDate; // varchar 50 审核日期
|
||||
|
private List<OutStorehouseListing> list; |
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
package com.wh.pojo.api; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import lombok.Data; |
||||
|
import lombok.experimental.Accessors; |
||||
|
|
||||
|
|
||||
|
@Data |
||||
|
@Accessors(chain = true) |
||||
|
public class OutStorehouseMainQuery implements Query { |
||||
|
private String no; //varchar 50 编号
|
||||
|
private String applicationDateEnd; //date 50 制单日期
|
||||
|
private String applicationDateStart; //date 50 制单日期
|
||||
|
private String creatorName; /// varchar 50 制单人姓名
|
||||
|
private String custerName; // varchar 100 客户名称(企业)
|
||||
|
private String mainSid; // varchar 100 mainSid
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.wh.pojo.api; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import lombok.Data; |
||||
|
import lombok.experimental.Accessors; |
||||
|
|
||||
|
|
||||
|
@Data |
||||
|
@Accessors(chain = true) |
||||
|
public class OutStorehouseVo implements Vo { |
||||
|
private String no; //varchar 50 编号
|
||||
|
private String applicationDate; //date 50 制单日期
|
||||
|
private String creatorName; /// varchar 50 制单人姓名
|
||||
|
private String custerName; // varchar 100 客户名称(企业)
|
||||
|
private String storeHouseName; // varchar 100 仓库名称
|
||||
|
private String auditorName; // varchar 50 审核人姓名
|
||||
|
private String approvedDate; // varchar 50 审核日期
|
||||
|
} |
@ -0,0 +1,67 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.wh.config; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.optimize.JsqlParserCountOptimize; |
||||
|
import org.springframework.context.annotation.Bean; |
||||
|
import org.springframework.context.annotation.Configuration; |
||||
|
|
||||
|
/** |
||||
|
* Project: yxt-common <br/> |
||||
|
* File: MybatisPlusConfig.java <br/> |
||||
|
* Class: com.yxt.common.base.config.MybatisPlusConfig <br/> |
||||
|
* Description: <描述类的功能>. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2020/8/24 下午12:42 <br/> |
||||
|
* |
||||
|
* @author popo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Configuration |
||||
|
public class MybatisPlusConfig { |
||||
|
/* |
||||
|
* 分页插件,自动识别数据库类型 多租户,请参考官网【插件扩展】 |
||||
|
*/ |
||||
|
// @Bean
|
||||
|
// public MybatisPlusInterceptor paginationInterceptor() {
|
||||
|
// return new MybatisPlusInterceptor();
|
||||
|
// }
|
||||
|
|
||||
|
@Bean |
||||
|
public PaginationInterceptor paginationInterceptor() { |
||||
|
PaginationInterceptor paginationInterceptor = new PaginationInterceptor(); |
||||
|
// 设置请求的页面大于最大页后操作, true调回到首页,false 继续请求 默认false
|
||||
|
// paginationInterceptor.setOverflow(false);
|
||||
|
// 设置最大单页限制数量,默认 500 条,-1 不受限制
|
||||
|
// paginationInterceptor.setLimit(500);
|
||||
|
// 开启 count 的 join 优化,只针对部分 left join
|
||||
|
paginationInterceptor.setCountSqlParser(new JsqlParserCountOptimize(true)); |
||||
|
return paginationInterceptor; |
||||
|
} |
||||
|
} |
@ -1,11 +1,28 @@ |
|||||
package com.wh.controller.api.prodstock; |
package com.wh.controller.api.prodstock; |
||||
|
|
||||
import org.springframework.web.bind.annotation.CrossOrigin; |
import com.wh.pojo.api.OutStorehouseMainQuery; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
import com.wh.pojo.api.OutStorehouseVo; |
||||
import org.springframework.web.bind.annotation.RestController; |
import com.wh.pojo.api.ProdStockQuery; |
||||
|
import com.wh.pojo.api.ProdStockVo; |
||||
|
import com.wh.service.api.outstorehouse.OutStorehouseMainService; |
||||
|
import com.wh.service.api.prodstock.ProdStockService; |
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
@RestController |
@RestController |
||||
@CrossOrigin |
@CrossOrigin |
||||
@RequestMapping("/stock/") |
@RequestMapping("/stock/") |
||||
public class ProdStockController { |
public class ProdStockController { |
||||
|
@Autowired |
||||
|
private ProdStockService prodStockService; |
||||
|
|
||||
|
@PostMapping("listPage") |
||||
|
public ResultBean listPage(@RequestBody PagerQuery<ProdStockQuery> pq){ |
||||
|
PagerVo<ProdStockVo> pv = prodStockService.listPage(pq); |
||||
|
ResultBean<PagerVo<ProdStockVo>> r = ResultBean.fireSuccess(); |
||||
|
return r.setData(pv); |
||||
|
} |
||||
} |
} |
||||
|
@ -1,9 +1,19 @@ |
|||||
package com.wh.mapper.api.instorehouse; |
package com.wh.mapper.api.instorehouse; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants; |
||||
import com.wh.pojo.InStorehouse; |
import com.wh.pojo.InStorehouse; |
||||
|
import com.wh.pojo.api.InStoreHouseMainVo; |
||||
import com.wh.pojo.api.InStorehouseMain; |
import com.wh.pojo.api.InStorehouseMain; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
@Mapper |
||||
public interface InStorehouseMainMapper extends BaseMapper<InStorehouseMain> { |
public interface InStorehouseMainMapper extends BaseMapper<InStorehouseMain> { |
||||
|
IPage<InStoreHouseMainVo> selectPageVo(IPage<InStoreHouseMainVo> page, |
||||
|
@Param(Constants.WRAPPER) Wrapper<InStoreHouseMainVo> qw); |
||||
|
|
||||
} |
} |
||||
|
@ -1,9 +1,19 @@ |
|||||
package com.wh.mapper.api.outstorehouse; |
package com.wh.mapper.api.outstorehouse; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants; |
||||
|
import com.wh.pojo.api.InStoreHouseMainVo; |
||||
import com.wh.pojo.api.InStorehouseMain; |
import com.wh.pojo.api.InStorehouseMain; |
||||
import com.wh.pojo.api.OutStorehouseMain; |
import com.wh.pojo.api.OutStorehouseMain; |
||||
|
import com.wh.pojo.api.OutStorehouseVo; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
@Mapper |
||||
public interface OutStorehouseMainMapper extends BaseMapper<OutStorehouseMain> { |
public interface OutStorehouseMainMapper extends BaseMapper<OutStorehouseMain> { |
||||
|
IPage<OutStorehouseVo> selectPageVo(IPage<OutStorehouseVo> page, |
||||
|
@Param(Constants.WRAPPER) Wrapper<OutStorehouseVo> qw); |
||||
|
|
||||
} |
} |
||||
|
@ -1,17 +1,26 @@ |
|||||
package com.wh.service.api.outstorehouse; |
package com.wh.service.api.outstorehouse; |
||||
|
|
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.wh.mapper.api.instorehouse.InStorehouseMainMapper; |
import com.wh.mapper.api.instorehouse.InStorehouseMainMapper; |
||||
import com.wh.mapper.api.outstorehouse.OutStorehouseListingMapper; |
import com.wh.mapper.api.outstorehouse.OutStorehouseListingMapper; |
||||
import com.wh.mapper.api.outstorehouse.OutStorehouseMainMapper; |
import com.wh.mapper.api.outstorehouse.OutStorehouseMainMapper; |
||||
|
import com.wh.pojo.api.InStorehouseListing; |
||||
import com.wh.pojo.api.InStorehouseMain; |
import com.wh.pojo.api.InStorehouseMain; |
||||
import com.wh.pojo.api.OutStorehouseListing; |
import com.wh.pojo.api.OutStorehouseListing; |
||||
import com.wh.pojo.api.OutStorehouseMain; |
import com.wh.pojo.api.OutStorehouseMain; |
||||
import com.yxt.common.base.service.MybatisBaseService; |
import com.yxt.common.base.service.MybatisBaseService; |
||||
import org.springframework.stereotype.Service; |
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
@Service |
@Service |
||||
public class OutStorehouseListingService extends MybatisBaseService<OutStorehouseListingMapper, OutStorehouseListing> { |
public class OutStorehouseListingService extends MybatisBaseService<OutStorehouseListingMapper, OutStorehouseListing> { |
||||
|
|
||||
|
|
||||
|
public List<OutStorehouseListing> selectInStorehouseListingsByMainSid(String sid) { |
||||
|
List<OutStorehouseListing> list=baseMapper.selectList( |
||||
|
new QueryWrapper<OutStorehouseListing>().eq("main_sid",sid)); |
||||
|
return list; |
||||
|
} |
||||
} |
} |
||||
|
@ -0,0 +1,7 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.wh.mapper.api.instorehouse.InStorehouseMainMapper"> |
||||
|
<select id="selectPageVo" resultType="com.wh.pojo.api.InStoreHouseMainVo"> |
||||
|
SELECT * FROM in_storehouse_main <where> ${ew.sqlSegment} </where> |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,7 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.wh.mapper.api.outstorehouse.OutStorehouseMainMapper"> |
||||
|
<select id="selectPageVo" resultType="com.wh.pojo.api.OutStorehouseVo"> |
||||
|
SELECT * FROM out_storehouse_main <where> ${ew.sqlSegment} </where> |
||||
|
</select> |
||||
|
</mapper> |
Loading…
Reference in new issue