From ffc386a33619df27c620f293ed0ec4c3ef17d506 Mon Sep 17 00:00:00 2001
From: 15030600271 <1qaz!QAZ>
Date: 星期五, 24 十一月 2023 20:40:11 +0800
Subject: [PATCH] 20231124_qiuyh_查询搅拌站入库记录
---
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/entity/MinXingPlantVo.java | 15 +++
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/dto/MinXingPlantDto.java | 3
hd/pipe/materialsManage/src/main/resources/mapping/MinXingPlantMapper.xml | 205 +++++++++++++++++++++++---------------------------
3 files changed, 111 insertions(+), 112 deletions(-)
diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/dto/MinXingPlantDto.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/dto/MinXingPlantDto.java
index 05a2dea..965d030 100644
--- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/dto/MinXingPlantDto.java
+++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/dto/MinXingPlantDto.java
@@ -11,9 +11,10 @@
public class MinXingPlantDto {
private String dictId;// 管片原料类型(字典表)
private String companyId;//分公司id
- private String supplierId;//供应商ID
+ private String supplierName;//供应商ID
private String startTime;
private String endTime;
private Integer pageNum;
private Integer pageSize;
+
}
diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/entity/MinXingPlantVo.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/entity/MinXingPlantVo.java
index 145f97a..977222e 100644
--- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/entity/MinXingPlantVo.java
+++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/entity/MinXingPlantVo.java
@@ -27,7 +27,7 @@
private Integer byId;//序号
@Excel(sort = 1,title = "入库时间")
- private String createDate;//字符串的入库时间
+ private Date createDate;//字符串的入库时间
@Excel(sort = 2,title = "供应商")
private String supplierName;//供应商名称
@@ -43,4 +43,17 @@
@Excel(sort = 6,title = "入库人")
private String username;
+
+
+ private String id;
+ private Integer type;
+ private Integer opType;
+ private String materialName;
+ private double materialValue;
+ private double beforeStock;
+ private double afterStock;
+ private String remark;
+ private String pipeId;
+ private String pipeNum;
+
}
diff --git a/hd/pipe/materialsManage/src/main/resources/mapping/MinXingPlantMapper.xml b/hd/pipe/materialsManage/src/main/resources/mapping/MinXingPlantMapper.xml
index 89404d4..d5583e6 100644
--- a/hd/pipe/materialsManage/src/main/resources/mapping/MinXingPlantMapper.xml
+++ b/hd/pipe/materialsManage/src/main/resources/mapping/MinXingPlantMapper.xml
@@ -1,125 +1,110 @@
<?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.thhy.materials.modules.biz.mixingstationstorage.mapper.MinXingPlantMapper">
- <resultMap id="BaseResultMap" type="com.thhy.materials.modules.biz.mixingstationstorage.entity.MinXingPlantVo">
-
- <id column="mixing_plant_id" jdbcType="VARCHAR" property="mixingPlantId" />
- <result column="dict_id" jdbcType="VARCHAR" property="dictId" />
- <result column="stock_type" jdbcType="INTEGER" property="stockType" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
- <result column="change_stock" jdbcType="DOUBLE" property="changeStock" />
- <result column="supplier_id" jdbcType="VARCHAR" property="supplierId" />
- <result column="is_use" jdbcType="INTEGER" property="isUse" />
- <result column="company_id" jdbcType="VARCHAR" property="companyId" />
- <result column="car_name" jdbcType="VARCHAR" property="carName" />
- <result column="pro_id" jdbcType="VARCHAR" property="proId" />
- <result column="create_user" jdbcType="VARCHAR" property="createUser" />
- <result column="by_id" jdbcType="INTEGER" property="byId" />
- </resultMap>
<insert id="insert" >
- insert into t_minxing_plant
+ insert into t_material_stock_record
<trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="mixingPlantId != null">
- mixing_plant_id,
- </if>
- <if test="dictId != null">
- dict_id,
- </if>
- <if test="stockType != null">
- stock_type,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="changeStock != null">
- change_stock,
- </if>
- <if test="supplierId != null">
- supplier_id,
- </if>
- <if test="isUse != null">
- is_use,
- </if>
- <if test="companyId != null">
- company_id,
- </if>
- <if test="carName != null">
- car_name,
- </if>
- <if test="proId != null">
- pro_id,
- </if>
- <if test="createUser != null">
- create_user,
- </if>
- <if test="byId != null">
- by_id,
- </if>
+ <if test="id != null">
+ id,
+ </if>
+ <if test="type != null">
+ type,
+ </if>
+ <if test="opType != null">
+ op_Type,
+ </if>
+ <if test="materialName != null">
+ material_name,
+ </if>
+ <if test="materialValue != null">
+ material_value,
+ </if>
+ <if test="beforeStock != null">
+ before_stock,
+ </if>
+ <if test="afterStock != null">
+ after_stock,
+ </if>
+ <if test="remark != null">
+ remark,
+ </if>
+ <if test="pipeId != null">
+ pipe_id,
+ </if>
+ <if test="pipeNum != null">
+ pipe_num,
+ </if>
+ <if test="createDate != null">
+ create_date,
+ </if>
+ <if test="supplierName != null">
+ supplier_name,
+ </if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="mixingPlantId != null">
- #{mixingPlantId},
- </if>
- <if test="dictId != null">
- #{dictId},
- </if>
- <if test="stockType != null">
- #{stockType},
- </if>
- <if test="createTime != null">
- #{createTime},
- </if>
- <if test="changeStock != null">
- #{changeStock},
- </if>
- <if test="supplierId != null">
- #{supplierId},
- </if>
- <if test="isUse != null">
- #{isUse},
- </if>
- <if test="companyId != null">
- #{companyId},
- </if>
- <if test="carName != null">
- #{carName},
- </if>
- <if test="proId != null">
- #{proId},
- </if>
- <if test="createUser != null">
- #{createUser},
- </if>
- <if test="byId != null">
- #{byId},
- </if>
+ <if test="id != null">
+ #{id},
+ </if>
+ <if test="type != null">
+ #{type},
+ </if>
+ <if test=" != null">
+ #{opType},
+ </if>
+ <if test="materialName != null">
+ #{materialName},
+ </if>
+ <if test="materialValue != null">
+ #{materialValue},
+ </if>
+ <if test="beforeStock != null">
+ #{beforeStock},
+ </if>
+ <if test="afterStock != null">
+ #{afterStock},
+ </if>
+ <if test="remark != null">
+ #{remark},
+ </if>
+ <if test="pipeId != null">
+ #{pipeId},
+ </if>
+ <if test="pipeNum != null">
+ #{pipeNum},
+ </if>
+ <if test="createDate != null">
+ #{createDate},
+ </if>
+ <if test="supplierName != null">
+ #{supplierName},
+ </if>
</trim>
</insert>
<select id="selectAllList" parameterType="com.thhy.materials.modules.biz.mixingstationstorage.dto.MinXingPlantDto" resultType="com.thhy.materials.modules.biz.mixingstationstorage.entity.MinXingPlantVo">
- SELECT
- DATE_FORMAT(a.create_time, '%Y-%m-%d %H:%i:%S') createDate,
- c.supplier_name supplierName,
- b.dict_name dictName,
- a.change_stock changeStock,
- d.real_name username,
- '吨' unit
- FROM t_minxing_plant a
- LEFT JOIN sys_dict b ON b.dict_id = a.dict_id
- LEFT JOIN sys_supplier c ON c.id = a.supplier_id
- LEFT JOIN sys_users d ON d.user_id = a.create_user
- WHERE a.is_use = 1 and company_id = #{companyId}
- <if test="dictId != null and dictId != ''">
- AND a.dict_id = #{dictId}
- </if>
- <if test="supplierId != null and supplierId != ''">
- AND a.supplier_id = #{supplierId}
- </if>
- <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
- AND a.create_time BETWEEN #{startTime} AND #{endTime}
- </if>
- order by a.create_time desc
+ SELECT
+ DATE_FORMAT(a.create_date, '%Y-%m-%d %H:%i:%S') createDate,
+ b.dict_name dictName,
+ a.material_value changeStock,
+ d.real_name username,
+ '吨' unit,
+ a.supplier_name supplierName
+ FROM t_material_stock_record a
+ LEFT JOIN sys_dict b ON b.dict_id = a.material_name
+ LEFT JOIN sys_users d ON d.user_id = a.create_user
+ where
+ a.op_type =1 and a.company_id = #{companyId}
+ <if test="dictId != null and dictId != ''">
+ AND a.material_name = #{dictId}
+ </if>
+ <if test="supplierName != null and supplierName != ''">
+ AND a.supplier_name regexp #{supplierName}
+ </if>
+ <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+ AND a.create_date BETWEEN #{startTime} AND #{endTime}
+ </if>
+ order by a.create_date desc
</select>
<!-- 库存管理 -->
--
Gitblit v1.9.3