提交 ed695625 编写于 作者: doc_wei's avatar doc_wei

表信息修改

上级 91174647
......@@ -354,7 +354,7 @@ public abstract class ErpOrderFactory {
if(orderMation != null && !orderMation.isEmpty()){
String status = orderMation.get("status").toString();
if(ErpConstants.ERP_HEADER_STATUS_IS_NOT_APPROVED.equals(status)
|| ErpConstants.ERP_HEADER_STATUS_IS_APPROVED_NOT_PASS.equals(status)){
|| ErpConstants.ERP_HEADER_STATUS_IS_APPROVED_NOT_PASS.equals(status)){
// 未提交审核或者审核拒绝的可以删除
erpCommonDao.deleteOrderParentMationById(orderId, orderType);
// 删除子单据信息
......
......@@ -44,7 +44,7 @@
FROM
erp_depothead a
LEFT JOIN erp_supplier b ON a.organ_id = b.id
LEFT JOIN erp_account c ON a.account_id = c.id
LEFT JOIN ifs_account c ON a.account_id = c.id
LEFT JOIN crm_customer d ON a.organ_id = d.id
<!-- 生产计划单信息 -->
LEFT JOIN erp_production_purchase e ON a.id = e.purchase_order_id
......
......@@ -12,7 +12,7 @@
a.is_default isDefault,
CONVERT (a.create_time, CHAR) createTime
FROM
erp_account a
ifs_account a
LEFT JOIN erp_depothead b ON a.id = b.account_id AND b.sub_type NOT IN(10, 11) AND b.delete_flag = '0'
WHERE
a.delete_flag = 0
......@@ -25,15 +25,15 @@
<if test="remark != '' and remark != null">
AND a.remark LIKE '%${remark}%'
</if>
GROUP BY a.id
ORDER BY a.create_time DESC
GROUP BY a.id
</select>
<select id="queryAccountByName" parameterType="java.util.Map" resultType="java.util.Map">
SELECT
a.id
FROM
erp_account a
ifs_account a
WHERE
a.delete_flag = 0
AND a.name = #{accountName}
......@@ -41,7 +41,7 @@
</select>
<insert id="insertAccount" parameterType="java.util.Map">
INSERT INTO erp_account(
INSERT INTO ifs_account(
id, name, serial_no, initial_amount, current_amount, remark, is_default, delete_flag, create_time
) values (#{id}, #{accountName}, #{serialNo}, #{initialAmount}, #{currentAmount}, #{remark}, #{isDefault}, #{deleteFlag}, #{createTime})
</insert>
......@@ -57,7 +57,7 @@
a.is_default isDefault,
CONVERT (a.create_time, CHAR) createTime
FROM
erp_account a
ifs_account a
WHERE
a.delete_flag = 0
AND a.id = #{id}
......@@ -65,7 +65,7 @@
</select>
<update id="editAccountByDeleteFlag" parameterType="java.util.Map">
UPDATE erp_account
UPDATE ifs_account
<set>
delete_flag = #{deleteFlag}
</set>
......@@ -77,7 +77,7 @@
SELECT
a.id
FROM
erp_account a
ifs_account a
WHERE
a.delete_flag = 0
AND a.id != #{id}
......@@ -86,7 +86,7 @@
</select>
<update id="editAccountById" parameterType="java.util.Map">
UPDATE erp_account
UPDATE ifs_account
<set>
name = #{accountName},
serial_no = #{serialNo},
......@@ -103,7 +103,7 @@
SELECT
a.id
FROM
erp_account a
ifs_account a
WHERE
a.delete_flag = 0
AND a.is_default = 1
......@@ -112,14 +112,14 @@
</select>
<update id="editAccountByIsNotDefault" parameterType="java.util.Map">
UPDATE erp_account
UPDATE ifs_account
<set>
is_default = #{isDefault}
</set>
</update>
<update id="editAccountByIdAndIsDefault" parameterType="java.util.Map">
UPDATE erp_account
UPDATE ifs_account
<set>
is_default = #{isDefault}
</set>
......@@ -138,7 +138,7 @@
a.is_default isDefault,
CONVERT (a.create_time, CHAR) createTime
FROM
erp_account a
ifs_account a
WHERE
a.delete_flag = 0
AND a.id = #{id}
......@@ -177,7 +177,7 @@
a.id,
a.`name`
FROM
erp_account a
ifs_account a
WHERE
a.delete_flag = '0'
ORDER BY a.is_default ASC
......
......@@ -14,7 +14,7 @@
s.supplier supplierName,
d.`name` customerName
FROM
erp_accounthead a
ifs_order_head a
LEFT JOIN erp_supplier s ON a.organ_id = s.id
LEFT JOIN crm_customer d ON a.organ_id = d.id
WHERE a.delete_flag = '0'
......@@ -29,14 +29,14 @@
</select>
<insert id="insertIfsOrderMation" parameterType="java.util.Map">
INSERT INTO erp_accounthead
INSERT INTO ifs_order_head
(id, type, organ_id, hands_person_id, change_amount, total_price, account_id, bill_no, bill_time, remark, delete_flag)
VALUES
(#{id}, #{type}, #{organId}, #{handsPersonId}, #{changeAmount}, #{totalPrice}, #{accountId}, #{billNo}, #{operTime}, #{remark}, #{deleteFlag})
</insert>
<insert id="insertIfsOrderItemMation" parameterType="java.util.Map">
INSERT INTO erp_accountitem
INSERT INTO ifs_order_item
(id, header_id, in_out_item_id, each_amount, remark, delete_flag)
VALUES
<foreach collection="list" item="item" index="index" separator="," >
......@@ -59,7 +59,7 @@
s.supplier supplierName,
b.`name` customName
FROM
erp_accounthead a
ifs_order_head a
LEFT JOIN erp_supplier s ON a.organ_id = s.id
LEFT JOIN crm_customer b ON a.organ_id = b.id
WHERE
......@@ -75,13 +75,13 @@
CONVERT(a.each_amount , decimal(24, 2)) initemMoney,
a.remark
FROM
erp_accountitem a
ifs_order_item a
WHERE
a.header_id = #{orderId}
</select>
<update id="editIfsOrderMation" parameterType="java.util.Map">
UPDATE erp_accounthead
UPDATE ifs_order_head
<set>
organ_id = #{organId},
hands_person_id = #{handsPersonId},
......@@ -98,7 +98,7 @@
<delete id="deleteIfsOrderMationById">
DELETE
FROM
erp_accounthead
ifs_order_head
WHERE
id = #{orderId}
</delete>
......@@ -106,7 +106,7 @@
<delete id="deleteIfsOrderItemMationByOrderId">
DELETE
FROM
erp_accountitem
ifs_order_item
WHERE
header_id = #{orderId}
</delete>
......@@ -124,10 +124,10 @@
group_concat(distinct b.user_name) hansPersonName,
t.`name` accountName
FROM
erp_accounthead a
ifs_order_head a
LEFT JOIN erp_supplier s ON a.organ_id = s.id
LEFT JOIN crm_customer d ON a.organ_id = d.id
LEFT JOIN erp_account t ON a.account_id = t.id
LEFT JOIN ifs_account t ON a.account_id = t.id
LEFT JOIN sys_eve_user_staff b ON INSTR(CONCAT(',', a.hands_person_id, ','), CONCAT(',', b.user_id, ','))
WHERE
a.delete_flag = '0'
......@@ -142,7 +142,7 @@
a.remark,
c.`name` inoutitemName
FROM
erp_accountitem a
ifs_order_item a
LEFT JOIN erp_inoutitem c ON a.in_out_item_id = c.id
WHERE
a.header_id = #{orderId}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册