"INSERT INTO inv_count_print_line(id,create_by,create_time,update_by,update_time,sys_org_code,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,print_id,source_type,source_header_id,source_header_number,source_line_id,source_line_number,compare,logic,comparison_values,fields) VALUES"+
"INSERT INTO inv_count_print_line(id,create_by,create_time,update_by,update_time,sys_org_code,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,print_id,source_type,source_header_id,source_header_number,source_line_id,source_line_number,compare,logic,comparison_values,fields) VALUES"+
"INSERT INTO inv_count_print(id,sys_org_code,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,org_id,attribute9,attribute10,print_type,print_number,print_name,print_inv_id,print_date,remark,source_type,source_header_id,source_header_number,source_line_id,source_line_number,create_by,create_time,update_by,update_time) VALUES"+
"INSERT INTO inv_count_print(id,sys_org_code,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,org_id,attribute9,attribute10,print_type,print_number,print_name,print_inv_id,print_date,remark,source_type,source_header_id,source_header_number,source_line_id,source_line_number,create_by,create_time,update_by,update_time) VALUES"+
@@ -41,16 +69,16 @@ public interface InvItemBalanceSummaryVMapper{
...
@@ -41,16 +69,16 @@ public interface InvItemBalanceSummaryVMapper{
publicList<InvItemBalanceSummaryV>select();
publicList<InvItemBalanceSummaryV>select();
@Insert("<script>"+
@Insert("<script>"+
"INSERT INTO inv_item_balance_summary_v(inv_id,subinv_id,locator_id,item_id,balance,inv_code,inv_name,subinv_code,subinv_name,locator_code,locator_name,item_code,scancode,purchase_price,item_name,item_desc,max_inv_qty,min_inv_qty,specification,unit_code,unit_name) VALUES"+
"INSERT INTO inv_item_balance_summary_v(inv_id,subinv_id,locator_id,item_id,balance,inv_code,inv_name,subinv_code,subinv_name,locator_code,locator_name,attribute1,attribute2,attribute3,attribute4,attribute5,pystype,media,isbn,plucode,extcode,general_name,cip,manufacturer_id,image_url,pack_qty,pack_unit,tax,isset,org_id,create_by,create_time,update_by,update_time,pro_type,is_borrow,rfid,language,marketing_status,item_code,scancode,purchase_price,item_name,item_desc,max_inv_qty,min_inv_qty,specification,unit_code,unit_name) VALUES"+
"INSERT INTO inv_item_balance_summary_v(inv_id,subinv_id,locator_id,item_id,balance,inv_code,inv_name,subinv_code,subinv_name,locator_code,locator_name,item_code,scancode,purchase_price,item_name,item_desc,max_inv_qty,min_inv_qty,specification,unit_code,unit_name) VALUES"+
"INSERT INTO inv_item_balance_summary_v(inv_id,subinv_id,locator_id,item_id,balance,inv_code,inv_name,subinv_code,subinv_name,locator_code,locator_name,attribute1,attribute2,attribute3,attribute4,attribute5,pystype,media,isbn,plucode,extcode,general_name,cip,manufacturer_id,image_url,pack_qty,pack_unit,tax,isset,org_id,create_by,create_time,update_by,update_time,pro_type,is_borrow,rfid,language,marketing_status,item_code,scancode,purchase_price,item_name,item_desc,max_inv_qty,min_inv_qty,specification,unit_code,unit_name) VALUES"+
@Select("SELECT * FROM inv_item_balance_summary_v WHERE attribute2 = 'A'")
@ResultMap("invitembalancesummaryv")
List<InvItemBalanceSummaryV>findByAttribute2();
@Select("SELECT * FROM inv_item_balance_summary_v WHERE inv_code LIKE '%${request}%' OR inv_name LIKE '%${request}%' OR subinv_code LIKE '%${request}%' OR subinv_name LIKE '%${request}%' OR locator_code LIKE '%${request}%' OR locator_name LIKE '%${request}%' OR plucode LIKE '%${request}%' OR scancode LIKE '%${request}%' OR rfid LIKE '%${request}%' OR item_code LIKE '%${request}%' OR item_name LIKE '%${request}%'")
//@Select("SELECT * FROM inv_item_balance_summary_v WHERE inv_id = #{inv_id} and subinv_id = #{subinv_id} and locator_id = #{locator_id} and item_id = #{item_id}")
@Select({"<script>",
"SELECT * FROM inv_item_balance_summary_v WHERE 1=1 "+
"<if test = 'inv_id != null'>and inv_id = #{inv_id}</if>"+
"<if test = 'subinv_id != null'>and subinv_id = #{subinv_id}</if>"+
"<if test = 'locator_id != null'>and locator_id = #{locator_id}</if>"+
"<if test = 'item_id != null'>and item_id = #{item_id}</if>",
"INSERT INTO inv_locator(id,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,inv_id,subinv_id,locator_code,locator_name,locator_desc,status,create_by,create_time,update_by,update_time) VALUES"+
"INSERT INTO inv_locator(id,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,inv_id,subinv_id,locator_code,locator_name,locator_desc,status,create_by,create_time,update_by,update_time) VALUES"+
"INSERT INTO inv_subinventory(id,create_by,create_date,update_by,update_time,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,inv_id,subinv_type,subinv_code,subinv_name,subinv_desc,locator_control,status) VALUES"+
"INSERT INTO inv_subinventory(id,create_by,create_date,update_by,update_time,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,inv_id,subinv_type,subinv_code,subinv_name,subinv_desc,locator_control,status) VALUES"+
@@ -69,7 +75,7 @@ public interface SalOrderLineVMapper{
...
@@ -69,7 +75,7 @@ public interface SalOrderLineVMapper{
+" AND line_status = #{salLineStatus}"
+" AND line_status = #{salLineStatus}"
+"</if>"
+"</if>"
+"<if test = 'salHeaderId != null and salHeaderId != \"\"'>"
+"<if test = 'salHeaderId != null and salHeaderId != \"\"'>"
+" AND sal_order_header_id = #{salHeaderId}"
+" AND order_header_id = #{salHeaderId}"
+"</if>"
+"</if>"
+"</script>")
+"</script>")
@ResultMap("salorderlinev")
@ResultMap("salorderlinev")
...
@@ -99,16 +105,20 @@ public interface SalOrderLineVMapper{
...
@@ -99,16 +105,20 @@ public interface SalOrderLineVMapper{
@Insert("<script>"+
@Insert("<script>"+
"INSERT INTO sal_order_line_v(org_code,org_name,item_code,item_name,shippable_quantity,line_status_name,source_type_name,id,create_by,update_by,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,org_id,sal_order_header_id,line_number,item_id,quantity,unit_code,list_price,sale_price,tax_rate,required_date,line_remark,source_type,source_header_id,source_line_id,line_status,shipping_date,sys_org_code,source_line_number,create_time,pricing_date,update_time,source_header_number) VALUES"+
"INSERT INTO sal_order_line_v(org_code,org_name,item_type,plucode,inv_id,line_status_name,source_type_name,id,create_by,update_by,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,org_id,sal_order_header_id,line_number,item_name,item_id,quantity,unit_code,list_price,sale_price,tax_rate,required_date,line_remark,source_type,source_header_id,source_line_id,line_status,shipping_date,sys_org_code,source_line_number,create_time,pricing_date,update_time,order_header_id,source_header_number,order_number,order_date,seller_id) VALUES"+
"INSERT INTO sal_order_line_v(org_code,org_name,item_code,item_name,shippable_quantity,line_status_name,source_type_name,id,create_by,update_by,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,org_id,sal_order_header_id,line_number,item_id,quantity,unit_code,list_price,sale_price,tax_rate,required_date,line_remark,source_type,source_header_id,source_line_id,line_status,shipping_date,sys_org_code,source_line_number,create_time,pricing_date,update_time,source_header_number) VALUES"+
"INSERT INTO sal_order_line_v(org_code,org_name,item_type,plucode,inv_id,line_status_name,source_type_name,id,create_by,update_by,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,org_id,sal_order_header_id,line_number,item_name,item_id,quantity,unit_code,list_price,sale_price,tax_rate,required_date,line_remark,source_type,source_header_id,source_line_id,line_status,shipping_date,sys_org_code,source_line_number,create_time,pricing_date,update_time,order_header_id,source_header_number,order_number,order_date,seller_id) VALUES"+
"INSERT INTO temp_item_fom_pmp(id,plucode,pystype,isbn,scancode,title,jp,price,clscode,clsname,publisher,pubname,pubdate,dptcode,dptname,series,author,reader,fstdate,fstdisc,lstdisc,maxdisc,mindisc,vendor,transtitle,inctax,originprice,currency,status) VALUES"+
"INSERT INTO temp_item_fom_pmp(id,plucode,pystype,isbn,scancode,title,jp,price,clscode,clsname,publisher,pubname,pubdate,dptcode,dptname,series,author,reader,fstdate,fstdisc,lstdisc,maxdisc,mindisc,vendor,transtitle,inctax,originprice,currency,status) VALUES"+