Commit a6125e31 authored by 谢希宇's avatar 谢希宇

Aidea product update by Strive Date 2020-10-23

parent b2cd70ac
......@@ -73,9 +73,9 @@
<!-- general form elements disabled -->
<div class="box box-primary">
<form role="form" id="myForm">
<input name="id" value="$!{data.id}" hidden="true"/>
<div class="box-body">
</div>
<input name="id" value="$!{data.id}" hidden="true"/>
<div class="box-body">
</div>
<div class="box-footer">
#if($shiro.hasPermission("qy:reportForm:edit"))
......@@ -136,7 +136,7 @@
bindEvent();
};
var bindEvent = function () {
$("#myForm").validate({
rules: {},
messages: {},
......
......@@ -75,6 +75,159 @@
<form role="form" id="myForm">
<input name="id" value="$!{data.id}" hidden="true"/>
<div class="box-body">
<div class="panel panel-primary">
<div class="panel-heading">编码信息</div>
<div class="panel-body">
<div class="form-group form-md-line-input col-xs-5">
<label>物流单编码</label>
<input type="text"
class="form-control" id="number" name="number"
maxlength="500" placeholder="物流单编码"
value="$!{data.number}" readonly>
</div>
<div class="form-group form-md-line-input col-xs-5">
<label>顺丰运单号</label>
<input type="text"
class="form-control" id="waybillNo" name="waybillNo"
maxlength="500" placeholder="顺丰运单号"
value="$!{data.waybillNo}" readonly>
</div>
<div class="form-group form-md-line-input col-xs-5">
<label>咨询单编码</label>
<input type="text"
class="form-control" id="consultSheetCode" name="consultSheetCode"
maxlength="500" placeholder="顺丰运单号"
value="$!{data.consultSheetCode}" readonly>
</div>
<div class="form-group form-md-line-input col-xs-5">
<label>订单编码</label>
<input type="text"
class="form-control" id="orderCode" name="consultSheetCode"
maxlength="500" placeholder="订单编码"
value="$!{data.orderCode}" readonly>
</div>
</div>
</div>
<div class="panel panel-primary">
<div class="panel-heading">联系人信息</div>
<div class="panel-body">
<div class="form-group form-md-line-input col-xs-5">
<label>会员名称</label>
<input type="text"
class="form-control" id="memberName" name="memberName"
maxlength="500" placeholder="会员名称"
value="$!{data.memberName}" readonly>
</div>
<div class="form-group form-md-line-input col-xs-5">
<label>联系人</label>
<input type="text"
class="form-control" id="contact" name="contact"
maxlength="500" placeholder="联系人"
value="$!{data.contact}" readonly>
</div>
<div class="form-group form-md-line-input col-xs-5">
<label>联系人手机号</label>
<input type="text"
class="form-control" id="mobile" name="mobile"
maxlength="500" placeholder="联系人手机号"
value="$!{data.mobile}" readonly>
</div>
<div class="form-group form-md-line-input col-xs-5">
<label>省份</label>
<input type="text"
class="form-control" id="province" name="province"
maxlength="500" placeholder="省份"
value="$!{data.province}" readonly>
</div>
<div class="form-group form-md-line-input col-xs-5">
<label>城市</label>
<input type="text"
class="form-control" id="city" name="city"
maxlength="500" placeholder="城市"
value="$!{data.city}" readonly>
</div>
<div class="form-group form-md-line-input col-xs-5">
<label>县/区级行政区名称</label>
<input type="text"
class="form-control" id="county" name="county"
maxlength="500" placeholder="县/区级行政区名称"
value="$!{data.county}" readonly>
</div>
<div class="form-group form-md-line-input col-xs-5">
<label>详细地址</label>
<!--<input type="text"-->
<!--class="form-control" id="address" name="address"-->
<!--maxlength="500" placeholder="详细地址"-->
<!--value="$!{data.address}" readonly>-->
<textarea class="form-control" id="address" name="address" rows="3" readonly>$!{data.address}</textarea>
</div>
</div>
</div>
<div class="panel panel-primary">
<div class="panel-heading">物流信息</div>
<div class="panel-body">
<div class="form-group form-md-line-input col-xs-5">
<label>物流状态</label>
<input type="text"
class="form-control" id="status" name="status"
maxlength="500" placeholder="物流状态"
value="#if( $!{data.status} == '0') 已发货
#elseif($!{data.status} == '1') 待收货
#elseif($!{data.status} == '2') 已完成 #end" readonly>
</div>
<div class="form-group form-md-line-input col-xs-5">
<label>配送温度范围</label>
<input type="text"
class="form-control" id="temperatureRange" name="temperatureRange"
maxlength="500" placeholder="配送温度范围"
value="#if( $!{data.temperatureRange} == '0') 常温
#elseif($!{data.temperatureRange} == '1') 冷藏
#elseif($!{data.temperatureRange} == '3') 冷冻 #end" readonly>
</div>
<div class="form-group form-md-line-input col-xs-5">
<label>订单员名称</label>
<input type="text"
class="form-control" id="storageManageName" name="storageManageName"
maxlength="500" placeholder="订单员名称"
value="$!{data.storageManageName}" readonly>
</div>
<div class="form-group form-md-line-input col-xs-5">
<label>发件时间</label>
<input type="text"
class="form-control" id="sendExpressDate" name="sendExpressDate"
maxlength="500" placeholder="发件时间"
value="$!{data.sendExpressDate}" readonly>
</div>
<div class="form-group form-md-line-input col-xs-5">
<label>收件时间</label>
<input type="text"
class="form-control" id="acceptExpressDate" name="acceptExpressDate"
maxlength="500" placeholder="收件时间"
value="$!{data.acceptExpressDate}" readonly>
</div>
</div>
</div>
</div>
<div class="box-footer">
......
......@@ -77,12 +77,28 @@
<div class="box">
<div class="box-header">
<form id="seachTableForm" action="#springUrl('/a/waybill/list')" method="get">
<div class="col-xs-5">
<div class="col-xs-2">
<input type="text" class="form-control" name="number" placeholder="物流编码">
</div>
<div class="col-xs-2">
<input type="text" class="form-control" name="waybillNo" placeholder="运单号">
</div>
<div class="col-xs-2">
<input type="text" class="form-control" name="orderCode" placeholder="订单编码">
</div>
<div class="col-xs-2">
<input type="text" class="form-control" name="contact" placeholder="联系人">
</div>
<div class="col-xs-3">
<button type="button" class="search btn btn-primary">搜索</button>
#if($shiro.hasPermission("qy:waybill:edit"))
<a href="#springUrl('/a/waybill/form')" class="btn btn-primary">新增</a>
<!--<a href="#springUrl('/a/waybill/form')" class="btn btn-primary">新增</a>-->
<a href="#springUrl('/a/waybill/exportExcel')" class="btn btn-primary">导出</a>
<a onclick="importExcel();" class="btn btn-primary">导入</a>
<!--<a onclick="importExcel();" class="btn btn-primary">导入</a>-->
#end
</div>
</form>
......@@ -95,7 +111,9 @@
<th>物流单编码</th>
<th>顺丰运单号</th>
<th>会员名称</th>
<th>联系人</th>
<th>联系人名称</th>
<th>联系人手机号</th>
<th>物流状态</th>
<th>创建时间</th>
<th>操作</th>
</tr>
......@@ -205,6 +223,12 @@
{
"mData": "contact"
},
{
"mData": "mobile"
},
{
"mData": "status"
},
{
"mData": "createTime"
},
......@@ -217,14 +241,32 @@
'targets': [0]
},
{
"aTargets": [5],
"aTargets": [7],
"mData": "createTime",
"mRender": function (a, b, c, d) {
return '<a href="#springUrl("/a/waybill/form?id=' + c.id + '")" data-id="' + c.id + '" data-action="view">' + formatDates(a, "yyyy-MM-dd HH:mm:ss");
+'</a>';
return formatDates(a, "yyyy-MM-dd HH:mm:ss");
}
},
{
"aTargets": [8],
"mData": "createTime",
"mRender": function (a, b, c, d) {
var html = '#if($shiro.hasPermission("qy:waybill:edit"))';
html += '<div class="btn-group">\n' +
'<button type="button" class="btn btn-success btn-flat">操作</button>\n' +
'<button type="button" class="btn btn-success btn-flat dropdown-toggle" data-toggle="dropdown">\n' +
' <span class="caret"></span>\n' +
' <span class="sr-only">Toggle Dropdown</span>\n' +
'</button>\n' +
'<ul class="dropdown-menu" role="menu">\n';
html += '<li><a href="#springUrl("/a/waybill/form?id=' + a + '")">查看</a></li>';
html += '</ul>';
html += '#end';
return html;
}
}
]
});
......
......@@ -177,6 +177,56 @@
WHERE t.id=#{id}
</select>
<select id="fetchByWayBillId" parameterType="java.lang.Long" resultType="com.cftech.waybill.model.Waybill">
SELECT
t.id,
t.consult_id consultId,
t.order_id orderId,
t.number,
t.member_id memberId,
t.open_id openId,
t.storage_manage storageManage,
t.waybill_no waybillNo,
t.language,
t.monthly_card monthlyCard,
t.express_type_id expressTypeId,
t.temperature_range temperatureRange,
CONVERT( AES_DECRYPT(t.contact, 'aideakey') USING UTF8) contact,
CONVERT( AES_DECRYPT(t.mobile, 'aideakey') USING UTF8) mobile,
CONVERT( AES_DECRYPT(t.province, 'aideakey') USING UTF8) province,
CONVERT( AES_DECRYPT(t.city, 'aideakey') USING UTF8) city,
CONVERT( AES_DECRYPT(t.county, 'aideakey') USING UTF8) county,
CONVERT( AES_DECRYPT(t.address, 'aideakey') USING UTF8) address,
t.address_id addressId,
DATE_FORMAT(t.send_express_date, '%Y-%m-%d %H:%i') sendExpressDate,
DATE_FORMAT(t.accept_express_date, '%Y-%m-%d %H:%i') acceptExpressDate,
t.waybill_remark waybillRemark,
t.accounts_id accountsId,
t.del_flag delFlag,
t.status,
t.create_time createTime,
t.update_time updateTime,
t.description,
t.create_by,
t.update_by,
o.number orderCode,
od.drugs_num drugsNum,
od.drugs_name drugsName,
od.drugs_code drugsCode,
od.price,
AES_DECRYPT(m.name, 'aideakey') memberName,
cs.consult_id consultSheetCode,
qyu.name storageManageName
FROM t_aidea_waybill t
LEFT JOIN t_aidea_consult_sheet cs ON cs.id = t.consult_id
LEFT JOIN t_order o ON t.order_id = o.id
LEFT JOIN t_order_details od ON o.id = od.order_id
LEFT JOIN wx_mp_member m ON t.member_id = m.id
LEFT JOIN user u ON u.id = t.storage_manage
LEFT JOIN t_qyuser qyu ON u.id = u.userid
WHERE t.id=#{id}
</select>
<select id="count" parameterType="java.util.Map" resultType="java.lang.Integer">
SELECT COUNT(1) FROM t_aidea_waybill t
<include refid="sqlWhere"/>
......@@ -203,14 +253,14 @@
CONVERT( AES_DECRYPT(t.county, 'aideakey') USING UTF8) county,
CONVERT( AES_DECRYPT(t.address, 'aideakey') USING UTF8) address,
t.address_id addressId,
t.send_express_date sendExpressDate,
t.accept_express_date acceptExpressDate,
DATE_FORMAT(t.send_express_date, '%Y-%m-%d %H:%i') sendExpressDate,
DATE_FORMAT(t.accept_express_date, '%Y-%m-%d %H:%i') acceptExpressDate,
t.waybill_remark waybillRemark,
t.accounts_id accountsId,
t.del_flag delFlag,
t.status,
t.create_time createTime,
t.update_time updateTime,
DATE_FORMAT(t.create_time, '%Y-%m-%d %H:%i') createTime,
DATE_FORMAT(t.update_time, '%Y-%m-%d %H:%i') updateTime,
t.description,
t.create_by,
t.update_by,
......@@ -219,11 +269,16 @@
od.drugs_name drugsName,
od.drugs_code drugsCode,
od.price,
AES_DECRYPT(m.name, 'aideakey') memberName
AES_DECRYPT(m.name, 'aideakey') memberName,
cs.consult_id consultSheetCode,
qyu.name storageManageName
FROM t_aidea_waybill t
LEFT JOIN t_aidea_consult_sheet cs ON cs.id = t.consult_id
LEFT JOIN t_order o ON t.order_id = o.id
LEFT JOIN t_order_details od ON o.id = od.order_id
LEFT JOIN wx_mp_member m ON t.member_id = m.id
LEFT JOIN user u ON u.id = t.storage_manage
LEFT JOIN t_qyuser qyu ON u.id = u.userid
<include refid="sqlWhere"/>
<if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if>
<if test="limit>0">limit #{offset},#{limit}</if>
......
......@@ -100,16 +100,20 @@ public class Waybill implements Serializable {
/**
* 非数据库字段
*/
private String orderCode;
private String drugsNum;
private String drugsName;
private String drugsCode;
private String price;
private String memberName;
private String orderCode;//订单编码
private String drugsNum;//商品数量
private String drugsName;//商品名称
private String drugsCode;//商品编码
private String price;//价格
private String memberName;//会员名称
private String consultSheetCode;//咨询单编码
private String storageManageName;//仓管员名称
public Waybill() {
this.delFlag = false;
this.status = "0";
this.expressTypeId = "12";
this.temperatureRange = "0";
}
}
\ No newline at end of file
......@@ -11,5 +11,10 @@ import com.cftech.core.generic.GenericService;
*/
public interface WaybillService extends GenericService<Waybill> {
/**
* 查询物流单实体(连查)
* @param id
* @return
*/
Waybill fetchByWayBillId(String id);
}
......@@ -28,4 +28,8 @@ public class WaybillServiceImpl extends GenericServiceImpl<Waybill> implements W
return waybillMapper;
}
@Override
public Waybill fetchByWayBillId(String id) {
return getGenericMapper().fetchByWayBillId(id);
}
}
\ No newline at end of file
......@@ -11,11 +11,11 @@ import com.cftech.core.util.Constants;
import com.cftech.sys.security.PermissionSign;
import com.cftech.sys.security.UserUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
......@@ -63,7 +63,7 @@ public class WaybillController {
@RequestMapping("/form")
public String form(HttpServletRequest request, String id, Model model) {
if (!StringUtils.isEmpty(id)) {
Waybill waybill = waybillService.fetchById(id);
Waybill waybill = waybillService.fetchByWayBillId(id);
model.addAttribute("data", waybill);
}
return "waybill/waybillform";
......@@ -105,6 +105,23 @@ public class WaybillController {
Conds conds = new Conds();
conds.equal("t.del_flag", Constants.DEL_FLAG_0);
conds.equal("t.accounts_id", accountsId);
if (StringUtils.isNoneBlank(waybill.getNumber())) {
conds.equal("t.number", waybill.getNumber());
}
if (StringUtils.isNoneBlank(waybill.getWaybillNo())) {
conds.equal("t.waybill_no", waybill.getWaybillNo());
}
if (StringUtils.isNoneBlank(waybill.getOrderCode())) {
conds.equal("o.number", waybill.getOrderCode());
}
if (StringUtils.isNoneBlank(waybill.getContact())) {
conds.like("t.contact", "%" + waybill.getContact() + "%");
}
Sort sort = new Sort("t.create_time", OrderType.DESC);
List<Waybill> list = waybillService.fetchSearchByPage(conds, sort, iDisplayStart, iDisplayLength);
......@@ -156,7 +173,7 @@ public class WaybillController {
if (file == null) {
return list(request, model);
}
// 构造临时路径来存储上传的文件
// 构造临时路径来存储上传的文件
String uploadPath = System.getProperty("java.io.tmpdir");
File uploadDir = new File(uploadPath);
if (!uploadDir.exists()) {
......
......@@ -47,6 +47,8 @@ quartz.isCluster=false
sf.partnerID=XXYZ
#\u987A\u4E30\u5BA2\u6237\u6821\u9A8C\u7801
sf.checkWord=5Nhuavqk0JG7zTYLtPKq7JpnceuekRcH
#\u987A\u4E30\u6708\u7ED3\u5361\u53F7
sf.monthlyCard=
......
......@@ -79,12 +79,4 @@ public interface GenericService<T> {
*/
int count(Conds conds);
/**
* 根据删除对象
*
* @param id
* @return
*/
boolean delete(Serializable id);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment