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

表信息修改

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