Merge remote-tracking branch 'origin/master'
						commit
						3adaf6fea1
					
				| @ -0,0 +1,101 @@ | |||||||
|  | package com.glxp.api.controller.inv; | ||||||
|  | 
 | ||||||
|  | import cn.hutool.core.bean.BeanUtil; | ||||||
|  | import cn.hutool.core.collection.CollUtil; | ||||||
|  | import cn.hutool.core.util.StrUtil; | ||||||
|  | import com.github.pagehelper.PageInfo; | ||||||
|  | import com.glxp.api.common.res.BaseResponse; | ||||||
|  | import com.glxp.api.common.util.ResultVOUtils; | ||||||
|  | import com.glxp.api.entity.inv.InvPreInProductDetailEntity; | ||||||
|  | import com.glxp.api.req.inv.FilterInvPreProductDetailRequest; | ||||||
|  | import com.glxp.api.req.inv.FilterInvPreinProductRequest; | ||||||
|  | import com.glxp.api.res.PageSimpleResponse; | ||||||
|  | import com.glxp.api.res.inv.InvPreProductDetailResponse; | ||||||
|  | import com.glxp.api.res.inv.InvPreProductPageResponse; | ||||||
|  | import com.glxp.api.res.inv.InvPreinProductResponse; | ||||||
|  | import com.glxp.api.service.auth.CustomerService; | ||||||
|  | import com.glxp.api.service.auth.WarehouseUserService; | ||||||
|  | import com.glxp.api.service.inv.InvPreinProductDetailService; | ||||||
|  | import com.glxp.api.service.inv.InvPreinProductService; | ||||||
|  | import com.glxp.api.util.udi.FilterUdiUtils; | ||||||
|  | import lombok.extern.slf4j.Slf4j; | ||||||
|  | import org.springframework.web.bind.annotation.GetMapping; | ||||||
|  | import org.springframework.web.bind.annotation.RestController; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import java.util.ArrayList; | ||||||
|  | import java.util.List; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 预验收库存接口 | ||||||
|  |  */ | ||||||
|  | @Slf4j | ||||||
|  | @RestController | ||||||
|  | public class InvPreinProductController { | ||||||
|  |     @Resource | ||||||
|  |     private InvPreinProductDetailService invPreinProductDetailService; | ||||||
|  |     @Resource | ||||||
|  |     private InvPreinProductService invPreinProductService; | ||||||
|  |     @Resource | ||||||
|  |     private WarehouseUserService warehouseUserService; | ||||||
|  |     @Resource | ||||||
|  |     private CustomerService customerService; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 预验收库存查询接口 | ||||||
|  |      * | ||||||
|  |      * @param filterInvPreinProductRequest | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping("/spms/inv/pre/in/product/filter") | ||||||
|  |     public BaseResponse filterList(FilterInvPreinProductRequest filterInvPreinProductRequest) { | ||||||
|  |         boolean showSup = false; //前端控制表格显示字段
 | ||||||
|  |         if (StrUtil.isNotBlank(filterInvPreinProductRequest.getUdiCode())) { | ||||||
|  |             filterInvPreinProductRequest.setNameCode(FilterUdiUtils.getDiStr(filterInvPreinProductRequest.getUdiCode())); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         if (StrUtil.isBlank(filterInvPreinProductRequest.getInvCode())) { | ||||||
|  |             List<String> invCodes = warehouseUserService.selectCodeByUser(customerService.getUserIdStr()); | ||||||
|  |             if (CollUtil.isNotEmpty(invCodes)) { | ||||||
|  |                 filterInvPreinProductRequest.setInvCodes(invCodes); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         List<InvPreinProductResponse> list = invPreinProductService.filterList(filterInvPreinProductRequest); | ||||||
|  |         PageInfo<InvPreinProductResponse> pageInfo = new PageInfo<>(list); | ||||||
|  |         InvPreProductPageResponse<InvPreinProductResponse> pageResponse = new InvPreProductPageResponse<>(); | ||||||
|  |         pageResponse.setList(pageInfo.getList()); | ||||||
|  |         pageResponse.setTotal(pageInfo.getTotal()); | ||||||
|  |         pageResponse.setShowSup(showSup); | ||||||
|  |         return ResultVOUtils.success(pageResponse); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查询预验收库存详情 | ||||||
|  |      * | ||||||
|  |      * @param detailRequest | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping("/spms/inv/pre/in/product/filterDetail") | ||||||
|  |     public BaseResponse filterInvPreProductDetail(FilterInvPreProductDetailRequest detailRequest) { | ||||||
|  |         List<InvPreInProductDetailEntity> invPreProductDetailEntities = invPreinProductDetailService.filterPreProductDetailList(detailRequest); | ||||||
|  |         PageInfo<InvPreInProductDetailEntity> pageInfo = new PageInfo<>(invPreProductDetailEntities); | ||||||
|  | 
 | ||||||
|  |         List<InvPreProductDetailResponse> list = new ArrayList<>(); | ||||||
|  |         if (CollUtil.isNotEmpty(invPreProductDetailEntities)) { | ||||||
|  |             invPreProductDetailEntities.forEach(invPreProductDetailEntity -> { | ||||||
|  |                 InvPreProductDetailResponse response = new InvPreProductDetailResponse(); | ||||||
|  |                 BeanUtil.copyProperties(invPreProductDetailEntity, response); | ||||||
|  |                 //设置单据类型名称等单据相关参数
 | ||||||
|  |                 invPreinProductDetailService.setOrderInfo(response); | ||||||
|  |                 list.add(response); | ||||||
|  |             }); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         PageSimpleResponse<InvPreProductDetailResponse> pageSimpleResponse = new PageSimpleResponse<>(); | ||||||
|  |         pageSimpleResponse.setList(list); | ||||||
|  |         pageSimpleResponse.setTotal(pageInfo.getTotal()); | ||||||
|  |         return ResultVOUtils.success(pageSimpleResponse); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | } | ||||||
| @ -0,0 +1,30 @@ | |||||||
|  | package com.glxp.api.dao.inv; | ||||||
|  | 
 | ||||||
|  | import com.glxp.api.dao.BaseMapperPlus; | ||||||
|  | import com.glxp.api.entity.inv.InvPreInProductDetailEntity; | ||||||
|  | import com.glxp.api.req.inv.FilterInvPreProductDetailRequest; | ||||||
|  | import com.glxp.api.req.inv.FilterInvProductDetailRequest; | ||||||
|  | 
 | ||||||
|  | import java.util.List; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 预验收库存详情Dao | ||||||
|  |  */ | ||||||
|  | public interface InvPreInProductDetailDao extends BaseMapperPlus<InvPreInProductDetailDao, InvPreInProductDetailEntity, InvPreInProductDetailEntity> { | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查询库存详情实体列表 | ||||||
|  |      * | ||||||
|  |      * @param filterInvPreProductDetailRequest | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     List<InvPreInProductDetailEntity> filterPreProductDetailList(FilterInvPreProductDetailRequest filterInvPreProductDetailRequest); | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 删除寄预验收库存详情 | ||||||
|  |      * | ||||||
|  |      * @param detailRequest | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     boolean deleteInvPreProductDetail(FilterInvProductDetailRequest detailRequest); | ||||||
|  | } | ||||||
| @ -0,0 +1,31 @@ | |||||||
|  | package com.glxp.api.dao.inv; | ||||||
|  | 
 | ||||||
|  | import com.glxp.api.dao.BaseMapperPlus; | ||||||
|  | import com.glxp.api.entity.inv.InvPreinProductEntity; | ||||||
|  | import com.glxp.api.req.inv.FilterInvPreinProductRequest; | ||||||
|  | import com.glxp.api.res.inv.InvPreinProductResponse; | ||||||
|  | 
 | ||||||
|  | import java.util.List; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 预验收库存Dao | ||||||
|  |  */ | ||||||
|  | public interface InvPreinProductDao extends BaseMapperPlus<InvPreinProductDao, InvPreinProductEntity, InvPreinProductEntity> { | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查询寄售库存VO列表 | ||||||
|  |      * | ||||||
|  |      * @param invPreProductRequest | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     List<InvPreinProductResponse> filterList(FilterInvPreinProductRequest invPreProductRequest); | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查询寄售库存实体列表 | ||||||
|  |      * | ||||||
|  |      * @param invPreProductRequest | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     List<InvPreinProductEntity> filterPreProductList(FilterInvPreinProductRequest invPreProductRequest); | ||||||
|  | 
 | ||||||
|  | } | ||||||
| @ -0,0 +1,167 @@ | |||||||
|  | package com.glxp.api.entity.inv; | ||||||
|  | 
 | ||||||
|  | import com.baomidou.mybatisplus.annotation.IdType; | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableField; | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableId; | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableName; | ||||||
|  | import lombok.Data; | ||||||
|  | 
 | ||||||
|  | import java.util.Date; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 寄售库存详情表 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @TableName(value = "inv_pre_product_detail") | ||||||
|  | public class InvPreInProductDetailEntity { | ||||||
|  |     @TableId(value = "id", type = IdType.AUTO) | ||||||
|  |     private Integer id; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * UDI码 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "code") | ||||||
|  |     private String code; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 出入单据类型 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "mainAction") | ||||||
|  |     private String mainAction; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 单据类型 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "`action`") | ||||||
|  |     private String action; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 订单号外键 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "orderId") | ||||||
|  |     private String orderId; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 耗材字典ID | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "relId") | ||||||
|  |     private Long relId; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 最小销售标识 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "nameCode") | ||||||
|  |     private String nameCode; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 批次号 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "batchNo") | ||||||
|  |     private String batchNo; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 生产日期 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "produceDate") | ||||||
|  |     private String produceDate; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 失效日期 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "expireDate") | ||||||
|  |     private String expireDate; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 序列号 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "serialNo") | ||||||
|  |     private String serialNo; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 供应商 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "supId") | ||||||
|  |     private String supId; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 扫码数量 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "`count`") | ||||||
|  |     private int count; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 实际数量 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "reCount") | ||||||
|  |     private int reCount; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 部门编码 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "deptCode") | ||||||
|  |     private String deptCode; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 仓库编码 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "invCode") | ||||||
|  |     private String invCode; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 货位编码 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "invSpaceCode") | ||||||
|  |     private String invSpaceCode; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 采购类型 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "purchaseType") | ||||||
|  |     private Integer purchaseType; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 更新时间 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "updateTime") | ||||||
|  |     private Date updateTime; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     public static final String COL_ID = "id"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_CODE = "code"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_MAINACTION = "mainAction"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_ACTION = "action"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_ORDERID = "orderId"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_RELID = "relId"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_NAMECODE = "nameCode"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_BATCHNO = "batchNo"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_PRODUCEDATE = "produceDate"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_EXPIREDATE = "expireDate"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_SERIALNO = "serialNo"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_SUPID = "supId"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_COUNT = "count"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_RECOUNT = "reCount"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_DEPTCODE = "deptCode"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_INVCODE = "invCode"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_INVSPACECODE = "invSpaceCode"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_PURCHASETYPE = "purchaseType"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_UPDATETIME = "updateTime"; | ||||||
|  | } | ||||||
| @ -0,0 +1,133 @@ | |||||||
|  | package com.glxp.api.entity.inv; | ||||||
|  | 
 | ||||||
|  | import com.baomidou.mybatisplus.annotation.IdType; | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableField; | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableId; | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableName; | ||||||
|  | import lombok.Data; | ||||||
|  | 
 | ||||||
|  | import java.util.Date; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 预验收库存表 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @TableName(value = "inv_prein_product") | ||||||
|  | public class InvPreinProductEntity { | ||||||
|  |     @TableId(value = "id", type = IdType.AUTO) | ||||||
|  |     private Integer id; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 耗材字典ID | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "relIdFk") | ||||||
|  |     private Long relIdFk; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 最小销售标识 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "nameCode") | ||||||
|  |     private String nameCode; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 批次号 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "batchNo") | ||||||
|  |     private String batchNo; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 生产日期 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "productionDate") | ||||||
|  |     private String productionDate; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 失效日期 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "expireDate") | ||||||
|  |     private String expireDate; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 入库数量 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "inCount") | ||||||
|  |     private int inCount; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 出库数量 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "outCount") | ||||||
|  |     private int outCount; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 实际数量 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "reCount") | ||||||
|  |     private int reCount; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 客户ID | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "customerId") | ||||||
|  |     private String customerId; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 供应商ID | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "supId") | ||||||
|  |     private String supId; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 部门编码 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "deptCode") | ||||||
|  |     private String deptCode; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 仓库编码 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "invCode") | ||||||
|  |     private String invCode; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 创建时间 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "createTime") | ||||||
|  |     private Date createTime; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 更新时间 | ||||||
|  |      */ | ||||||
|  |     @TableField(value = "updateTime") | ||||||
|  |     private Date updateTime; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_ID = "id"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_RELIDFK = "relIdFk"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_NAMECODE = "nameCode"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_BATCHNO = "batchNo"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_PRODUCTIONDATE = "productionDate"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_EXPIREDATE = "expireDate"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_INCOUNT = "inCount"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_OUTCOUNT = "outCount"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_RECOUNT = "reCount"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_CUSTOMERID = "customerId"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_SUPID = "supId"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_DEPTCODE = "deptCode"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_INVCODE = "invCode"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_CREATETIME = "createTime"; | ||||||
|  | 
 | ||||||
|  |     public static final String COL_UPDATETIME = "updateTime"; | ||||||
|  | } | ||||||
| @ -0,0 +1,101 @@ | |||||||
|  | package com.glxp.api.req.inv; | ||||||
|  | 
 | ||||||
|  | import com.glxp.api.util.page.ListPageRequest; | ||||||
|  | import lombok.Data; | ||||||
|  | 
 | ||||||
|  | import java.util.List; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 预验收库存查询参数 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class FilterInvPreinProductRequest extends ListPageRequest { | ||||||
|  | 
 | ||||||
|  |     private String id; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 产品名称 | ||||||
|  |      */ | ||||||
|  |     private String cpmctymc; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 产品标识DI | ||||||
|  |      */ | ||||||
|  |     private String nameCode; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * UDI码 | ||||||
|  |      */ | ||||||
|  |     private String udiCode; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 耗材字典ID | ||||||
|  |      */ | ||||||
|  |     private String relIdFk; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 规格型号 | ||||||
|  |      */ | ||||||
|  |     private String ggxh; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 批次号 | ||||||
|  |      */ | ||||||
|  |     private String batchNo; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 生产日期 | ||||||
|  |      */ | ||||||
|  |     private String productionDate; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 失效日期 | ||||||
|  |      */ | ||||||
|  |     private String expireDate; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 生产厂家 | ||||||
|  |      */ | ||||||
|  |     private String ylqxzcrbarmc; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 批准文号 | ||||||
|  |      */ | ||||||
|  |     private String zczbhhzbapzbh; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 客户ID | ||||||
|  |      */ | ||||||
|  |     private String customerId; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 供应商ID | ||||||
|  |      */ | ||||||
|  |     private String supId; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 供应商名称 | ||||||
|  |      */ | ||||||
|  |     private String supName; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 部门编码 | ||||||
|  |      */ | ||||||
|  |     private String deptCode; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 仓库编码 | ||||||
|  |      */ | ||||||
|  |     private String invCode; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 仓库数组 | ||||||
|  |      */ | ||||||
|  |     private List<String> invCodes; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 产品类别 | ||||||
|  |      */ | ||||||
|  |     private String cplb; | ||||||
|  | 
 | ||||||
|  | } | ||||||
| @ -0,0 +1,108 @@ | |||||||
|  | package com.glxp.api.res.inv; | ||||||
|  | 
 | ||||||
|  | import lombok.Data; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 预验收库存VO | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class InvPreinProductResponse { | ||||||
|  | 
 | ||||||
|  |     private Integer id; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 产品标识DI | ||||||
|  |      */ | ||||||
|  |     private String nameCode; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 产品名称 | ||||||
|  |      */ | ||||||
|  |     private String cpmctymc; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 耗材字典ID | ||||||
|  |      */ | ||||||
|  |     private String relIdFk; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 规格型号 | ||||||
|  |      */ | ||||||
|  |     private String ggxh; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 批次号 | ||||||
|  |      */ | ||||||
|  |     private String batchNo; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 生产日期 | ||||||
|  |      */ | ||||||
|  |     private String productionDate; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 过期时间 | ||||||
|  |      */ | ||||||
|  |     private String expireDate; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 生产厂家名称 | ||||||
|  |      */ | ||||||
|  |     private String ylqxzcrbarmc; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 批准文号 | ||||||
|  |      */ | ||||||
|  |     private String zczbhhzbapzbh; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 入库数量 | ||||||
|  |      */ | ||||||
|  |     private int inCount; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 出库数量 | ||||||
|  |      */ | ||||||
|  |     private int outCount; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 实际数量 | ||||||
|  |      */ | ||||||
|  |     private int reCount; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 客户ID | ||||||
|  |      */ | ||||||
|  |     private String customerId; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 供应商名称 | ||||||
|  |      */ | ||||||
|  |     private String supName; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 供应商ID | ||||||
|  |      */ | ||||||
|  |     private String supId; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 部门名称 | ||||||
|  |      */ | ||||||
|  |     private String deptName; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 仓库名称 | ||||||
|  |      */ | ||||||
|  |     private String invName; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 部门编码 | ||||||
|  |      */ | ||||||
|  |     private String deptCode; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 仓库编码 | ||||||
|  |      */ | ||||||
|  |     private String invCode; | ||||||
|  | 
 | ||||||
|  | } | ||||||
| @ -0,0 +1,56 @@ | |||||||
|  | package com.glxp.api.service.inv; | ||||||
|  | 
 | ||||||
|  | import com.glxp.api.entity.inv.InvPreInProductDetailEntity; | ||||||
|  | import com.glxp.api.req.inv.FilterInvPreProductDetailRequest; | ||||||
|  | import com.glxp.api.req.inv.FilterInvProductDetailRequest; | ||||||
|  | import com.glxp.api.res.inv.InvPreProductDetailResponse; | ||||||
|  | 
 | ||||||
|  | import java.util.List; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 预验收库存详情Service | ||||||
|  |  */ | ||||||
|  | public interface InvPreinProductDetailService { | ||||||
|  | 
 | ||||||
|  |     int insert(InvPreInProductDetailEntity invPreInProductDetailEntity); | ||||||
|  | 
 | ||||||
|  |     boolean insertList(List<InvPreInProductDetailEntity> invPreProductDetailEntities); | ||||||
|  | 
 | ||||||
|  |     List<InvPreInProductDetailEntity> selectByOrderIdFk(String billNo); | ||||||
|  | 
 | ||||||
|  |     List<InvPreInProductDetailEntity> findByCode(String code); | ||||||
|  | 
 | ||||||
|  |     InvPreInProductDetailEntity selectByCode(String billNo, String code); | ||||||
|  | 
 | ||||||
|  |     boolean update(InvPreInProductDetailEntity invPreInProductDetailEntity); | ||||||
|  | 
 | ||||||
|  |     boolean deleteById(String id); | ||||||
|  | 
 | ||||||
|  |     int deleteByOrderId(String billNo); | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查询寄售库存详情列表 | ||||||
|  |      * | ||||||
|  |      * @param invPreProductDetailRequest | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     List<InvPreInProductDetailEntity> filterPreProductDetailList(FilterInvPreProductDetailRequest invPreProductDetailRequest); | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 设置单据类型名称等单据相关参数 | ||||||
|  |      * | ||||||
|  |      * @param response | ||||||
|  |      */ | ||||||
|  |     void setOrderInfo(InvPreProductDetailResponse response); | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 删除寄售库存详情 | ||||||
|  |      * | ||||||
|  |      * @param detailRequest | ||||||
|  |      */ | ||||||
|  |     boolean deleteInvPreProductDetail(FilterInvProductDetailRequest detailRequest); | ||||||
|  | 
 | ||||||
|  |     int findCountByCode(String code); | ||||||
|  | 
 | ||||||
|  |     InvPreInProductDetailEntity findUseOneByCode(String code); | ||||||
|  | } | ||||||
| @ -0,0 +1,48 @@ | |||||||
|  | package com.glxp.api.service.inv; | ||||||
|  | 
 | ||||||
|  | import com.glxp.api.entity.inv.InvPreinProductEntity; | ||||||
|  | import com.glxp.api.req.inv.FilterInvPreinProductRequest; | ||||||
|  | import com.glxp.api.res.inv.InvPreinProductResponse; | ||||||
|  | 
 | ||||||
|  | import java.util.List; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 预验收库存Service | ||||||
|  |  */ | ||||||
|  | public interface InvPreinProductService { | ||||||
|  | 
 | ||||||
|  |     int insert(InvPreinProductEntity invPreinProductEntity); | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     boolean update(InvPreinProductEntity invPreinProductEntity); | ||||||
|  | 
 | ||||||
|  |     InvPreinProductEntity selectByUnique(Long relId, String batchNo, String supId, String deptCode, String invCode); | ||||||
|  | 
 | ||||||
|  |     boolean deleteById(Integer id); | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查询寄售库存VO | ||||||
|  |      * | ||||||
|  |      * @param filterInvPreinDetailRequest | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     List<InvPreinProductResponse> filterList(FilterInvPreinProductRequest filterInvPreinDetailRequest); | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查询寄售库存列表 | ||||||
|  |      * | ||||||
|  |      * @param invPreProductRequest | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     List<InvPreinProductEntity> filterPreinProductList(FilterInvPreinProductRequest invPreProductRequest); | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据ID查询寄售库存信息 | ||||||
|  |      * | ||||||
|  |      * @param id | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     InvPreinProductEntity findById(String id); | ||||||
|  | 
 | ||||||
|  |     boolean isExitByRelId(String relId); | ||||||
|  | } | ||||||
| @ -0,0 +1,83 @@ | |||||||
|  | package com.glxp.api.service.inv.impl; | ||||||
|  | 
 | ||||||
|  | import cn.hutool.core.util.StrUtil; | ||||||
|  | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||||||
|  | import com.github.pagehelper.PageHelper; | ||||||
|  | import com.glxp.api.dao.inv.InvPreinProductDao; | ||||||
|  | import com.glxp.api.entity.inv.InvPreinProductEntity; | ||||||
|  | import com.glxp.api.req.inv.FilterInvPreinProductRequest; | ||||||
|  | import com.glxp.api.res.inv.InvPreinProductResponse; | ||||||
|  | import com.glxp.api.service.inv.InvPreinProductService; | ||||||
|  | import lombok.extern.slf4j.Slf4j; | ||||||
|  | import org.springframework.stereotype.Service; | ||||||
|  | import org.springframework.transaction.annotation.Transactional; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import java.util.Collections; | ||||||
|  | import java.util.List; | ||||||
|  | 
 | ||||||
|  | @Slf4j | ||||||
|  | @Service | ||||||
|  | @Transactional(rollbackFor = Exception.class) | ||||||
|  | public class InvPreinProductServiceImpl implements InvPreinProductService { | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private InvPreinProductDao invPreinProductDao; | ||||||
|  | 
 | ||||||
|  |     @Override | ||||||
|  |     public int insert(InvPreinProductEntity invPreinProductEntity) { | ||||||
|  |         return invPreinProductDao.insert(invPreinProductEntity); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @Override | ||||||
|  |     public boolean update(InvPreinProductEntity invPreinProductEntity) { | ||||||
|  |         return invPreinProductDao.updateById(invPreinProductEntity) == 1 ? true : false; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @Override | ||||||
|  |     public InvPreinProductEntity selectByUnique(Long relId, String batchNo, String supId, String deptCode, String invCode) { | ||||||
|  |         return invPreinProductDao.selectOne(new QueryWrapper<InvPreinProductEntity>().eq("relIdFk", relId).eq(StrUtil.isNotEmpty(batchNo), "batchNo", batchNo) | ||||||
|  |                 .isNull(StrUtil.isEmpty(batchNo), "batchNo").eq("supId", supId).eq("deptCode", deptCode).eq("invCode", invCode)); | ||||||
|  | 
 | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @Override | ||||||
|  |     public boolean deleteById(Integer id) { | ||||||
|  |         return invPreinProductDao.deleteById(id) == 1 ? true : false; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @Override | ||||||
|  |     public List<InvPreinProductResponse> filterList(FilterInvPreinProductRequest invPreProductRequest) { | ||||||
|  |         if (null == invPreProductRequest) { | ||||||
|  |             return Collections.emptyList(); | ||||||
|  |         } | ||||||
|  |         if (null != invPreProductRequest.getPage()) { | ||||||
|  |             PageHelper.offsetPage((invPreProductRequest.getPage() - 1) * invPreProductRequest.getLimit(), invPreProductRequest.getLimit()); | ||||||
|  |         } | ||||||
|  |         return invPreinProductDao.filterList(invPreProductRequest); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @Override | ||||||
|  |     public List<InvPreinProductEntity> filterPreinProductList(FilterInvPreinProductRequest invPreProductRequest) { | ||||||
|  |         if (null == invPreProductRequest) { | ||||||
|  |             return Collections.emptyList(); | ||||||
|  |         } | ||||||
|  |         if (null != invPreProductRequest.getPage() && null != invPreProductRequest.getLimit()) { | ||||||
|  |             PageHelper.offsetPage((invPreProductRequest.getPage() - 1) * invPreProductRequest.getLimit(), invPreProductRequest.getLimit()); | ||||||
|  |         } | ||||||
|  |         return invPreinProductDao.filterPreProductList(invPreProductRequest); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @Override | ||||||
|  |     public InvPreinProductEntity findById(String id) { | ||||||
|  |         return invPreinProductDao.selectById(id); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     @Override | ||||||
|  |     public boolean isExitByRelId(String relId) { | ||||||
|  |         return invPreinProductDao.exists(new QueryWrapper<InvPreinProductEntity>().eq("relIdFk", relId)); | ||||||
|  | 
 | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | } | ||||||
| @ -0,0 +1,77 @@ | |||||||
|  | <?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.glxp.api.dao.inv.InvPreInProductDetailDao"> | ||||||
|  |     <select id="filterPreProductDetailList" resultType="com.glxp.api.entity.inv.InvPreInProductDetailEntity"> | ||||||
|  |         select * | ||||||
|  |         from inv_prein_product_detail | ||||||
|  |         <where> | ||||||
|  |             <if test="code != null and code != ''"> | ||||||
|  |                 AND code = #{code} | ||||||
|  |             </if> | ||||||
|  |             <if test="mainAction != null and mainAction != ''"> | ||||||
|  |                 AND mainAction = #{mainAction} | ||||||
|  |             </if> | ||||||
|  |             <if test="action != null and action != ''"> | ||||||
|  |                 AND action = #{action} | ||||||
|  |             </if> | ||||||
|  |             <if test="supId != null and supId != ''"> | ||||||
|  |                 and supId = #{supId} | ||||||
|  |             </if> | ||||||
|  |             <if test="relId != null and relId != ''"> | ||||||
|  |                 AND relId = #{relId} | ||||||
|  |             </if> | ||||||
|  |             <if test="nameCode != null and nameCode != ''"> | ||||||
|  |                 AND nameCode like concat('%', #{nameCode}, '%') | ||||||
|  |             </if> | ||||||
|  |             <if test="orderId != null and orderId != ''"> | ||||||
|  |                 AND orderId = #{orderId} | ||||||
|  |             </if> | ||||||
|  |             <if test="deptCode != null and deptCode != ''"> | ||||||
|  |                 AND deptCode = #{deptCode} | ||||||
|  |             </if> | ||||||
|  |             <if test="invCode != null and invCode != ''"> | ||||||
|  |                 AND invCode = #{invCode} | ||||||
|  |             </if> | ||||||
|  |             <if test="invSpaceCode != null and invSpaceCode != ''"> | ||||||
|  |                 AND invSpaceCode = #{invSpaceCode} | ||||||
|  |             </if> | ||||||
|  |             <if test="batchNo != null and batchNo != ''"> | ||||||
|  |                 AND batchNo = #{batchNo} | ||||||
|  |             </if> | ||||||
|  |             <if test="batchNo == null and batchNo == ''"> | ||||||
|  |                 AND batchNo is null | ||||||
|  |             </if> | ||||||
|  |             <if test="productIdList != null and productIdList.size() != 0"> | ||||||
|  |                 AND relId in | ||||||
|  |                 <foreach collection="productIdList" item="item" index="index" open="(" close=")" separator=","> | ||||||
|  |                     #{item} | ||||||
|  |                 </foreach> | ||||||
|  |             </if> | ||||||
|  |             <if test="updateTime != null and updateTime != ''"> | ||||||
|  |                 AND updateTime <![CDATA[ <= ]]> #{updateTime} | ||||||
|  |             </if> | ||||||
|  |         </where> | ||||||
|  |     </select> | ||||||
|  | 
 | ||||||
|  |     <delete id="deleteInvPreProductDetail"> | ||||||
|  |         delete | ||||||
|  |         from inv_prein_product_detail | ||||||
|  |         <where> | ||||||
|  |             <if test="relId != null and relId != ''"> | ||||||
|  |                 AND relId = #{relId} | ||||||
|  |             </if> | ||||||
|  |             <if test="batchNo != null and batchNo != '' and batchNo != 'empty'"> | ||||||
|  |                 AND batchNo = #{batchNo} | ||||||
|  |             </if> | ||||||
|  |             <if test="batchNo == 'empty'"> | ||||||
|  |                 AND batchNo is null | ||||||
|  |             </if> | ||||||
|  |             <if test="supId != null and supId != ''"> | ||||||
|  |                 AND supId = #{supId} | ||||||
|  |             </if> | ||||||
|  |             <if test="invCode != null and invCode != ''"> | ||||||
|  |                 AND invCode = #{invCode} | ||||||
|  |             </if> | ||||||
|  |         </where> | ||||||
|  |     </delete> | ||||||
|  | </mapper> | ||||||
| @ -0,0 +1,138 @@ | |||||||
|  | <?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.glxp.api.dao.inv.InvPreinProductDao"> | ||||||
|  |     <select id="filterList" resultType="com.glxp.api.res.inv.InvPreinProductResponse"> | ||||||
|  |         select ipp.id, | ||||||
|  |                ipp.nameCode, | ||||||
|  |                bp.cpmctymc, | ||||||
|  |                ipp.relIdFk, | ||||||
|  |                bp.ggxh, | ||||||
|  |                ipp.batchNo, | ||||||
|  |                ipp.productionDate, | ||||||
|  |                ipp.expireDate, | ||||||
|  |                bp.ylqxzcrbarmc, | ||||||
|  |                bp.zczbhhzbapzbh, | ||||||
|  |                ipp.inCount, | ||||||
|  |                ipp.outCount, | ||||||
|  |                ipp.reCount, | ||||||
|  |                ipp.customerId, | ||||||
|  |                basic_corp.name     supName, | ||||||
|  |                ipp.supId, | ||||||
|  |                auth_dept.name      deptName, | ||||||
|  |                auth_warehouse.name invName, | ||||||
|  |                ipp.deptCode, | ||||||
|  |                ipp.invCode | ||||||
|  |         from inv_prein_product ipp | ||||||
|  |                      inner join basic_udirel on ipp.relIdFk = basic_udirel.id | ||||||
|  |                      inner join basic_products bp on basic_udirel.uuid = bp.uuid | ||||||
|  |                      left join basic_corp on ipp.supId = basic_corp.erpId | ||||||
|  |                      left join auth_dept on auth_dept.code = ipp.deptCode | ||||||
|  |                      left join auth_warehouse on auth_warehouse.code = ipp.invCode | ||||||
|  |         <where> | ||||||
|  |             bp.diType = 1 | ||||||
|  |             <if test="cpmctymc != null and cpmctymc != ''"> | ||||||
|  |                 AND bp.cpmctymc like concat('%', #{cpmctymc}, '%') | ||||||
|  |             </if> | ||||||
|  |             <if test="nameCode != null and nameCode != ''"> | ||||||
|  |                 AND ipp.nameCode like concat('%', #{nameCode}, '%') | ||||||
|  |             </if> | ||||||
|  |             <if test="relIdFk != null and relIdFk != ''"> | ||||||
|  |                 AND ipp.relIdFk = #{relIdFk} | ||||||
|  |             </if> | ||||||
|  |             <if test="ggxh != null and ggxh != ''"> | ||||||
|  |                 AND bp.ggxh like concat('%', #{ggxh}, '%') | ||||||
|  |             </if> | ||||||
|  |             <if test="batchNo != null and batchNo != ''"> | ||||||
|  |                 AND ipp.batchNo like concat('%', #{batchNo}, '%') | ||||||
|  |             </if> | ||||||
|  |             <if test="productionDate != null and productionDate != ''"> | ||||||
|  |                 AND ipp.productionDate = #{productionDate} | ||||||
|  |             </if> | ||||||
|  |             <if test="expireDate != null and expireDate != ''"> | ||||||
|  |                 AND ipp.expireDate = #{expireDate} | ||||||
|  |             </if> | ||||||
|  |             <if test="ylqxzcrbarmc != null and ylqxzcrbarmc != ''"> | ||||||
|  |                 AND bp.ylqxzcrbarmc like concat('%', #{ylqxzcrbarmc}, '%') | ||||||
|  |             </if> | ||||||
|  |             <if test="zczbhhzbapzbh != null and zczbhhzbapzbh != ''"> | ||||||
|  |                 AND bp.zczbhhzbapzbh like concat('%', #{zczbhhzbapzbh}, '%') | ||||||
|  |             </if> | ||||||
|  |             <if test="customerId != null and customerId != ''"> | ||||||
|  |                 AND ipp.customerId = #{customerId} | ||||||
|  |             </if> | ||||||
|  |             <if test="supId != null and supId != ''"> | ||||||
|  |                 AND ipp.supId = #{supId} | ||||||
|  |             </if> | ||||||
|  |             <if test="deptCode != null and deptCode != ''"> | ||||||
|  |                 AND ipp.deptCode = #{deptCode} | ||||||
|  |             </if> | ||||||
|  |             <if test="invCode != null and invCode != ''"> | ||||||
|  |                 AND ipp.invCode = #{invCode} | ||||||
|  |             </if> | ||||||
|  |             <if test="invCodes != null and invCodes.size() != 0"> | ||||||
|  |                 AND ipp.invCode in | ||||||
|  |                 <foreach collection="invCodes" item="item" index="index" open="(" close=")" separator=","> | ||||||
|  |                     #{item} | ||||||
|  |                 </foreach> | ||||||
|  |             </if> | ||||||
|  |         </where> | ||||||
|  |     </select> | ||||||
|  | 
 | ||||||
|  |     <select id="filterPreProductList" resultType="com.glxp.api.entity.inv.InvPreinProductEntity"> | ||||||
|  |         select ipp.* | ||||||
|  |         from inv_prein_product ipp | ||||||
|  |                      inner join basic_udirel on ipp.relIdFk = basic_udirel.id | ||||||
|  |                      inner join basic_products bp on basic_udirel.uuid = bp.uuid | ||||||
|  |                      left join basic_corp on ipp.supId = basic_corp.erpId | ||||||
|  |                      left join auth_dept on auth_dept.code = ipp.deptCode | ||||||
|  |                      left join auth_warehouse on auth_warehouse.code = ipp.invCode | ||||||
|  |         <where> | ||||||
|  |             bp.diType = 1 | ||||||
|  |             <if test="cpmctymc != null and cpmctymc != ''"> | ||||||
|  |                 AND bp.cpmctymc like concat('%', #{cpmctymc}, '%') | ||||||
|  |             </if> | ||||||
|  |             <if test="nameCode != null and nameCode != ''"> | ||||||
|  |                 AND ipp.nameCode like concat('%', #{nameCode}, '%') | ||||||
|  |             </if> | ||||||
|  |             <if test="relIdFk != null and relIdFk != ''"> | ||||||
|  |                 AND ipp.relIdFk = #{relIdFk} | ||||||
|  |             </if> | ||||||
|  |             <if test="ggxh != null and ggxh != ''"> | ||||||
|  |                 AND bp.ggxh like concat('%', #{ggxh}, '%') | ||||||
|  |             </if> | ||||||
|  |             <if test="batchNo != null and batchNo != ''"> | ||||||
|  |                 AND ipp.batchNo like concat('%', #{batchNo}, '%') | ||||||
|  |             </if> | ||||||
|  |             <if test="productionDate != null and productionDate != ''"> | ||||||
|  |                 AND ipp.productionDate = #{productionDate} | ||||||
|  |             </if> | ||||||
|  |             <if test="expireDate != null and expireDate != ''"> | ||||||
|  |                 AND ipp.expireDate = #{expireDate} | ||||||
|  |             </if> | ||||||
|  |             <if test="ylqxzcrbarmc != null and ylqxzcrbarmc != ''"> | ||||||
|  |                 AND bp.ylqxzcrbarmc like concat('%', #{ylqxzcrbarmc}, '%') | ||||||
|  |             </if> | ||||||
|  |             <if test="zczbhhzbapzbh != null and zczbhhzbapzbh != ''"> | ||||||
|  |                 AND bp.zczbhhzbapzbh like concat('%', #{zczbhhzbapzbh}, '%') | ||||||
|  |             </if> | ||||||
|  |             <if test="customerId != null and customerId != ''"> | ||||||
|  |                 AND ipp.customerId = #{customerId} | ||||||
|  |             </if> | ||||||
|  |             <if test="supId != null and supId != ''"> | ||||||
|  |                 AND ipp.supId = #{supId} | ||||||
|  |             </if> | ||||||
|  |             <if test="deptCode != null and deptCode != ''"> | ||||||
|  |                 AND ipp.deptCode = #{deptCode} | ||||||
|  |             </if> | ||||||
|  |             <if test="invCode != null and invCode != ''"> | ||||||
|  |                 AND ipp.invCode = #{invCode} | ||||||
|  |             </if> | ||||||
|  |             <if test="invCodes != null and invCodes.size() != 0"> | ||||||
|  |                 AND ipp.invCode in | ||||||
|  |                 <foreach collection="invCodes" item="item" index="index" open="(" close=")" separator=","> | ||||||
|  |                     #{item} | ||||||
|  |                 </foreach> | ||||||
|  |             </if> | ||||||
|  |         </where> | ||||||
|  |     </select> | ||||||
|  | </mapper> | ||||||
					Loading…
					
					
				
		Reference in New Issue