parent
							
								
									8029be58b1
								
							
						
					
					
						commit
						0683419892
					
				| @ -0,0 +1,42 @@ | ||||
| package com.glxp.sale.admin.entity.thrsys; | ||||
| 
 | ||||
| import lombok.Data; | ||||
| 
 | ||||
| import java.util.Date; | ||||
| 
 | ||||
| @Data | ||||
| public class ThrInvProductsEntity { | ||||
| 
 | ||||
|     private Integer id; | ||||
|     private String inventoryCode; | ||||
|     private String inventoryName; | ||||
|     private String spec; | ||||
|     private Integer count; | ||||
|     private String batchNo; | ||||
|     private String warehouseName; | ||||
|     private String warehouseCode; | ||||
|     private String registerCertNo; | ||||
|     private String manufacturingDate; | ||||
|     private String expirationDate; | ||||
|     private String spaceCode; | ||||
|     private String spaceName; | ||||
|     private String thirdSysFk; | ||||
|     private Date updateTime; | ||||
|     private String manufactory; | ||||
| 
 | ||||
| 
 | ||||
|     private String code; | ||||
|     private String name; | ||||
| 
 | ||||
|     //增加字段
 | ||||
|     private String productDate; //生产日期
 | ||||
|     private String expireDate; //失效日期
 | ||||
|     private String productName; //产品名称
 | ||||
|     private String productId; //产品ID
 | ||||
|     private String standard; //规格型号
 | ||||
|     private String registerNo; //注册、备案证号
 | ||||
|     private String supId; //配送企业ID
 | ||||
|     private String supName; //配送企业名称
 | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,22 @@ | ||||
| package com.glxp.sale.admin.res.inventory; | ||||
| 
 | ||||
| import lombok.Data; | ||||
| 
 | ||||
| @Data | ||||
| public class ErpInvProductResponse { | ||||
| 
 | ||||
|     private String code; | ||||
|     private String name; | ||||
|     private String batchNo; | ||||
|     private String manufacturingDate; | ||||
|     private String expirationDate; | ||||
|     private String warehouseCode; | ||||
|     private String warehouseName; | ||||
|     private String registerCertNo; | ||||
|     private String spaceCode; | ||||
|     private String spaceName; | ||||
|     private String thirdSysFk; | ||||
|     private String spec; | ||||
|     private Integer count; | ||||
|     private String manufactory; | ||||
| } | ||||
| @ -0,0 +1,123 @@ | ||||
| <?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.sale.admin.dao.thrsys.ThrInvProductsDao"> | ||||
| 
 | ||||
|     <select id="filterThrInvProductss" parameterType="com.glxp.sale.admin.req.thrsys.FilterThrInvProductsRequest" | ||||
|             resultType="com.glxp.sale.admin.entity.thrsys.ThrInvProductsEntity"> | ||||
|         SELECT * FROM thr_inv_products | ||||
|         <where> | ||||
|             <if test="inventoryCode != '' and inventoryCode != null"> | ||||
|                 AND inventoryCode LIKE concat('%',#{inventoryCode},'%') | ||||
|             </if> | ||||
|             <if test="inventoryName != '' and inventoryName != null"> | ||||
|                 AND inventoryName LIKE concat('%',#{inventoryName},'%') | ||||
|             </if> | ||||
|             <if test="filterCount != '' and filterCount != null and filterCount==1"> | ||||
|                 AND count <![CDATA[ = ]]> 0 | ||||
|             </if> | ||||
|             <if test="filterCount != '' and filterCount != null and filterCount==2"> | ||||
|                 AND count <![CDATA[ > ]]> 0 | ||||
|             </if> | ||||
|             <if test="spec != '' and spec != null"> | ||||
|                 AND spec LIKE concat('%',#{spec},'%') | ||||
|             </if> | ||||
|             <if test="registerCertNo != '' and registerCertNo != null"> | ||||
|                 AND registerCertNo LIKE concat('%',#{registerCertNo},'%') | ||||
|             </if> | ||||
|             <if test="manufactory != '' and manufactory != null"> | ||||
|                 AND manufactory LIKE concat('%',#{manufactory},'%') | ||||
|             </if> | ||||
|             <if test="thirdSysFk != '' and thirdSysFk != null"> | ||||
|                 AND thirdSysFk = #{thirdSysFk} | ||||
|             </if> | ||||
|         </where> | ||||
|         ORDER BY updateTime DESC | ||||
|     </select> | ||||
| 
 | ||||
|     <select id="selectById" parameterType="Map" resultType="com.glxp.sale.admin.entity.thrsys.ThrInvProductsEntity"> | ||||
|          select * FROM thr_inv_products  WHERE id =  #{id} | ||||
|     </select> | ||||
|     <insert id="insertThrInvProduct" keyProperty="id" | ||||
|             parameterType="com.glxp.sale.admin.entity.thrsys.ThrInvProductsEntity"> | ||||
|         replace INTO thr_inv_products | ||||
|         ( | ||||
|         inventoryCode,inventoryName,count,spec, | ||||
|         warehouseName,warehouseCode,registerCertNo,manufacturingDate, | ||||
|         expirationDate,thirdSysFk,batchNo,spaceCode,spaceName,updateTime,manufactory, | ||||
|         productDate, expireDate, productName, productId, standard, registerNo, supId, supName | ||||
|         ) | ||||
|         values | ||||
|             ( | ||||
|             #{inventoryCode},  #{inventoryName},  #{count},  #{spec}, | ||||
|             #{warehouseName},  #{warehouseCode},  #{registerCertNo},  #{manufacturingDate}, | ||||
|             #{expirationDate}, | ||||
|             #{thirdSysFk},#{batchNo},#{spaceCode},#{spaceName},#{updateTime},#{manufactory}, | ||||
|             #{productDate}, #{expireDate}, #{productName}, #{productId}, #{standard}, | ||||
|             #{registerNo}, #{supId}, #{supName} | ||||
|             ) | ||||
|     </insert> | ||||
| 
 | ||||
|     <insert id="insertThrInvProducts" keyProperty="id" parameterType="java.util.List"> | ||||
|         replace INTO thr_inv_products | ||||
|         ( | ||||
|         inventoryCode,inventoryName,count,spec, | ||||
|         warehouseName,warehouseCode,registerCertNo,manufacturingDate, | ||||
|         expirationDate,thirdSysFk,batchNo,spaceCode,spaceName,updateTime,manufactory, | ||||
|         productDate, expireDate, productName, productId, standard, registerNo, supId, supName | ||||
|         ) | ||||
|         values | ||||
| 
 | ||||
|         <foreach collection="thrInvProductsEntities" item="item" index="index" | ||||
|                  separator=","> | ||||
|             ( | ||||
|             #{item.inventoryCode}, #{item.inventoryName}, #{item.count}, #{item.spec}, | ||||
|             #{item.warehouseName}, #{item.warehouseCode}, #{item.registerCertNo}, | ||||
|             #{item.manufacturingDate}, #{item.expirationDate}, | ||||
|             #{item.thirdSysFk},#{item.batchNo},#{item.spaceCode},#{item.spaceName},#{item.updateTime},#{item.manufactory}, | ||||
|             #{item.productDate},#{item.expireDate}, #{item.productName}, #{item.productId}, #{item.standard}, #{item.registerNo}, | ||||
|             #{item.supId}, #{item.supName} | ||||
|             ) | ||||
|         </foreach> | ||||
|     </insert> | ||||
| 
 | ||||
|     <delete id="deleteById" parameterType="Map"> | ||||
|         DELETE FROM thr_inv_products  WHERE id =  #{id} | ||||
|     </delete> | ||||
| 
 | ||||
| 
 | ||||
|     <delete id="deleteAll"> | ||||
|         DELETE FROM thr_inv_products | ||||
|     </delete> | ||||
| 
 | ||||
|     <update id="updateThrInvProducts" parameterType="com.glxp.sale.admin.entity.thrsys.ThrInvProductsEntity"> | ||||
|         UPDATE thr_inv_products | ||||
|         <trim prefix="set" suffixOverrides=","> | ||||
|             <if test="inventoryCode != null">inventoryCode=#{inventoryCode},</if> | ||||
|             <if test="inventoryName != null">inventoryName=#{inventoryName},</if> | ||||
|             <if test="spec != null">spec=#{spec},</if> | ||||
|             <if test="count != null">count=#{count},</if> | ||||
|             <if test="batchNo != null">batchNo=#{batchNo},</if> | ||||
|             <if test="warehouseName != null">warehouseName=#{warehouseName},</if> | ||||
|             <if test="warehouseCode != null">warehouseCode=#{warehouseCode},</if> | ||||
|             <if test="registerCertNo != null">registerCertNo=#{registerCertNo},</if> | ||||
|             <if test="manufacturingDate != null">manufacturingDate=#{manufacturingDate},</if> | ||||
|             <if test="expirationDate != null">expirationDate=#{expirationDate},</if> | ||||
|             <if test="spaceCode != null">spaceCode=#{spaceCode},</if> | ||||
|             <if test="spaceName != null">spaceName=#{spaceName},</if> | ||||
|             <if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if> | ||||
|             <if test="updateTime != null">updateTime=#{updateTime},</if> | ||||
|             <if test="manufactory != null">manufactory=#{manufactory},</if> | ||||
|             <if test="productDate != null">productDate=#{productDate},</if> | ||||
|             <if test="expireDate != null">expireDate=#{expireDate},</if> | ||||
|             <if test="productName != null">productName=#{productName},</if> | ||||
|             <if test="productId != null">productId=#{productId},</if> | ||||
|             <if test="standard != null">standard=#{standard},</if> | ||||
|             <if test="registerNo != null">registerNo=#{registerNo},</if> | ||||
|             <if test="supId != null">supId=#{supId},</if> | ||||
|             <if test="supName != null">supName=#{supName},</if> | ||||
|         </trim> | ||||
|         WHERE id = #{id} | ||||
|     </update> | ||||
| 
 | ||||
| </mapper> | ||||
					Loading…
					
					
				
		Reference in New Issue