客户库存盘点明细
This commit is contained in:
		
							parent
							
								
									18c82cbbb3
								
							
						
					
					
						commit
						56a2acb1d8
					
				|  | @ -5,40 +5,20 @@ | ||||||
| <mapper namespace="com.yb.lb.webapp.stock.entity.ClientStockReport"> | <mapper namespace="com.yb.lb.webapp.stock.entity.ClientStockReport"> | ||||||
|     <!-- 字段映射 --> |     <!-- 字段映射 --> | ||||||
|     <resultMap id="stockReportMap" type="com.yb.lb.webapp.stock.entity.ClientStockReport"> |     <resultMap id="stockReportMap" type="com.yb.lb.webapp.stock.entity.ClientStockReport"> | ||||||
|  |         <result column="uecode" property="uecode" jdbcType="VARCHAR" /> | ||||||
|         <result column="bill_id" property="billId" jdbcType="VARCHAR" /> |         <result column="bill_id" property="billId" jdbcType="VARCHAR" /> | ||||||
|         <result column="bill_no" property="billNo" jdbcType="VARCHAR" /> |         <result column="bill_no" property="billNo" jdbcType="VARCHAR" /> | ||||||
|         <result column="bill_date" property="billDate" jdbcType="VARCHAR" /> |         <result column="bill_date" property="billDate" jdbcType="VARCHAR" /> | ||||||
|         <result column="client_id" property="clientId" jdbcType="VARCHAR" /> |  | ||||||
|         <result column="confirm_status" property="confirmStatus" jdbcType="VARCHAR" /> |  | ||||||
|         <result column="create_time" property="createTime" jdbcType="VARCHAR" /> |  | ||||||
|         <result column="goods_id" property="goodsId" jdbcType="VARCHAR" /> |  | ||||||
|         <result column="goods_no" property="goodsNo" jdbcType="VARCHAR" /> |  | ||||||
|         <result column="goods_name" property="goodsName" jdbcType="VARCHAR" /> |  | ||||||
|         <result column="unit_id" property="unitId" jdbcType="VARCHAR" /> |  | ||||||
|         <result column="unit_name" property="unitName" jdbcType="VARCHAR" /> |  | ||||||
|         <result column="specifications" property="specifications" jdbcType="VARCHAR" /> |  | ||||||
|         <result column="goods_type_id" property="goodsTypeId" jdbcType="VARCHAR" /> |  | ||||||
|         <result column="goods_type_name" property="goodsTypeName" jdbcType="VARCHAR" /> |  | ||||||
|         <result column="last_num" property="lastNum" jdbcType="VARCHAR" /> |  | ||||||
|         <result column="count_num" property="countNum" jdbcType="VARCHAR" /> |  | ||||||
|         <result column="diff_num" property="diffNum" jdbcType="VARCHAR" /> |  | ||||||
|         <result column="company_id" property="companyId" jdbcType="VARCHAR" /> |  | ||||||
|         <result column="remark" property="remark" jdbcType="VARCHAR" /> |  | ||||||
|         <result column="prod_date" property="prodDate" jdbcType="VARCHAR" /> |  | ||||||
|         <result column="distributor_name" property="clientName" jdbcType="VARCHAR" /> |  | ||||||
|         <result column="join_fhd_num" property="joinFhdNum" jdbcType="VARCHAR" /> |  | ||||||
|         <result column="distributor_no" property="distributorNo" jdbcType="VARCHAR" /> |  | ||||||
|         <result column="uecode" property="uecode" jdbcType="VARCHAR" /> |  | ||||||
|         <result column="create_name" property="createName" jdbcType="VARCHAR" /> |  | ||||||
|         <result column="create_time" property="createTime" jdbcType="VARCHAR" /> |  | ||||||
|         <result column="area_no" property="areaNo" jdbcType="VARCHAR" /> |         <result column="area_no" property="areaNo" jdbcType="VARCHAR" /> | ||||||
|         <result column="area_name" property="areaName" jdbcType="VARCHAR" /> |         <result column="area_name" property="areaName" jdbcType="VARCHAR" /> | ||||||
|     </resultMap> |     </resultMap> | ||||||
| 
 | 
 | ||||||
|     <!-- 客户库存盘点明细 --> |     <!-- 客户库存盘点明细 --> | ||||||
|     <select id="getClientStockReportSql" resultType="map" parameterType="map"> |     <select id="getClientStockReportSql" resultType="com.yb.lb.webapp.stock.entity.ClientStockReport" parameterType="map"> | ||||||
|         SELECT t0.uecode "uecode", |         SELECT t0.uecode "uecode", | ||||||
|         t0.distributor_name "clientName", |         t0.distributor_name "clientName", | ||||||
|  |         csui.name "staffName", | ||||||
|  |         cmai.area_name "areaName", | ||||||
|         NVL(t1.bill_date, '---') "billDate", |         NVL(t1.bill_date, '---') "billDate", | ||||||
|         NVL(t1.count_num, 0) "countNum", |         NVL(t1.count_num, 0) "countNum", | ||||||
|         NVL(t1.goods_num, 0) "goodsNum", |         NVL(t1.goods_num, 0) "goodsNum", | ||||||
|  | @ -83,8 +63,19 @@ | ||||||
|             TO_CHAR(TO_DATE(SUBSTR(#{endDate},1,10),'yyyy-MM-dd'),'yyyy-MM-dd') |             TO_CHAR(TO_DATE(SUBSTR(#{endDate},1,10),'yyyy-MM-dd'),'yyyy-MM-dd') | ||||||
|         </if> |         </if> | ||||||
|         GROUP BY client_id) t2 ON t0.id = t2.client_id |         GROUP BY client_id) t2 ON t0.id = t2.client_id | ||||||
|  |         LEFT JOIN crm_servicer_user_info csui ON t0.service_id = csui.id | ||||||
|  |         LEFT JOIN crm_marketing_area_info cmai ON t0.marketing_area_id = cmai.id | ||||||
|         WHERE t0.status = '1' AND t0.documents_status = '1' |         WHERE t0.status = '1' AND t0.documents_status = '1' | ||||||
|         AND t0.uecode IS NOT NULL AND t0.company_id = #{companyId} |         AND t0.uecode IS NOT NULL AND t0.company_id = #{companyId} | ||||||
|  |         <if test="clientId !=null and clientId !=''"> | ||||||
|  |             AND t0.id = #{clientId} | ||||||
|  |         </if> | ||||||
|  |         <if test="staffName !=null and staffName !=''"> | ||||||
|  |             AND csui.name = #{staffName} | ||||||
|  |         </if> | ||||||
|  |         <if test="areaName !=null and areaName !=''"> | ||||||
|  |             AND cmai.area_name = #{areaName} | ||||||
|  |         </if> | ||||||
|     </select> |     </select> | ||||||
| 
 | 
 | ||||||
| </mapper> | </mapper> | ||||||
|  | @ -1,5 +1,6 @@ | ||||||
| package com.yb.lb.webapp.stock.entity; | package com.yb.lb.webapp.stock.entity; | ||||||
| 
 | 
 | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  | @ -13,4 +14,35 @@ public class ClientStockReport implements java.io.Serializable { | ||||||
|     /** 版本号 */ |     /** 版本号 */ | ||||||
|     private static final long serialVersionUID = -1267096003093637603L; |     private static final long serialVersionUID = -1267096003093637603L; | ||||||
| 
 | 
 | ||||||
|  |     /** 客户编码-u8 */ | ||||||
|  |     @ApiModelProperty(value = "客户编码-u8") | ||||||
|  |     private String uecode; | ||||||
|  | 
 | ||||||
|  |     /** 客户名称 */ | ||||||
|  |     @ApiModelProperty(value = "客户名称") | ||||||
|  |     private String clientName; | ||||||
|  | 
 | ||||||
|  |     /** 业务员名称 */ | ||||||
|  |     @ApiModelProperty(value = "业务员名称") | ||||||
|  |     private String staffName; | ||||||
|  | 
 | ||||||
|  |     /** 部门名称 */ | ||||||
|  |     @ApiModelProperty(value = "部门名称") | ||||||
|  |     private String areaName; | ||||||
|  | 
 | ||||||
|  |     /** 最新盘点日期 */ | ||||||
|  |     @ApiModelProperty(value = "最新盘点日期") | ||||||
|  |     private String billDate; | ||||||
|  | 
 | ||||||
|  |     /** 最新盘点数量 */ | ||||||
|  |     @ApiModelProperty(value = "最新盘点数量") | ||||||
|  |     private String countNum; | ||||||
|  | 
 | ||||||
|  |     /** 最新盘点种类数 */ | ||||||
|  |     @ApiModelProperty(value = "最新盘点种类数") | ||||||
|  |     private String goodsNum; | ||||||
|  | 
 | ||||||
|  |     /** 主键id */ | ||||||
|  |     @ApiModelProperty(value = "盘点次数") | ||||||
|  |     private String billNum; | ||||||
| } | } | ||||||
		Loading…
	
		Reference in New Issue