House urgent to send the item sixth day notes! _ Home Emergency Delivery Project

Source: Internet
Author: User
The sixth day of the House urgent project
I. 5 days before review
1, the project front-end Easyui (why use.) Charges. ), server SSH three broad framework
2, Data layer Genericdao extraction
3, Business layer paging query production as a common component
4, Ajax interactive Flexjson (network Flexjson plug-ins, download from Google)----------now write JSON every time you return
Jsonserializer
Include/exclude
Jsonserializer provides serialize/deepserialize serialization object for JSON
Response.getWriter.print (...)

Defines the return JSON content as a struts2 result set (custom result set)
5, Easyui provides rich CSS, layout Layout, tab menu (embedded iframe, each tab can be refreshed separately), DataGrid data Table (toolbar button, the JSON data and table bundle automatically display data, provide pagination toolbar), Form Check prompt (Validatebox numberbox datebox datetimebox ccmbobox), message hint (alert middle pop-up, show lower right corner), pop-up window (matte effect)

6, Menu tree-shaped menu Ztree
7, POI Excel Parsing (Import Export), Hibernate level two cache (query cache), Lucene Full-text Search

8, JBPM Workflow (immediately mentioned)
====================================================================================
9, Business User management, home emergency delivery (three major modules of the basic settings, access to send business, transit business)
* * Basic set standards, to send staff, regional, zoning, scheduled district scheduling
* * Send business business acceptance, work order generation, working single entry, bulk import, manual scheduling (packaging, return goods, sign ...) )

Second, business acceptance
Customers through the network and telephone contact customer service, customer service record customers delivery request, Generate business notice form
In the process of generating a business notice, automatically matching the set area, matching the relevant staff, if you can match, generate work orders, notify the staff to take the goods, if not match, into manual scheduling

Use the arrival city code to match the region area table and know which city the goods are sent to

Work order Query-----to carry out a tracking or sales list
Because it's been a long time since the dispatch took the goods. The customer issues a request for a chase
Customer does not want to ship, issue a sales order request

Enquiry Work List
1, according to customer telephone-----notice----Work orders
2, according to the customer name----Notice-----work orders
3, according to the date-----pick-up time (processing time + 2 hours) Business Notice-----work orders

Using the DataGrid with the query, incoming queryparams need to be a JS object, how to convert form information to JS object
* * provides FN via jquery to extend the function
$.fn.serializejson=function () {
var serializeobj={};
var array=this.serializearray ();
var str=this.serialize ();
$ (array). each (function () {
if (Serializeobj[this.name]) {
if ($.isarray (Serializeobj[this.name])) {
Serializeobj[this.name].push (This.value);
}else{
Serializeobj[this.name]=[serializeobj[this.name],this.value];
}
}else{
Serializeobj[this.name]=this.value;
}
});
return serializeobj;
};

After the list, the type of work is changed to follow orders, after a single number of +1
Sales list, change the type of work order to sales order

Third, the work single quick entry
Business Acceptance: Customer business is recorded
Work order: Inform the officer to pick up the goods
Work list: Logistics and distribution business officially started

Work Order Entry: is the most human-computer interaction in the system (consignee information, shipper information, cargo information, insurance, packaging, cargo billing, return goods, signature, outbound)

Work Order Quick entry: goods, shipping information
* Operators in the volume of large orders for more than a simple way to quickly enter the work list, the information in the fast input is mainly to meet the loading and setting of the functional interface
* Work list also needs to refine other information

Using technology: Row edits for table
* When clicking TD, embed an input (use JS can do)

Many front-end UI controls that provide row editing for a table (Easyui also provides row editing, ExtJS)
Quick input: Add one line, save operation after input, cancel input in the process, double-click Modify operation

var columns = [[{
Field: ' ID ',
Title: ' Work Number ',
WIDTH:120,
Align: ' center ',
Editor: {
Type: ' Validatebox ',
Options: {
Required:true
}
}
}, {
Field: ' Arrivecity ',
Title: ' Land of arrival ',
WIDTH:120,
Align: ' center ',
Editor: {
Type: ' Validatebox ',
Options: {
Required:true
}
}
},{
Field: ' Product ',
Title: ' Products ',
WIDTH:120,
Align: ' center ',
Editor: {
Type: ' Validatebox ',
Options: {
Required:true
}
}
}, {
field: ' Num ',
Title: ' Number of pieces ',
WIDTH:120,
Align: ' center ',
Editor: {
Type: ' Numberbox ',
Options: {
Required:true
}
}
}, {
Field: ' Weight ',
Title: ' Weight ',
WIDTH:120,
Align: ' center ',
Editor: {
Type: ' Validatebox ',
Options: {
Required:true
}
}
}, {
Field: ' Floadreqr ',
Title: ' Stowage Requirements ',
width:220,
Align: ' center ',
Editor: {
Type: ' Validatebox ',
Options: {
Required:true
}
}
}] ];

1, add a line
Appendrow, InsertRow----for the salesman select Insert, each edit the first line
Specify editor for the columns that can be edited-----represent the column to edit
Open edit BeginEdit incoming index index (make sure you can edit only one line)
Edit Finish Edit EndEdit
Cancel Edit CancelEdit
function Isemptyobject (obj) {
for (var name in obj) {
return false;
}
return true;
}
To determine if the current object is empty, delete the

Design the domain entity class by completing the server code

In Onafteredit Add or modify end-----Use AJAX request, send data to server, complete data add
Add, modify, delete $.post
Query $ ("#grid"). DataGrid (...)

Generate JSON do not want to have updatetime
The first type of jsonserializer.include ("id", "arrivecity", "Product", "num", "Weight", "LOADREQR"). Exclude ("*"); Write only include has no effect (recommended)
The second type of Jsonserializer.exclude ("*.updatetime", "*.class");

2, delete
Only one row of DataGrid has Singleselect
Gets the selected row $ ("#grid") when deleted. DataGrid (' getselected ');

Iv. Input of work list
In the business staff have sufficient time, do not need to use the fast input, can be a quick input before the work of a single complement-------very much like business acceptance
Provide large form, input work order information, submit to the server, judge if work number, before existence, modify the perfect information, if not before, add a work order

Work Order Import:
Bulk Import
Work record import is to provide a fixed format, focus on the table input work order information, through the Import method batch generation system work order information. The system provides the export blank form entry, and according to the function which the fixed format imports, the import data verification method with the work order entry. Mainly applies in the project customer centralized import work list application

Add a new feature each time. Create page JSP, modify menu link in Menu.json

1. Blank Excel template Download
Web-inf download via link outside
Web-inf write Struts2 action to complete the download

When downloading files, it is best not to use the Chinese file name
if (filename==null) {
return null;
}
SYSTEM.OUT.PRINTLN (filename);
Real file name may be Chinese
String Agent = Servletactioncontext.getrequest (). GetHeader ("user-agent");//Browser
if (Agent.contains ("Firefox")) {
Return "=? UTF-8? B? " +new Base64encoder (). Encode (Filename.getbytes ("Utf-8")) + "? =";
}else{
Ie
return Urlencoder.encode (filename, "utf-8");
}

2, write data, complete data upload
Struts2 Upload-------------jquery ocupload
POI resolution

Business Layer Two methods are invoked (transactional propagation problem), each business layer method has the ability to manage the transaction

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.