配送系统接口修改
添加总金额字段 施工队导入逻辑修改
This commit is contained in:
@@ -8,6 +8,7 @@ spring:
|
||||
master:
|
||||
# url: jdbc:mysql://47.100.212.83:3306/wisdom?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
url: jdbc:mysql://192.168.1.28:3306/wisdomnew?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# url: jdbc:mysql://192.168.1.251:3306/wisdomnew?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# url: jdbc:mysql://192.168.1.28:3306/wisdom?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# url: jdbc:mysql://192.168.1.192:3306/wisdom?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# url: jdbc:mysql://192.168.1.251:3306/wisdom?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
|
||||
@@ -16,7 +16,7 @@ zg:
|
||||
# 开发环境配置
|
||||
server:
|
||||
# 服务器的HTTP端口,默认为8080
|
||||
port: 8086
|
||||
port: 8087
|
||||
servlet:
|
||||
# 应用的访问路径
|
||||
context-path: /
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
AND rb.bill_no = #{billNo}
|
||||
</if>
|
||||
|
||||
<if test="operationType != null and operationType != ''">
|
||||
<if test="operationType != null and operationType.trim() != ''">
|
||||
AND rb.operation_type = #{operationType}
|
||||
</if>
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
<result property="htQty" column="ht_qty"/>
|
||||
<result property="dw" column="dw"/>
|
||||
<result property="realQty" column="real_qty"/>
|
||||
<result property="totalAmount" column="total_amount"/>
|
||||
<result property="pcode" column="pcode"/>
|
||||
<result property="pcodeId" column="pcode_id"/>
|
||||
<result property="trayCode" column="tray_code"/>
|
||||
@@ -72,32 +73,27 @@
|
||||
SELECT
|
||||
ri.*,
|
||||
|
||||
/* 出入库类型名称 */
|
||||
COALESCE(sit.type_name, sot.type_name) AS operation_type_name,
|
||||
/* ===== 新增:计算总金额 ===== */
|
||||
ri.real_qty * ri.ht_dj AS total_amount,
|
||||
|
||||
/* 物资类型名称 */
|
||||
COALESCE(sit.type_name, sot.type_name) AS operation_type_name,
|
||||
mt.type_name AS wl_type_name,
|
||||
|
||||
/* 仓库信息 */
|
||||
wh.warehouse_name,
|
||||
wh.parent_warehouse_code,
|
||||
wh.parent_warehouse_name,
|
||||
|
||||
/* 理货员 */
|
||||
su.nick_name AS operator_name,
|
||||
|
||||
/* 库龄 */
|
||||
DATEDIFF(CURRENT_DATE, ri.operation_time) AS stock_age
|
||||
|
||||
FROM rk_info ri
|
||||
|
||||
LEFT JOIN stock_in_type sit ON ri.operation_type = sit.type_code
|
||||
LEFT JOIN stock_out_type sot ON ri.operation_type = sot.type_code
|
||||
LEFT JOIN material_type mt ON ri.wl_type = mt.type_code
|
||||
LEFT JOIN warehouse_info wh ON ri.cangku = wh.warehouse_code
|
||||
LEFT JOIN sys_user su ON ri.operator = su.user_id
|
||||
</sql>
|
||||
|
||||
<!-- ========================= 查询列表 ========================= -->
|
||||
<select id="selectRkInfoList" parameterType="RkInfo" resultMap="RkInfoResult">
|
||||
<include refid="selectRkInfoVo"/>
|
||||
@@ -181,7 +177,10 @@
|
||||
parameterType="java.util.List"
|
||||
resultMap="RkInfoResult">
|
||||
SELECT
|
||||
ri.*
|
||||
ri.*,
|
||||
|
||||
ri.real_qty * ri.ht_dj AS total_amount
|
||||
|
||||
FROM rk_info ri
|
||||
WHERE ri.id IN
|
||||
<foreach collection="rkInfoIds" item="id" open="(" separator="," close=")">
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
<result property="htQty" column="ht_qty"/>
|
||||
<result property="dw" column="dw"/>
|
||||
<result property="realQty" column="real_qty"/>
|
||||
|
||||
<result property="totalAmount" column="total_amount"/>
|
||||
<result property="pcode" column="pcode"/>
|
||||
<result property="pcodeId" column="pcode_id"/>
|
||||
<result property="trayCode" column="tray_code"/>
|
||||
@@ -89,6 +89,9 @@
|
||||
SELECT
|
||||
rr.*,
|
||||
|
||||
/* ===== 新增:统一计算总金额 ===== */
|
||||
rr.real_qty * rr.ht_dj AS total_amount,
|
||||
|
||||
su.nick_name AS operator_name,
|
||||
mt.type_name AS wl_type_name,
|
||||
COALESCE(sit.type_name, sot.type_name) AS operation_type_name,
|
||||
@@ -96,7 +99,7 @@
|
||||
-- 小仓
|
||||
wh.warehouse_name AS warehouse_name,
|
||||
|
||||
-- ✅ 大仓(直接取小仓行里的父仓字段)
|
||||
-- 大仓
|
||||
wh.parent_warehouse_code AS parent_warehouse_code,
|
||||
wh.parent_warehouse_name AS parent_warehouse_name,
|
||||
|
||||
@@ -723,4 +726,13 @@
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectByBillNo"
|
||||
resultMap="RkRecordResult">
|
||||
SELECT *
|
||||
FROM rk_record
|
||||
WHERE bill_no = #{billNo}
|
||||
AND is_delete = '0'
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user