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

Aidea product update by Strive Date 2020-12-25

parent ec42bb1e
...@@ -847,7 +847,7 @@ ...@@ -847,7 +847,7 @@
var openid = `$!{data.openId}`; var openid = `$!{data.openId}`;
$("#history").click(function () { $("#history").click(function () {
Cfapp.f7({ Cfapp.f7({
dataUrl: "#springUrl('/a/consultSheet/listData?openId="+openid+"')", dataUrl: "#springUrl('/a/consultSheet/listData?openId="+openid+"&status=')",
checkType: "single", // 多选为multi checkType: "single", // 多选为multi
title: '查看历史咨询单', title: '查看历史咨询单',
btnoktext: "确定", btnoktext: "确定",
...@@ -861,11 +861,34 @@ ...@@ -861,11 +861,34 @@
}, { }, {
"mData": "orderCode" "mData": "orderCode"
}, { }, {
"mData": "userName" "mData": "userName",
"mRender": function (a, b, c, d) {
if (a) {
return a.slice(0, 1) + '*' + a.slice(2, a.length);
} else {
return null;
}
}
}, { }, {
"mData": "phone" "mData": "phone",
"mRender": function (a, b, c, d) {
if (a) {
return a.slice(0, 3) + '****' + a.slice(7);
} else {
return null;
}
}
}, { }, {
"mData": "status" "mData": "status",
"mRender": function (a, b, c, d) {
if (a == 0) {
return "待审核";
} else if (a == 1) {
return "已通过";
} else if (a == 2) {
return "已拒绝";
}
}
}, { }, {
"mData": "description" "mData": "description"
}, { }, {
...@@ -893,7 +916,7 @@ ...@@ -893,7 +916,7 @@
} }
},{ },{
"aTargets": [6], "aTargets": [6],
"mData": "createTime", "mData": "auditTime",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
if (a) { if (a) {
return formatDates(a); return formatDates(a);
......
...@@ -164,6 +164,7 @@ ...@@ -164,6 +164,7 @@
<th>用药人姓名</th> <th>用药人姓名</th>
<th>性别</th> <th>性别</th>
<th>联系电话</th> <th>联系电话</th>
<th>三期患者</th>
<th>药师姓名</th> <th>药师姓名</th>
<th>客服姓名</th> <th>客服姓名</th>
<th>审核状态</th> <th>审核状态</th>
...@@ -266,6 +267,9 @@ ...@@ -266,6 +267,9 @@
"sAjaxSource": sSource, "sAjaxSource": sSource,
"fnServerData": retrieveData, "fnServerData": retrieveData,
"pagingType": "full_numbers", "pagingType": "full_numbers",
"autowidth": true,
"scrollX": true,
"sScrollY":"480px",
"aoColumns": [ "aoColumns": [
{ {
"mData": "id" "mData": "id"
...@@ -285,6 +289,9 @@ ...@@ -285,6 +289,9 @@
{ {
"mData": "phone" "mData": "phone"
}, },
{
"mData": "isThree"
},
{ {
"mData": "pharmaName" "mData": "pharmaName"
}, },
...@@ -377,6 +384,18 @@ ...@@ -377,6 +384,18 @@
}, },
{ {
"aTargets": [6], "aTargets": [6],
"mData": "isThree",
"mRender": function (a, b, c, d) {
if (a == '1') {
return '是';
} else if (a == '0') {
return '否';
}
}
},
{
"aTargets": [7],
"mData": "pharmaName", "mData": "pharmaName",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
if (a) { if (a) {
...@@ -387,7 +406,7 @@ ...@@ -387,7 +406,7 @@
} }
}, },
{ {
"aTargets": [7], "aTargets": [8],
"mData": "customerName", "mData": "customerName",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
if (a) { if (a) {
...@@ -398,7 +417,7 @@ ...@@ -398,7 +417,7 @@
} }
}, },
{ {
"aTargets": [8], "aTargets": [9],
"mData": "status", "mData": "status",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
if (a == 0) { if (a == 0) {
...@@ -411,7 +430,7 @@ ...@@ -411,7 +430,7 @@
} }
}, },
{ {
"aTargets": [9], "aTargets": [10],
"mData": "description", "mData": "description",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
if (a) { if (a) {
...@@ -422,7 +441,7 @@ ...@@ -422,7 +441,7 @@
} }
}, },
{ {
"aTargets": [10], "aTargets": [11],
"mData": "createTime", "mData": "createTime",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
if (a) { if (a) {
...@@ -433,7 +452,7 @@ ...@@ -433,7 +452,7 @@
} }
}, },
{ {
"aTargets": [11], "aTargets": [12],
"mData": "auditTime", "mData": "auditTime",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
if (a) { if (a) {
...@@ -444,7 +463,7 @@ ...@@ -444,7 +463,7 @@
} }
}, },
{ {
"aTargets": [12], "aTargets": [13],
"mData": "id", "mData": "id",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
let html = ''; let html = '';
......
...@@ -204,19 +204,23 @@ ...@@ -204,19 +204,23 @@
<select id="fetchSearchByCount" parameterType="java.util.Map" resultType="java.lang.Integer"> <select id="fetchSearchByCount" parameterType="java.util.Map" resultType="java.lang.Integer">
SELECT COUNT(1) FROM t_aidea_consult_sheet a SELECT COUNT(1) FROM t_aidea_consult_sheet a
LEFT JOIN t_order o ON a.order_id = o.id LEFT JOIN t_order o ON a.order_id = o.id
LEFT JOIN t_qyuser b ON b.id = a.doctor_id LEFT JOIN t_qyuser b ON b.id = a.doctor_id AND b.del_flag = '0'
LEFT JOIN t_qyuser c ON c.id = a.service_id LEFT JOIN t_qyuser c ON c.id = a.service_id AND c.del_flag = '0'
LEFT JOIN wx_mp_member m ON m.open_id = a.open_id AND m.del_flag = '0'
LEFT JOIN t_aidea_authentication au ON m.cardid = au.id_card AND au.del_flag = '0'
<include refid="sqlWhere"/> <include refid="sqlWhere"/>
<if test="id!=null">and (a.doctor_id = ${id} or a.service_id =${id} )</if> <if test="id!=null">and (a.doctor_id = ${id} or a.service_id =${id} )</if>
</select> </select>
<select id="fetchSearchByPage" parameterType="java.util.Map" resultType="com.cftech.consultsheet.model.ConsultSheet"> <select id="fetchSearchByPage" parameterType="java.util.Map" resultType="com.cftech.consultsheet.model.ConsultSheet">
SELECT SELECT
<include refid="sqlColumns"/>, o.number orderCode <include refid="sqlColumns"/>, o.number orderCode, CASE WHEN au.name IS NOT NULL THEN 1 ELSE 0 END isThree
FROM t_aidea_consult_sheet a FROM t_aidea_consult_sheet a
LEFT JOIN t_order o ON a.order_id = o.id LEFT JOIN t_order o ON a.order_id = o.id
LEFT JOIN t_qyuser b ON b.id = a.doctor_id LEFT JOIN t_qyuser b ON b.id = a.doctor_id AND b.del_flag = '0'
LEFT JOIN t_qyuser c ON c.id = a.service_id LEFT JOIN t_qyuser c ON c.id = a.service_id AND c.del_flag = '0'
LEFT JOIN wx_mp_member m ON m.open_id = a.open_id AND m.del_flag = '0'
LEFT JOIN t_aidea_authentication au ON m.cardid = au.id_card AND au.del_flag = '0'
<include refid="sqlWhere"/> <include refid="sqlWhere"/>
<if test="id!=null">AND (a.doctor_id = ${id} or a.service_id =${id})</if> <if test="id!=null">AND (a.doctor_id = ${id} or a.service_id =${id})</if>
<if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if> <if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if>
......
...@@ -93,6 +93,7 @@ public class ConsultSheet extends UserSheet implements Serializable { ...@@ -93,6 +93,7 @@ public class ConsultSheet extends UserSheet implements Serializable {
private String pharmacist;//处方医生 private String pharmacist;//处方医生
private String fansAlias;//粉丝别名 private String fansAlias;//粉丝别名
private String nickName;//昵称 private String nickName;//昵称
private String isThree;//是否三期患者
public ConsultSheet() { public ConsultSheet() {
this.delFlag = false; this.delFlag = false;
......
...@@ -33,16 +33,16 @@ public class ConsultSheetVO { ...@@ -33,16 +33,16 @@ public class ConsultSheetVO {
private String phone; private String phone;
/* 疾病史 */ /* 疾病史 */
@ExportConfig(value = "有无不良反应", width = 100, showLevel = 1) @ExportConfig(value = "三期用户", width = 100, showLevel = 1)
private String pastRecords; private String isThree;
/* 病情描述 */ // /* 病情描述 */
@ExportConfig(value = "是否服用过该药且无禁忌症", width = 100, showLevel = 1) // @ExportConfig(value = "是否服用过该药且无禁忌症", width = 100, showLevel = 1)
private String illness; // private String illness;
//
/* 过敏史 */ // /* 过敏史 */
@ExportConfig(value = "有无过敏反应", width = 100, showLevel = 1) // @ExportConfig(value = "有无过敏反应", width = 100, showLevel = 1)
private String allergy; // private String allergy;
/* 状态 */ /* 状态 */
@ExportConfig(value = "是否审核", width = 100, showLevel = 1) @ExportConfig(value = "是否审核", width = 100, showLevel = 1)
......
...@@ -274,16 +274,17 @@ public class ConsultSheetController { ...@@ -274,16 +274,17 @@ public class ConsultSheetController {
List<ConsultSheet> list = consultSheetService.fetchSearchByPage(conds, sort, 0, 0); List<ConsultSheet> list = consultSheetService.fetchSearchByPage(conds, sort, 0, 0);
List<ConsultSheetVO> consultSheetVOS = new LinkedList<>(); List<ConsultSheetVO> consultSheetVOS = new LinkedList<>();
ConsultSheetVO consultSheetVO = null; ConsultSheetVO consultSheetVO = null;
StringBuffer tpl = new StringBuffer();
for (ConsultSheet consultSheetObj : list) { for (ConsultSheet consultSheetObj : list) {
consultSheetVO = new ConsultSheetVO(); consultSheetVO = new ConsultSheetVO();
consultSheetVO.setOrderCode(consultSheetObj.getOrderCode()); consultSheetVO.setOrderCode(consultSheetObj.getOrderCode());
consultSheetVO.setConsultId(consultSheetObj.getConsultId()); consultSheetVO.setConsultId(consultSheetObj.getConsultId());
consultSheetVO.setUserName(consultSheetObj.getUserName()); consultSheetVO.setUserName(tpl.append(consultSheetObj.getUserName()).replace(1,2, "*").toString());
tpl.setLength(0);
consultSheetVO.setSex(consultSheetObj.getSex() == 1 ? "男" : "女"); consultSheetVO.setSex(consultSheetObj.getSex() == 1 ? "男" : "女");
consultSheetVO.setPhone(consultSheetObj.getPhone()); consultSheetVO.setPhone( tpl.append(consultSheetObj.getPhone()).replace(3,7, "****").toString());
consultSheetVO.setPastRecords("0".equals(consultSheetObj.getPastRecords()) ? "否" : "是"); tpl.setLength(0);
consultSheetVO.setIllness("0".equals(consultSheetObj.getIllness()) ? "否" : "是"); consultSheetVO.setIsThree(consultSheetObj.getIsThree().equals("1")? "是":"否");
consultSheetVO.setAllergy("0".equals(consultSheetObj.getAllergy()) ? "否" : "是");
consultSheetVO.setStatus("0".equals(consultSheetObj.getStatus()) ? "未审核" : "1".equals(consultSheetObj.getStatus()) ? "已通过" : "已拒绝"); consultSheetVO.setStatus("0".equals(consultSheetObj.getStatus()) ? "未审核" : "1".equals(consultSheetObj.getStatus()) ? "已通过" : "已拒绝");
consultSheetVO.setPharmaName(consultSheetObj.getPharmaName()); consultSheetVO.setPharmaName(consultSheetObj.getPharmaName());
consultSheetVO.setCustomerName(consultSheetObj.getCustomerName()); consultSheetVO.setCustomerName(consultSheetObj.getCustomerName());
......
...@@ -204,19 +204,23 @@ ...@@ -204,19 +204,23 @@
<select id="fetchSearchByCount" parameterType="java.util.Map" resultType="java.lang.Integer"> <select id="fetchSearchByCount" parameterType="java.util.Map" resultType="java.lang.Integer">
SELECT COUNT(1) FROM t_aidea_consult_sheet a SELECT COUNT(1) FROM t_aidea_consult_sheet a
LEFT JOIN t_order o ON a.order_id = o.id LEFT JOIN t_order o ON a.order_id = o.id
LEFT JOIN t_qyuser b ON b.id = a.doctor_id LEFT JOIN t_qyuser b ON b.id = a.doctor_id AND b.del_flag = '0'
LEFT JOIN t_qyuser c ON c.id = a.service_id LEFT JOIN t_qyuser c ON c.id = a.service_id AND c.del_flag = '0'
LEFT JOIN wx_mp_member m ON m.open_id = a.open_id AND m.del_flag = '0'
LEFT JOIN t_aidea_authentication au ON m.cardid = au.id_card AND au.del_flag = '0'
<include refid="sqlWhere"/> <include refid="sqlWhere"/>
<if test="id!=null">and (a.doctor_id = ${id} or a.service_id =${id} )</if> <if test="id!=null">and (a.doctor_id = ${id} or a.service_id =${id} )</if>
</select> </select>
<select id="fetchSearchByPage" parameterType="java.util.Map" resultType="com.cftech.consultsheet.model.ConsultSheet"> <select id="fetchSearchByPage" parameterType="java.util.Map" resultType="com.cftech.consultsheet.model.ConsultSheet">
SELECT SELECT
<include refid="sqlColumns"/>, o.number orderCode <include refid="sqlColumns"/>, o.number orderCode, CASE WHEN au.name IS NOT NULL THEN 1 ELSE 0 END isThree
FROM t_aidea_consult_sheet a FROM t_aidea_consult_sheet a
LEFT JOIN t_order o ON a.order_id = o.id LEFT JOIN t_order o ON a.order_id = o.id
LEFT JOIN t_qyuser b ON b.id = a.doctor_id LEFT JOIN t_qyuser b ON b.id = a.doctor_id AND b.del_flag = '0'
LEFT JOIN t_qyuser c ON c.id = a.service_id LEFT JOIN t_qyuser c ON c.id = a.service_id AND c.del_flag = '0'
LEFT JOIN wx_mp_member m ON m.open_id = a.open_id AND m.del_flag = '0'
LEFT JOIN t_aidea_authentication au ON m.cardid = au.id_card AND au.del_flag = '0'
<include refid="sqlWhere"/> <include refid="sqlWhere"/>
<if test="id!=null">AND (a.doctor_id = ${id} or a.service_id =${id})</if> <if test="id!=null">AND (a.doctor_id = ${id} or a.service_id =${id})</if>
<if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if> <if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if>
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
<form role="form" id="myForm"> <form role="form" id="myForm">
<input name="id" value="$!{data.id}" hidden="true"/> <input name="id" value="$!{data.id}" hidden="true"/>
<div class="box-body"> <div class="box-body">
</div>
<div class="form-group form-md-line-input col-md-12"> <div class="form-group form-md-line-input col-md-12">
<label>开票编码</label> <label>开票编码</label>
...@@ -197,7 +197,7 @@ ...@@ -197,7 +197,7 @@
> >
</div> </div>
</div>
<div class="box-footer"> <div class="box-footer">
<a href="#springUrl('/a/invoice/list')" class="btn btn-default">取消</a> <a href="#springUrl('/a/invoice/list')" class="btn btn-default">取消</a>
......
...@@ -203,6 +203,9 @@ ...@@ -203,6 +203,9 @@
"sAjaxSource": sSource, "sAjaxSource": sSource,
"fnServerData": retrieveData, "fnServerData": retrieveData,
"pagingType": "full_numbers", "pagingType": "full_numbers",
"autowidth": true,
"scrollX": true,
"sScrollY":"480px",
"aoColumns": [ "aoColumns": [
{ {
"mData": "id" "mData": "id"
......
...@@ -131,7 +131,7 @@ public class InvoiceServiceImpl extends GenericServiceImpl<Invoice> implements I ...@@ -131,7 +131,7 @@ public class InvoiceServiceImpl extends GenericServiceImpl<Invoice> implements I
JSONObject invoiceObj = arr.getJSONObject(i); JSONObject invoiceObj = arr.getJSONObject(i);
if (invoice.getInvoiceSerialNum().equals(invoiceObj.getString("serialNo")) && invoiceObj.getString("status").equals("2")) { if (invoice.getInvoiceSerialNum().equals(invoiceObj.getString("serialNo")) && invoiceObj.getString("status").equals("2")) {
invoice.setInvoiceCode(invoiceObj.getString("invoiceCode")); invoice.setInvoiceCode(invoiceObj.getString("invoiceCode"));
invoice.setInvoiceNum(invoiceObj.getString("invoiceNum")); invoice.setInvoiceNum(invoiceObj.getString("invoiceNo"));
invoice.setDescription(result); invoice.setDescription(result);
invoiceMapper.update(invoice); invoiceMapper.update(invoice);
} else if (invoice.getInvoiceSerialNum().equals(invoiceObj.getString("serialNo")) && !invoiceObj.getString("status").equals("2")) { } else if (invoice.getInvoiceSerialNum().equals(invoiceObj.getString("serialNo")) && !invoiceObj.getString("status").equals("2")) {
......
...@@ -41,6 +41,8 @@ ...@@ -41,6 +41,8 @@
<link rel="stylesheet" href="plugins/jquery-validation/css/validate.css"> <link rel="stylesheet" href="plugins/jquery-validation/css/validate.css">
<!--fileinput css--> <!--fileinput css-->
<link rel="stylesheet" href="plugins/bootstrap-fileinput/bootstrap-fileinput.css"> <link rel="stylesheet" href="plugins/bootstrap-fileinput/bootstrap-fileinput.css">
<link rel="stylesheet" href="plugins/layui/css/layui.css" media="all">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]> <!--[if lt IE 9]>
...@@ -75,6 +77,54 @@ ...@@ -75,6 +77,54 @@
<form role="form" id="myForm"> <form role="form" id="myForm">
<input name="id" value="$!{data.id}" hidden="true"/> <input name="id" value="$!{data.id}" hidden="true"/>
<div class="box-body"> <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>订单号<font style="color: red"></font></label>
<input type="text"
class="form-control" name="mailNo"
id="mailNo" readonly="readonly"
maxlength="50" placeholder="咨询单编码"
value="$!{data.mailNo}"
>
</div>
<div class="form-group form-md-line-input col-xs-5">
<label>顺丰运单号</label>
<input type="text"
class="form-control" name="orderNo"
id="orderNo" readonly="readonly"
maxlength="50" placeholder="用药人姓名"
value="$!{data.orderNo}"
>
</div>
</div>
</div>
<div class="panel panel-primary">
<div class="panel-heading">路由信息</div>
<div class="panel-body">
<ul class="layui-timeline">
#foreach( $item in $routes)
<li class="layui-timeline-item">
<i class="layui-icon layui-timeline-axis"></i>
<div class="layui-timeline-content layui-text">
<h3 class="layui-timeline-title">$!date.format('yyyy年MM月dd日 HH:mm',$!item.acceptTime)</h3>
<p>
路由节点:${item.opcode}
<br>
路由地址:${item.acceptAddress}
<br>
${item.number}
</p>
</div>
</li>
#end
</ul>
</div>
</div>
</div> </div>
<div class="box-footer"> <div class="box-footer">
......
...@@ -77,9 +77,10 @@ ...@@ -77,9 +77,10 @@
<div class="box"> <div class="box">
<div class="box-header"> <div class="box-header">
<form id="seachTableForm" action="#springUrl('/a/logistics/list')" method="get"> <form id="seachTableForm" action="#springUrl('/a/logistics/list')" method="get">
<!--<input type="text" class="form-control" name="mailNo" placeholder="顺风运单号">-->
<div class="col-xs-2"> <div class="col-xs-2">
<input type="text" class="form-control " <input type="text" class="form-control" name="mailNo" placeholder="顺丰运单号" value="$!{mailNo}">
name="mailNo" placeholder="顺风运单号">
</div> </div>
<div class="col-xs-5"> <div class="col-xs-5">
<button type="button" class="search btn btn-primary">搜索</button> <button type="button" class="search btn btn-primary">搜索</button>
...@@ -96,13 +97,14 @@ ...@@ -96,13 +97,14 @@
<thead> <thead>
<tr> <tr>
<td hidden="true">Id</td> <td hidden="true">Id</td>
<td>顺丰运单号</td> <td style="font-weight: bold">顺丰运单号</td>
<td>订单号</td> <td style="font-weight: bold">订单号</td>
<td>路由节点发生时间</td> <!--<td style="font-weight: bold">路由发生时间</td>-->
<td>路由节点描述</td> <!--<td style="font-weight: bold">路由描述</td>-->
<td>路由节点发生地</td> <!--<td style="font-weight: bold">路由发生地</td>-->
<td>路由节点操作码</td> <!--<td style="font-weight: bold">路由操作码</td>-->
<th>创建时间</th> <th>顺丰发货时间</th>
<th>操作</th>
</tr> </tr>
</thead> </thead>
<tbody id="tablebody"> <tbody id="tablebody">
...@@ -204,20 +206,23 @@ ...@@ -204,20 +206,23 @@
{ {
"mData":"orderNo" "mData":"orderNo"
}, },
// {
// "mData":"acceptTime"
// },
// {
// "mData":"number"
// },
// {
// "mData":"acceptAddress"
// },
// {
// "mData":"opcode"
// },
{ {
"mData":"acceptTime" "mData": "sendExpressDate"
},
{
"mData":"number"
},
{
"mData":"acceptAddress"
},
{
"mData":"opcode"
}, },
{ {
"mData": "createTime" "mData": "id"
}], }],
"aoColumnDefs": [ "aoColumnDefs": [
{ // set default column settings { // set default column settings
...@@ -226,22 +231,30 @@ ...@@ -226,22 +231,30 @@
}, },
{ {
"aTargets": [3], "aTargets": [3],
"mData": "acceptTime", "mData": "sendExpressDate",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
return formatDates(a, "yyyy-MM-dd HH:mm:ss"); return formatDates(a, "yyyy-MM-dd HH:mm:ss");
} }
}, },
{ {
"aTargets": [7], "aTargets": [4],
"mData": "createTime", "mData": "id",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
return formatDates(a, "yyyy-MM-dd HH:mm:ss"); var html = '#if($shiro.hasPermission("qy:logistics:view"))';
html += '<div class="btn-group" style="min-width: 100px;">\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" style="min-width: 100px;">\n';
html += '<li><a href="#springUrl("/a/logistics/form?id=' + a + '")">查看</a></li>';
html += '</ul>';
html += '#end';
return html;
} }
} }
] ]
}); });
} }
......
...@@ -3,6 +3,9 @@ package com.cftech.logistics.dao; ...@@ -3,6 +3,9 @@ package com.cftech.logistics.dao;
import com.cftech.logistics.model.Logistics; import com.cftech.logistics.model.Logistics;
import com.cftech.core.generic.GenericDao; import com.cftech.core.generic.GenericDao;
import java.util.List;
import java.util.Map;
/** /**
* 物流信息Mapper * 物流信息Mapper
* *
...@@ -11,4 +14,7 @@ import com.cftech.core.generic.GenericDao; ...@@ -11,4 +14,7 @@ import com.cftech.core.generic.GenericDao;
*/ */
public interface LogisticsMapper extends GenericDao<Logistics> { public interface LogisticsMapper extends GenericDao<Logistics> {
Integer countList(Map<String, Object> params);
List<Logistics> fetchSearchByList(Map<String, Object> params);
} }
\ No newline at end of file
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
<result column="description" property="description"/> <result column="description" property="description"/>
<result column="create_by" property="createBy"/> <result column="create_by" property="createBy"/>
<result column="update_by" property="updateBy"/> <result column="update_by" property="updateBy"/>
<result column="sendExpressDate" property="sendExpressDate"/>
</resultMap> </resultMap>
<sql id="sqlWhere"> <sql id="sqlWhere">
...@@ -102,7 +103,6 @@ ...@@ -102,7 +103,6 @@
<select id="count" parameterType="java.util.Map" resultType="java.lang.Integer"> <select id="count" parameterType="java.util.Map" resultType="java.lang.Integer">
SELECT COUNT(1) FROM t_aidea_logistics SELECT COUNT(1) FROM t_aidea_logistics
<include refid="sqlWhere"/> <include refid="sqlWhere"/>
</select> </select>
<select id="fetchSearchByPage" parameterType="java.util.Map" resultMap="resultMap"> <select id="fetchSearchByPage" parameterType="java.util.Map" resultMap="resultMap">
...@@ -114,6 +114,41 @@ ...@@ -114,6 +114,41 @@
<if test="limit>0">limit #{offset},#{limit}</if> <if test="limit>0">limit #{offset},#{limit}</if>
</select> </select>
<select id="countList" parameterType="java.util.Map" resultType="java.lang.Integer">
select count(1) from (
SELECT COUNT(1) FROM t_aidea_logistics t
LEFT JOIN t_aidea_waybill b ON t.mail_no = b.waybill_no
<include refid="sqlWhere"/>
GROUP BY t.mail_no
) tmp
</select>
<select id="fetchSearchByList" parameterType="java.util.Map" resultMap="resultMap">
SELECT
t.id,
t.mail_no,
t.order_no,
t.accept_time,
t.number,
t.accept_address,
t.opcode,
t.accounts_id,
t.del_flag,
t.status,
t.create_time,
t.update_time,
t.description,
t.create_by,
t.update_by,
b.send_express_date sendExpressDate
FROM t_aidea_logistics t
LEFT JOIN t_aidea_waybill b ON t.mail_no = b.waybill_no
<include refid="sqlWhere"/>
GROUP BY t.mail_no
<if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if>
<if test="limit>0">limit #{offset},#{limit}</if>
</select>
<update id="update" parameterType="com.cftech.logistics.model.Logistics"> <update id="update" parameterType="com.cftech.logistics.model.Logistics">
update t_aidea_logistics update t_aidea_logistics
<set> <set>
......
...@@ -18,7 +18,7 @@ public class Logistics implements Serializable { ...@@ -18,7 +18,7 @@ public class Logistics implements Serializable {
/** 主键id */ /** 主键id */
private Long id; private Long id;
/** 顺风运单号 */ /** 顺风运单号 */
@ExportConfig(value = "顺运单号", width = 100, showLevel = 1) @ExportConfig(value = "顺运单号", width = 100, showLevel = 1)
private String mailNo; private String mailNo;
/** 订单号 */ /** 订单号 */
@ExportConfig(value = "订单号", width = 100, showLevel = 1) @ExportConfig(value = "订单号", width = 100, showLevel = 1)
...@@ -51,6 +51,8 @@ public class Logistics implements Serializable { ...@@ -51,6 +51,8 @@ public class Logistics implements Serializable {
private Long createBy; private Long createBy;
/** 更新人 */ /** 更新人 */
private Long updateBy; private Long updateBy;
/** 顺丰发件时间 */
private String sendExpressDate;
public Logistics() { public Logistics() {
this.delFlag = false; this.delFlag = false;
......
package com.cftech.logistics.service; package com.cftech.logistics.service;
import com.cftech.core.sql.Conds;
import com.cftech.core.sql.Sort;
import com.cftech.logistics.model.Logistics; import com.cftech.logistics.model.Logistics;
import com.cftech.core.generic.GenericService; import com.cftech.core.generic.GenericService;
import java.util.List;
/** /**
* 物流信息Service * 物流信息Service
* *
...@@ -10,5 +15,7 @@ import com.cftech.core.generic.GenericService; ...@@ -10,5 +15,7 @@ import com.cftech.core.generic.GenericService;
*/ */
public interface LogisticsService extends GenericService<Logistics> { public interface LogisticsService extends GenericService<Logistics> {
Integer countList(Conds conds);
List<Logistics> fetchSearchByList(Conds conds, Sort sort, int iDisplayStart, int iDisplayLength);
} }
package com.cftech.logistics.service.impl; package com.cftech.logistics.service.impl;
import com.cftech.core.sql.Sort;
import com.cftech.logistics.model.Logistics; import com.cftech.logistics.model.Logistics;
import com.cftech.logistics.dao.LogisticsMapper; import com.cftech.logistics.dao.LogisticsMapper;
import com.cftech.logistics.service.LogisticsService; import com.cftech.logistics.service.LogisticsService;
...@@ -10,6 +11,10 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -10,6 +11,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* 物流信息ServiceImpl * 物流信息ServiceImpl
* *
...@@ -28,4 +33,20 @@ public GenericDao<Logistics> getGenericMapper() { ...@@ -28,4 +33,20 @@ public GenericDao<Logistics> getGenericMapper() {
return logisticsMapper; return logisticsMapper;
} }
@Override
public Integer countList(Conds conds) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("conds", conds);
return logisticsMapper.countList(params);
}
@Override
public List<Logistics> fetchSearchByList(Conds conds, Sort sort, int page, int pageSize) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("conds", conds);
params.put("offset", page > 0 ? page : 0);
params.put("limit", pageSize > 0 ? pageSize : 0);
params.put("sort", sort);
return logisticsMapper.fetchSearchByList(params);
}
} }
\ No newline at end of file
...@@ -52,9 +52,10 @@ public class LogisticsController { ...@@ -52,9 +52,10 @@ public class LogisticsController {
//列表页面 //列表页面
@RequiresPermissions(value = LOGISTICS_VIEW) @RequiresPermissions(value = LOGISTICS_VIEW)
@RequestMapping("/list") @RequestMapping("/list")
public String list(HttpServletRequest request, Model model) { public String list(HttpServletRequest request, Model model, String mailNo) {
Long accountId = UserUtils.getmpaccounts(request); Long accountId = UserUtils.getmpaccounts(request);
model.addAttribute("accountId", accountId); model.addAttribute("accountId", accountId);
model.addAttribute("mailNo", mailNo);
return "logistics/logisticslist"; return "logistics/logisticslist";
} }
...@@ -65,6 +66,14 @@ public class LogisticsController { ...@@ -65,6 +66,14 @@ public class LogisticsController {
if (!StringUtils.isEmpty(id)) { if (!StringUtils.isEmpty(id)) {
Logistics logistics = logisticsService.fetchById(id); Logistics logistics = logisticsService.fetchById(id);
model.addAttribute("data", logistics); model.addAttribute("data", logistics);
Conds conds = new Conds();
conds.equal("del_flag", Constants.DEL_FLAG_0);
conds.equal("mail_no", logistics.getMailNo());
Sort sort = new Sort( "create_time", OrderType.DESC);
List<Logistics> routes = logisticsService.fetchSearchByPage(conds, sort, 0, 0);
model.addAttribute("routes", routes);
} }
return "logistics/logisticsform"; return "logistics/logisticsform";
} }
...@@ -103,15 +112,18 @@ public class LogisticsController { ...@@ -103,15 +112,18 @@ public class LogisticsController {
public JSONObject listData(int iDisplayStart, int iDisplayLength, Logistics logistics, HttpServletRequest request) { public JSONObject listData(int iDisplayStart, int iDisplayLength, Logistics logistics, HttpServletRequest request) {
Long accountsId = UserUtils.getmpaccounts(request); Long accountsId = UserUtils.getmpaccounts(request);
Conds conds = new Conds(); Conds conds = new Conds();
conds.equal("del_flag", Constants.DEL_FLAG_0); conds.equal("t.del_flag", Constants.DEL_FLAG_0);
conds.equal("accounts_id", accountsId); conds.equal("t.accounts_id", accountsId);
if(!StringUtils.isEmpty(logistics.getMailNo())){ if(!StringUtils.isEmpty(logistics.getMailNo())){
conds.equal("mail_no",logistics.getMailNo()); conds.equal("t.mail_no",logistics.getMailNo());
}
if (!StringUtils.isEmpty(logistics.getOrderNo())) {
conds.equal("t.order_no", logistics.getOrderNo());
} }
Sort sort = new Sort("create_time", OrderType.DESC); Sort sort = new Sort("t.create_time", OrderType.DESC);
List<Logistics> list = logisticsService.fetchSearchByPage(conds, sort, iDisplayStart, iDisplayLength); List<Logistics> list = logisticsService.fetchSearchByList(conds, sort, iDisplayStart, iDisplayLength);
Integer counts = logisticsService.count(conds); Integer counts = logisticsService.countList(conds);
JSONObject rtnJson = new JSONObject(); JSONObject rtnJson = new JSONObject();
rtnJson.put("iTotalRecords", counts); rtnJson.put("iTotalRecords", counts);
rtnJson.put("iTotalDisplayRecords", counts); rtnJson.put("iTotalDisplayRecords", counts);
...@@ -157,7 +169,7 @@ public class LogisticsController { ...@@ -157,7 +169,7 @@ public class LogisticsController {
public String importExcel(HttpServletRequest request, MultipartFile file, Model model) { public String importExcel(HttpServletRequest request, MultipartFile file, Model model) {
Long accountId = UserUtils.getmpaccounts(request); Long accountId = UserUtils.getmpaccounts(request);
if (file == null) { if (file == null) {
return list(request, model); return list(request, model, null);
} }
// 构造临时路径来存储上传的文件 // 构造临时路径来存储上传的文件
String uploadPath = System.getProperty("java.io.tmpdir"); String uploadPath = System.getProperty("java.io.tmpdir");
...@@ -181,7 +193,7 @@ public class LogisticsController { ...@@ -181,7 +193,7 @@ public class LogisticsController {
log.error(e.getMessage()); log.error(e.getMessage());
} }
return list(request, model); return list(request, model, null);
} }
} }
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<result column="description" property="description"/> <result column="description" property="description"/>
<result column="create_by" property="createBy"/> <result column="create_by" property="createBy"/>
<result column="update_by" property="updateBy"/> <result column="update_by" property="updateBy"/>
<result column="product_name" property="productName"/> <result column="drugs_name" property="drugsName"/>
</resultMap> </resultMap>
<sql id="sqlWhere"> <sql id="sqlWhere">
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
d.description, d.description,
d.create_by, d.create_by,
d.update_by, d.update_by,
t.product_name d.drugs_name
</sql> </sql>
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
<select id="fetchSearchByPage" parameterType="java.util.Map" resultType="com.cftech.orderdetail.model.OrderDetails"> <select id="fetchSearchByPage" parameterType="java.util.Map" resultType="com.cftech.orderdetail.model.OrderDetails">
SELECT SELECT
<include refid="sqlColumns"/>, t.common_name commonName, t.format format, t.unit unit <include refid="sqlColumns"/>, t.common_name commonName, t.format format, t.unit unit, t.invoice_code invoiceCode
FROM t_order_details d FROM t_order_details d
LEFT JOIN t_order o ON o.id = d.order_id LEFT JOIN t_order o ON o.id = d.order_id
LEFT JOIN t_aidea_product t ON d.drugs_id = t.id LEFT JOIN t_aidea_product t ON d.drugs_id = t.id
......
...@@ -29,7 +29,7 @@ public class OrderDetails implements Serializable { ...@@ -29,7 +29,7 @@ public class OrderDetails implements Serializable {
private Long drugsId; private Long drugsId;
/* 商品名称 */ /* 商品名称 */
@ExportConfig(value = "商品名称", width = 100, showLevel = 1) @ExportConfig(value = "商品名称", width = 100, showLevel = 1)
private String productName; private String drugsName;
/* 商品数量 */ /* 商品数量 */
@ExportConfig(value = "商品数量", width = 100, showLevel = 1) @ExportConfig(value = "商品数量", width = 100, showLevel = 1)
private Long drugsNum; private Long drugsNum;
...@@ -75,6 +75,8 @@ public class OrderDetails implements Serializable { ...@@ -75,6 +75,8 @@ public class OrderDetails implements Serializable {
private String commonName;//商品通用名称 private String commonName;//商品通用名称
private String format;//药品规格 private String format;//药品规格
private String unit;//药品单位 private String unit;//药品单位
private String productName;//产品名称
private String invoiceCode;//产品税收编码
public OrderDetails() { public OrderDetails() {
this.delFlag = false; this.delFlag = false;
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">确定</button> <button type="button" class="btn btn-primary" data-dismiss="modal">确定</button>
</div> </div>
</div> </div>
</div> </div>
...@@ -116,15 +116,6 @@ ...@@ -116,15 +116,6 @@
value="$!{data.number}"> value="$!{data.number}">
</div> </div>
<div class="form-group form-md-line-input col-xs-5">
<label>快递单号<font style="color: red"></font></label>
<input type="text"
class="form-control" name="courierNumber"
id="courierNumber" readonly="readonly"
maxlength="50" placeholder=""
value="$!{data.courierNumber}" >
</div>
<div class="form-group form-md-line-input col-xs-5"> <div class="form-group form-md-line-input col-xs-5">
<label>订单总价<font style="color: red"></font></label> <label>订单总价<font style="color: red"></font></label>
<input type="text" <input type="text"
...@@ -198,10 +189,11 @@ ...@@ -198,10 +189,11 @@
<div class="form-group form-md-line-input"> <div class="form-group form-md-line-input">
<div id="group" class="list-group"> <div id="group" class="list-group">
<li class="list-group-item"> <li class="list-group-item">
<th style=""><label style="width: 180px;margin-right: 50px;text-align: center">商品名称</label></th> <th style=""><label style="width: 160px;margin-right: 50px;text-align: center">商品名称</label></th>
<th style=""><label style="width: 160px;margin-right: 50px;text-align: center">商品编码</label></th> <th style=""><label style="width: 200px;margin-right: 40px;text-align: center">商品编码</label></th>
<th style=""><label style="width: 180px;margin-right: 50px;text-align: center">购买数量</label></th> <th style=""><label style="width: 100px;margin-right: 45px;text-align: center">购买数量</label></th>
<th style=""><label style="width: 180px;margin-right: 50px;text-align: center">出货数量</label></th> <th style=""><label style="width: 100px;margin-right: 100px;text-align: center">出货数量</label></th>
<!--<th style=""><label style="width: 180px;margin-right: 50px;text-align: center">批次号</label></th>-->
</li> </li>
...@@ -308,6 +300,12 @@ ...@@ -308,6 +300,12 @@
console.log('扫码开始'); console.log('扫码开始');
scanCode(event); scanCode(event);
}); });
// $("#scanGoodsCode").on('keydown', function(event) {
// //键盘按下回车后会转换成click 阻止键盘的所有默认行为
// event.preventDefault();
// console.log('扫码开始');
// scanCode(event);
// });
} }
...@@ -341,7 +339,7 @@ ...@@ -341,7 +339,7 @@
}); });
if (!flag) { if (!flag) {
$("#labels").text("商品不在订单中"); $("#labels").text("商品不在订单中!");
$('#exampleModal').modal('show'); $('#exampleModal').modal('show');
lastTime = 0; lastTime = 0;
console.log('扫码结束'); console.log('扫码结束');
...@@ -349,7 +347,7 @@ ...@@ -349,7 +347,7 @@
let orderNum = $("#group").find('input[name="orderNum"]:eq('+index+')').val(); let orderNum = $("#group").find('input[name="orderNum"]:eq('+index+')').val();
let sendNum = $("#group").find('input[name="sendNum"]:eq('+index+')').val(); let sendNum = $("#group").find('input[name="sendNum"]:eq('+index+')').val();
if (parseInt(sendNum) >= parseInt(orderNum)) { if (parseInt(sendNum) >= parseInt(orderNum)) {
$("#labels").text("超过订单商品数量"); $("#labels").text("超过订单商品数量!");
$('#exampleModal').modal('show'); $('#exampleModal').modal('show');
lastTime = 0; lastTime = 0;
console.log('扫码结束'); console.log('扫码结束');
...@@ -383,7 +381,7 @@ ...@@ -383,7 +381,7 @@
sumScanCode = arrStr.join('#'); sumScanCode = arrStr.join('#');
$('textarea[name="scanGoodsCode"]').text(sumScanCode); $('textarea[name="scanGoodsCode"]').text(sumScanCode);
} else { } else {
$("#labels").text("商品数量已为0件无法删除"); $("#labels").text("商品数量已为0件无法删除!");
$('#exampleModal').modal('show'); $('#exampleModal').modal('show');
sumScanCode=""; sumScanCode="";
} }
...@@ -431,7 +429,6 @@ ...@@ -431,7 +429,6 @@
$("#payStatus").val(""); $("#payStatus").val("");
} }
var confirm = $("#confirm").val(); var confirm = $("#confirm").val();
if (confirm = '0') { if (confirm = '0') {
$("#divClass").css('display', 'blocks') $("#divClass").css('display', 'blocks')
...@@ -447,7 +444,7 @@ ...@@ -447,7 +444,7 @@
function clickAdd(id, productId, productName, count, price, amount, number) { function clickAdd(id, productId, productName, count, price, amount, number) {
var options = ""; var options = "";
if (productName && productName != null) { if (productName && productName != null) {
options = `<input name="productName" class="form-control" style="width: 180px ;margin-right: 50px" type='text' readonly="readonly" value="`+productName+`"></input>`; options = `<input name="productName" class="form-control" style="width: 160px ;margin-right: 50px" type='text' readonly="readonly" value="`+productName+`"></input>`;
} }
var idHtml = ""; var idHtml = "";
...@@ -459,26 +456,26 @@ ...@@ -459,26 +456,26 @@
var htmlNumber = ""; var htmlNumber = "";
if (number && number != null) { if (number && number != null) {
htmlNumber += `<input name="productCode" class="form-control" style="width: 180px ;margin-right: 50px" type='text' readonly="readonly" value="`+number+`"></input>`; htmlNumber += `<input name="productCode" class="form-control" style="width: 200px ;margin-right: 50px" type='text' readonly="readonly" value="`+number+`"></input>`;
} }
var listHtml = ""; var listHtml = "";
if (count && count != null) { if (count && count != null) {
price price
listHtml += `<input name="orderNum" class="form-control" type="text" style="width: 180px;margin-right: 50px;" readonly value=${count} ></input>`; listHtml += `<input name="orderNum" class="form-control" type="text" style="width: 100px;margin-right: 50px;" readonly value=${count} ></input>`;
} else { } else {
listHtml += `<input name="orderNum" class="form-control" type="text" style="width: 180px ;margin-right: 50px;" readonly value="1"></input>`; listHtml += `<input name="orderNum" class="form-control" type="text" style="width: 100px;margin-right: 50px;" readonly value="1"></input>`;
} }
var HtmlAmount = `<input name="sendNum" class="form-control" type="text" style="width: 100px;margin-right: 50px;" readonly value="1"></input>`;
//var HtmlBatchNo = `<input name="batchNo" class="form-control" type="text" style="width: 300px; margin-right: 50px;"></input>`;
var HtmlAmount = `<input name="sendNum" class="form-control" type="text" style="width: 180px ;margin-right: 50px;" readonly value="0"></input>`;
//扫码商品编码 //扫码商品编码
var HtmlCode = `<button name="delGoods" type="button" class="btn btn-danger delGoods">删除</button>`; var HtmlCode = `<button name="delGoods" type="button" class="btn btn-danger delGoods">删除</button>`;
let html = `<li id="form-translate" class="list-group-item" style="display:flex;"> let html = `<li id="form-translate" class="list-group-item translate" style="display:flex;">
${idHtml} ${idHtml}
${options} ${options}
...@@ -516,13 +513,36 @@ ...@@ -516,13 +513,36 @@
}); });
if (flag) { if (flag) {
$("#labels").text("订单商品数量和出库数量不一致"); $("#labels").text("订单商品数量和出库数量不一致!");
$('#exampleModal').modal('show'); $('#exampleModal').modal('show');
return; return;
} }
var url = "#springUrl('/a/waybill/orderSendOutForWaybill')"; let datas = [];
// $(".translate").each(function (index,item){
// const idDetail = $(item).find('[name="idDetail"]').val();
// const productName = $(item).find('[name="productName"]').val();
// const productCode = $(item).find('[name="productCode"]').val();
// const orderNum = $(item).find('[name="orderNum"]').val();
// const sendNum = $(item).find('[name="sendNum"]').val();
// const batchNo = $(item).find('[name="batchNo"]').val();
// if (batchNo == null || batchNo == '') {
// $("#labels").text("请输入商品批次号!");
// $('#exampleModal').modal('show');
// return;
// }
//
// datas.push({
// idDetail : idDetail,
// productName :productName,
// productCode : productCode,
// orderNum : orderNum,
// sendNum : sendNum,
// batchNo :batchNo
// })
// });
var url = "#springUrl('/a/waybill/orderSendOutForWaybill')";
$.ajax({ $.ajax({
url: url, url: url,
type: "POST", type: "POST",
...@@ -530,7 +550,8 @@ ...@@ -530,7 +550,8 @@
headers:{"Accept": "application/json;charset=UTF-8"}, headers:{"Accept": "application/json;charset=UTF-8"},
data : { _csrf: csrf, data : { _csrf: csrf,
_csrf_header: csrf_header, _csrf_header: csrf_header,
orderId: $("#id").val() }, orderId: $("#id").val(),
datas: JSON.stringify(datas)},
success :function (rsp) { success :function (rsp) {
if(rsp.errorNo == "0"){ if(rsp.errorNo == "0"){
Cfapp.alert({ Cfapp.alert({
......
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
</div> </div>
<div class="form-group form-md-line-input col-xs-5"> <div class="form-group form-md-line-input col-xs-5">
<label>快递单号<font style="color: red"></font></label> <label>顺丰运单号<font style="color: red"></font></label>
<input type="text" <input type="text"
class="form-control" name="courierNumber" class="form-control" name="courierNumber"
id="courierNumber" readonly="readonly" id="courierNumber" readonly="readonly"
...@@ -525,7 +525,8 @@ ...@@ -525,7 +525,8 @@
type: "POST", type: "POST",
dateType:'json', dateType:'json',
headers:{"Accept": "application/json;charset=UTF-8"}, headers:{"Accept": "application/json;charset=UTF-8"},
data : {_csrf:csrf,_csrf_header:csrf_header,datas:JSON.stringify(datas)}, data : {_csrf:csrf,_csrf_header:csrf_header,
datas: JSON.stringify(datas)},
success :function (rsp) { success :function (rsp) {
console.log(rsp); console.log(rsp);
if(rsp.errorNo == "0"){ if(rsp.errorNo == "0"){
......
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
<form id="seachTableForm" action="#springUrl('/a/order/exportExcel')" method="get"> <form id="seachTableForm" action="#springUrl('/a/order/exportExcel')" method="get">
<div class="col-xs-2"> <div class="col-xs-2">
<input type="text" class="form-control" <input type="text" class="form-control"
name="number" value="" placeholder="订单编"> name="number" value="" placeholder="订单编">
</div> </div>
<div class="col-xs-2"> <div class="col-xs-2">
<input type="text" class="form-control" <input type="text" class="form-control"
...@@ -265,6 +265,7 @@ ...@@ -265,6 +265,7 @@
<th>订单状态</th> <th>订单状态</th>
<!--<th>支付交易号</th>--> <!--<th>支付交易号</th>-->
<th>是否开票</th> <th>是否开票</th>
<th>三期患者</th>
<th>创建时间</th> <th>创建时间</th>
<th>确认时间</th> <th>确认时间</th>
<th>付款时间</th> <th>付款时间</th>
...@@ -381,7 +382,7 @@ ...@@ -381,7 +382,7 @@
"pagingType": "full_numbers", "pagingType": "full_numbers",
"autowidth": true, "autowidth": true,
"scrollX": true, "scrollX": true,
"sScrollY":"450px", "sScrollY":"480px",
"aoColumns": [ "aoColumns": [
{ {
"mData": "id" "mData": "id"
...@@ -432,6 +433,10 @@ ...@@ -432,6 +433,10 @@
"mData": "confirm" "mData": "confirm"
} }
, ,
{
"mData": "isThree"
}
,
{ {
"mData": "createTime" "mData": "createTime"
} }
...@@ -566,7 +571,12 @@ ...@@ -566,7 +571,12 @@
"aTargets": [8], "aTargets": [8],
"mData": "courierNumber", "mData": "courierNumber",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
return a; if (a) {
var html = `#if($shiro.hasPermission("qy:logistics:view"))<a href="#springUrl("/a/logistics/list?mailNo=` + a + `")">` + a + `</a>#else` + a + `#end`;
} else {
return '';
}
return html;
} }
} }
, ,
...@@ -607,6 +617,14 @@ ...@@ -607,6 +617,14 @@
, ,
{ {
"aTargets": [11], "aTargets": [11],
"mData": "isThree",
"mRender": function (a, b, c, d) {
return a == '0' ? '否':'是';
}
}
,
{
"aTargets": [12],
"mData": "createTime", "mData": "createTime",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
let time = formatDates(a); let time = formatDates(a);
...@@ -618,7 +636,7 @@ ...@@ -618,7 +636,7 @@
} }
, ,
{ {
"aTargets": [12], "aTargets": [13],
"mData": "orderTime", "mData": "orderTime",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
let time = formatDates(a); let time = formatDates(a);
...@@ -630,7 +648,7 @@ ...@@ -630,7 +648,7 @@
} }
, ,
{ {
"aTargets": [13], "aTargets": [14],
"mData": "payTime", "mData": "payTime",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
let time = formatDates(a); let time = formatDates(a);
...@@ -642,7 +660,7 @@ ...@@ -642,7 +660,7 @@
} }
, ,
{ {
"aTargets": [14], "aTargets": [15],
"mData": "sendExpressDateStr", "mData": "sendExpressDateStr",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
return a; return a;
...@@ -650,7 +668,7 @@ ...@@ -650,7 +668,7 @@
} }
, ,
{ {
"aTargets": [15], "aTargets": [16],
"mData": "acceptExpressDateStr", "mData": "acceptExpressDateStr",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
return a; return a;
...@@ -658,7 +676,7 @@ ...@@ -658,7 +676,7 @@
} }
, ,
{ {
"aTargets": [16], "aTargets": [17],
"mData": "cancelTime", "mData": "cancelTime",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
let time = formatDates(a); let time = formatDates(a);
...@@ -670,7 +688,7 @@ ...@@ -670,7 +688,7 @@
} }
, ,
{ {
"aTargets": [17], "aTargets": [18],
"mData": "id", "mData": "id",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
var html = '#if($shiro.hasPermission("qy:order:edit"))'; var html = '#if($shiro.hasPermission("qy:order:edit"))';
...@@ -697,6 +715,9 @@ ...@@ -697,6 +715,9 @@
if (c.status == '1' || c.status == '2') { if (c.status == '1' || c.status == '2') {
html += '<li><a onclick="showRemindModal(' + a + ')">修改发货地址</a></li>'; html += '<li><a onclick="showRemindModal(' + a + ')">修改发货地址</a></li>';
} }
if (c.status != '0') {//待付款可复制链接
html += '<li><a onclick="copyPayLink(`' + c.payUrl + '`)">复制链接</a></li>';
}
// if (c.status == '2') {//待发货才可以出库操作 // if (c.status == '2') {//待发货才可以出库操作
// html += '<li><a href="#springUrl("/a/order/sendOut?id=' + a + '")">订单出库</a></li>'; // html += '<li><a href="#springUrl("/a/order/sendOut?id=' + a + '")">订单出库</a></li>';
// } // }
...@@ -1038,8 +1059,6 @@ ...@@ -1038,8 +1059,6 @@
}); });
} }
function importExcel() { function importExcel() {
var templateExcelUrl = "#springUrl('/a/order/templateExcel')"; var templateExcelUrl = "#springUrl('/a/order/templateExcel')";
var importExcelUrl = "#springUrl('/a/order/importExcel')"; var importExcelUrl = "#springUrl('/a/order/importExcel')";
...@@ -1063,6 +1082,30 @@ ...@@ -1063,6 +1082,30 @@
$("#table").dataTable().fnClearTable(); $("#table").dataTable().fnClearTable();
} }
function copyPayLink(payUrl) {
console.log(payUrl);
let input = document.createElement('input');
input.setAttribute('readonly', 'readonly'); // 防止手机上弹出软键盘
input.setAttribute('value', payUrl);
document.body.appendChild(input);
input.select();
var res = document.execCommand('copy');
document.body.removeChild(input);
if (res) {
Cfapp.alert({
message: "链接复制成功!",
btntext: "确定",
success: function () { }
});
} else {
Cfapp.alert({
message: "链接复制失败!",
btntext: "确定",
success: function () { }
});
}
}
$("#selHospital").click(function () { $("#selHospital").click(function () {
let orderId = $('#addressOpenId').val(); let orderId = $('#addressOpenId').val();
console.log(orderId); console.log(orderId);
......
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
<form id="seachTableForm" action="#springUrl('/a/order/list')" method="get"> <form id="seachTableForm" action="#springUrl('/a/order/list')" method="get">
<div class="col-xs-2"> <div class="col-xs-2">
<input type="text" class="form-control" <input type="text" class="form-control"
name="number" value="" placeholder="订单编"> name="number" value="" placeholder="订单编">
</div> </div>
<div class="col-xs-2"> <div class="col-xs-2">
<input type="text" class="form-control" <input type="text" class="form-control"
...@@ -319,6 +319,9 @@ ...@@ -319,6 +319,9 @@
"sAjaxSource": sSource, "sAjaxSource": sSource,
"fnServerData": retrieveData, "fnServerData": retrieveData,
"pagingType": "full_numbers", "pagingType": "full_numbers",
"autowidth": true,
"scrollX": true,
"sScrollY":"480px",
"aoColumns": [ "aoColumns": [
{ {
"mData": "id" "mData": "id"
...@@ -369,7 +372,7 @@ ...@@ -369,7 +372,7 @@
} }
, ,
{ {
"mData": "outTime" "mData": "sendExpressDateStr"
} }
, ,
{ {
...@@ -445,7 +448,12 @@ ...@@ -445,7 +448,12 @@
"aTargets": [4], "aTargets": [4],
"mData": "courierNumber", "mData": "courierNumber",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
return a; if (a) {
var html = `#if($shiro.hasPermission("qy:logistics:view"))<a href="#springUrl("/a/logistics/list?mailNo=` + a + `")">` + a + `</a>#else` + a + `#end`;
} else {
return '';
}
return html;
} }
} }
, ,
...@@ -494,7 +502,7 @@ ...@@ -494,7 +502,7 @@
, ,
{ {
"aTargets": [9], "aTargets": [9],
"mData": "outTime", "mData": "sendExpressDateStr",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
return a; return a;
} }
......
...@@ -86,6 +86,7 @@ ...@@ -86,6 +86,7 @@
<result column="outTime" property="outTime"/> <result column="outTime" property="outTime"/>
<result column="takeFrequency" property="takeFrequency"/> <result column="takeFrequency" property="takeFrequency"/>
<result column="fansAlias" property="fansAlias"/> <result column="fansAlias" property="fansAlias"/>
<result column="isThree" property="isThree"/>
<collection property="list" ofType="com.cftech.order.model.ProductVO"> <collection property="list" ofType="com.cftech.order.model.ProductVO">
<result column="product_name" property="productName"/> <result column="product_name" property="productName"/>
</collection> </collection>
...@@ -333,7 +334,7 @@ ...@@ -333,7 +334,7 @@
o.address_id, o.address_id,
o.order_time, o.order_time,
o.cancel_time, o.cancel_time,
DATE_FORMAT(aw.send_express_date, '%Y-%m-%d %H:%i:%s') sendExpressDateStr, DATE_FORMAT(aw.create_time, '%Y-%m-%d %H:%i:%s') sendExpressDateStr,
DATE_FORMAT(aw.accept_express_date, '%Y-%m-%d %H:%i:%s') acceptExpressDateStr, DATE_FORMAT(aw.accept_express_date, '%Y-%m-%d %H:%i:%s') acceptExpressDateStr,
t.id as productId, t.id as productId,
CONVERT ( AES_DECRYPT( m.`name`, 'aideakey' ) USING UTF8 ) memberName, CONVERT ( AES_DECRYPT( m.`name`, 'aideakey' ) USING UTF8 ) memberName,
...@@ -342,7 +343,9 @@ ...@@ -342,7 +343,9 @@
DATE_FORMAT(aw.create_time, '%Y-%m-%d %H:%i') outTime, DATE_FORMAT(aw.create_time, '%Y-%m-%d %H:%i') outTime,
o.remind_type, o.remind_type,
t.take_frequency takeFrequency, t.take_frequency takeFrequency,
f.store fansAlias f.store fansAlias,
CASE WHEN au.name IS NOT NULL THEN 1 ELSE 0 END isThree,
o.remarks
FROM t_order o FROM t_order o
LEFT JOIN t_aidea_consult_sheet cs ON o.consult_id = cs.id LEFT JOIN t_aidea_consult_sheet cs ON o.consult_id = cs.id
LEFT JOIN t_shipping_address s ON o.address_id = s.id LEFT JOIN t_shipping_address s ON o.address_id = s.id
...@@ -350,6 +353,7 @@ ...@@ -350,6 +353,7 @@
LEFT JOIN t_aidea_product t ON d.drugs_id = t.id LEFT JOIN t_aidea_product t ON d.drugs_id = t.id
LEFT JOIN wx_mp_fanss f ON f.openid = o.openid and f.delflag = '0' LEFT JOIN wx_mp_fanss f ON f.openid = o.openid and f.delflag = '0'
LEFT JOIN wx_mp_member m on m.open_id = o.openid LEFT JOIN wx_mp_member m on m.open_id = o.openid
LEFT JOIN t_aidea_authentication au ON m.cardid = au.id_card AND au.del_flag = '0'
LEFT JOIN t_shipping_address a on a.id = o.address_id LEFT JOIN t_shipping_address a on a.id = o.address_id
LEFT JOIN t_aidea_waybill aw ON o.id = aw.order_id LEFT JOIN t_aidea_waybill aw ON o.id = aw.order_id
<include refid="sqlWhere"/> <include refid="sqlWhere"/>
...@@ -463,7 +467,7 @@ ...@@ -463,7 +467,7 @@
cancel_time = #{cancelTime, jdbcType=TIMESTAMP}, cancel_time = #{cancelTime, jdbcType=TIMESTAMP},
</if> </if>
<if test="remindType != null"> <if test="remindType != null">
remind_type = #{remindType, jdbcType=VARCHAR}, remind_type = #{remindType, jdbcType=VARCHAR}
</if> </if>
</set> </set>
where id=#{id,jdbcType=BIGINT} where id=#{id,jdbcType=BIGINT}
......
...@@ -159,7 +159,8 @@ public class Order extends OrderDetail implements Serializable { ...@@ -159,7 +159,8 @@ public class Order extends OrderDetail implements Serializable {
private String outTime;//出库时间 private String outTime;//出库时间
private String takeFrequency;//服用频率 private String takeFrequency;//服用频率
private String fansAlias;//粉丝别名 private String fansAlias;//粉丝别名
private String isThree;//是否三期用户
private String payUrl;//支付链接
public Order() { public Order() {
...@@ -566,4 +567,20 @@ public class Order extends OrderDetail implements Serializable { ...@@ -566,4 +567,20 @@ public class Order extends OrderDetail implements Serializable {
public void setCancelTime(Date cancelTime) { public void setCancelTime(Date cancelTime) {
this.cancelTime = cancelTime; this.cancelTime = cancelTime;
} }
public String getIsThree() {
return isThree;
}
public void setIsThree(String isThree) {
this.isThree = isThree;
}
public String getPayUrl() {
return payUrl;
}
public void setPayUrl(String payUrl) {
this.payUrl = payUrl;
}
} }
\ No newline at end of file
...@@ -12,10 +12,10 @@ import java.util.Date; ...@@ -12,10 +12,10 @@ import java.util.Date;
*/ */
@Data @Data
public class OrderVO { public class OrderVO {
@ExportConfig(value = "订单编码" , width = 100, showLevel = 1) @ExportConfig(value = "订单编码", width = 100, showLevel = 1)
private String number; private String number;
@ExportConfig(value = "咨询单编码", width = 100 , showLevel = 1) @ExportConfig(value = "咨询单编码", width = 100, showLevel = 1)
private String consultCode; private String consultCode;
@ExportConfig(value = "商品名称", width = 100, showLevel = 1) @ExportConfig(value = "商品名称", width = 100, showLevel = 1)
...@@ -24,16 +24,17 @@ public class OrderVO { ...@@ -24,16 +24,17 @@ public class OrderVO {
@ExportConfig(value = "订单金额", width = 100, showLevel = 1) @ExportConfig(value = "订单金额", width = 100, showLevel = 1)
private Double orderAmount; private Double orderAmount;
@ExportConfig(value = "付款金额" , width = 100, showLevel = 1) @ExportConfig(value = "付款金额", width = 100, showLevel = 1)
private Double totalAmount; private Double totalAmount;
@ExportConfig(value = "昵称" , width = 100, showLevel = 1) @ExportConfig(value = "昵称", width = 100, showLevel = 1)
private String nickName; private String nickName;
@ExportConfig(value = "openId" , width = 100,showLevel = 1) @ExportConfig(value = "备注", width = 100, showLevel = 1)
private String openid; private String alias;
@ExportConfig(value = "快递单号", width = 100, showLevel = 1) @ExportConfig(value = "顺丰运单号", width = 100, showLevel = 1)
private String courierNumber; private String courierNumber;
@ExportConfig(value = "订单状态", width = 100, showLevel = 1) @ExportConfig(value = "订单状态", width = 100, showLevel = 1)
...@@ -48,12 +49,33 @@ public class OrderVO { ...@@ -48,12 +49,33 @@ public class OrderVO {
@ExportConfig(value = "支付交易号", width = 100, showLevel = 1) @ExportConfig(value = "支付交易号", width = 100, showLevel = 1)
private String tradeNo; private String tradeNo;
@ExportConfig(value = "是否开发票",width = 100,showLevel = 1) @ExportConfig(value = "是否开发票", width = 100, showLevel = 1)
private String confirm; private String confirm;
@ExportConfig(value = "三期患者", width = 100, showLevel = 1)
private String isThree;
@ExportConfig(value = "openId", width = 100, showLevel = 1)
private String openid;
/* 创建时间 */ /* 创建时间 */
@ExportConfig(value = "创建时间", width = 100, showLevel = 1) @ExportConfig(value = "创建时间", width = 100, showLevel = 1)
private String createTime; private String createTime;
@ExportConfig(value = "确认时间", width = 100, showLevel = 1)
private String orderTime;
@ExportConfig(value = "付款时间", width = 100, showLevel = 1)
private String payTime;
@ExportConfig(value = "发货时间", width = 100, showLevel = 1)
private String sendTime;
@ExportConfig(value = "签收时间", width = 100, showLevel = 1)
private String acceptTime;
@ExportConfig(value = "取消时间", width = 100, showLevel = 1)
private String cencalTime;
} }
...@@ -114,6 +114,7 @@ public class WechatPayUtils { ...@@ -114,6 +114,7 @@ public class WechatPayUtils {
System.out.print(xmlObj); System.out.print(xmlObj);
try { try {
String result = sendPost(HttpClients.createDefault(), "https://api.mch.weixin.qq.com/pay/unifiedorder", xmlObj); String result = sendPost(HttpClients.createDefault(), "https://api.mch.weixin.qq.com/pay/unifiedorder", xmlObj);
log.info("商户号订单:" + result);
return xmlToStr(result); return xmlToStr(result);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
......
...@@ -210,7 +210,7 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order ...@@ -210,7 +210,7 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
boolean bool = this.update(order); boolean bool = this.update(order);
if (bool) { if (bool) {
rtnJson.put("errorNo", "0"); rtnJson.put("errorNo", "0");
rtnJson.put("errorMsg", "修改成功"); rtnJson.put("errorMsg", "确认成功!");
return rtnJson; return rtnJson;
} }
} }
......
...@@ -152,7 +152,7 @@ public class InvoiceUtil { ...@@ -152,7 +152,7 @@ public class InvoiceUtil {
//商品名称(如invoiceLineProperty =1,则此商品行为折扣行,折扣行不允许多行折扣,折扣行必须紧邻被折扣行,商品名称必须与被折扣行一致) 必填 //商品名称(如invoiceLineProperty =1,则此商品行为折扣行,折扣行不允许多行折扣,折扣行必须紧邻被折扣行,商品名称必须与被折扣行一致) 必填
detail.put("goodsName", obj.getCommonName()); detail.put("goodsName", obj.getCommonName());
//商品编码(商品税收分类编码开发者自行填写)非必填 //商品编码(商品税收分类编码开发者自行填写)非必填
detail.put("goodsCode", ""); detail.put("goodsCode", obj.getInvoiceCode());
//自行编码(可不填) 非必填 //自行编码(可不填) 非必填
detail.put("selfCode", ""); detail.put("selfCode", "");
......
...@@ -202,6 +202,7 @@ public class OrderController { ...@@ -202,6 +202,7 @@ public class OrderController {
User user = UserUtils.getUser(); User user = UserUtils.getUser();
Long userid = user.getUserid(); Long userid = user.getUserid();
Long accountsId = UserUtils.getmpaccounts(request); Long accountsId = UserUtils.getmpaccounts(request);
MpAccountsEntity mpAccountsEntity = accountsService.getDetail(accountsId);
List<UserRole> roleList = roleService.selectRolesByUserAccountsId(user.getId(), accountsId); List<UserRole> roleList = roleService.selectRolesByUserAccountsId(user.getId(), accountsId);
for (UserRole role : roleList) { for (UserRole role : roleList) {
...@@ -239,11 +240,11 @@ public class OrderController { ...@@ -239,11 +240,11 @@ public class OrderController {
} }
//最终开始金额 //最终开始金额
if (StringUtils.isNoneBlank(order.getStartPayAmount())) { if (StringUtils.isNoneBlank(order.getStartPayAmount())) {
conds.greatEqual("o.total_amount", order.getStartPayAmount()); conds.greatEqual("o.total_amount", Integer.parseInt(order.getStartPayAmount()) * 100);
} }
//最终结束金额 //最终结束金额
if (StringUtils.isNoneBlank(order.getEndPayAmount())) { if (StringUtils.isNoneBlank(order.getEndPayAmount())) {
conds.lessEqual("o.total_amount", order.getEndPayAmount()); conds.lessEqual("o.total_amount", Integer.parseInt(order.getEndPayAmount()) * 100);
} }
//订单状态 //订单状态
if (StringUtils.isNoneBlank(order.getStatus())) { if (StringUtils.isNoneBlank(order.getStatus())) {
...@@ -270,12 +271,18 @@ public class OrderController { ...@@ -270,12 +271,18 @@ public class OrderController {
Date today = new Date(); Date today = new Date();
int longNum = 0; int longNum = 0;
for (Order obj : list){ for (Order obj : list){
// if (obj.getPayTime() != null && StringUtils.isBlank(obj.getConfirm())) { if (obj.getPayTime() != null && StringUtils.isBlank(obj.getConfirm())) {
// longNum = (int)(today.getTime()-obj.getPayTime().getTime()) / (1000*3600*24); longNum = (int)(today.getTime()-obj.getPayTime().getTime()) / (1000*3600*24);
// if(longNum >= 7){ if(longNum >= 7){
obj.setIsExceedSevenDay("0"); obj.setIsExceedSevenDay("0");
// } }
// } }
if (StringUtils.isNoneBlank(obj.getRemarks())) {
JSONObject remarkObj = JSONObject.parseObject(obj.getRemarks());
String payUrl = SystemConfig.p.getProperty("MOBILE_MP_DOMAIN_NAME") + "/orderPay?appid=" + mpAccountsEntity.getAppid() + //
"&tokenId=1&orderId=" + obj.getId() + "&prepayId=" + remarkObj.getString("prepay_id");
obj.setPayUrl(payUrl);
}
} }
Integer counts = orderService.count(conds, userid); Integer counts = orderService.count(conds, userid);
JSONObject rtnJson = new JSONObject(); JSONObject rtnJson = new JSONObject();
...@@ -395,11 +402,11 @@ public class OrderController { ...@@ -395,11 +402,11 @@ public class OrderController {
} }
//最终开始金额 //最终开始金额
if (StringUtils.isNoneBlank(order.getStartPayAmount())) { if (StringUtils.isNoneBlank(order.getStartPayAmount())) {
conds.greatEqual("o.total_amount", order.getStartPayAmount()); conds.greatEqual("o.total_amount", Integer.parseInt(order.getStartPayAmount()) * 100);
} }
//最终结束金额 //最终结束金额
if (StringUtils.isNoneBlank(order.getEndPayAmount())) { if (StringUtils.isNoneBlank(order.getEndPayAmount())) {
conds.lessEqual("o.total_amount", order.getEndPayAmount()); conds.lessEqual("o.total_amount", Integer.parseInt(order.getEndPayAmount()) * 100);
} }
//订单状态 //订单状态
if (StringUtils.isNoneBlank(order.getStatus())) { if (StringUtils.isNoneBlank(order.getStatus())) {
...@@ -420,7 +427,7 @@ public class OrderController { ...@@ -420,7 +427,7 @@ public class OrderController {
conds.lessEqual("DATE_FORMAT(o.create_time, '%Y-%m-%d')", order.getOrderEndTime()); conds.lessEqual("DATE_FORMAT(o.create_time, '%Y-%m-%d')", order.getOrderEndTime());
} }
List<Order> list = orderService.fetchSearchByPage(conds, sort, 0, 0); List<Order> list = orderService.fetchSearchByPage(conds, sort, 0, 0);
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
LinkedList<OrderVO> orderVOS = new LinkedList<>(); LinkedList<OrderVO> orderVOS = new LinkedList<>();
OrderVO orderVO = null; OrderVO orderVO = null;
for (Order orderObject : list) { for (Order orderObject : list) {
...@@ -429,13 +436,44 @@ public class OrderController { ...@@ -429,13 +436,44 @@ public class OrderController {
orderVO.setConsultCode(orderObject.getConsultCode()); orderVO.setConsultCode(orderObject.getConsultCode());
orderVO.setProductName(orderObject.getProductName()); orderVO.setProductName(orderObject.getProductName());
orderVO.setOrderAmount(orderObject.getOrderAmount()); orderVO.setOrderAmount(orderObject.getOrderAmount());
orderVO.setTotalAmount(orderObject.getTotalAmount()); orderVO.setTotalAmount(orderObject.getTotalAmount() != null ? orderObject.getTotalAmount() / 100 : null);
orderVO.setNickName(orderObject.getNickName()); orderVO.setNickName(orderObject.getNickName());
orderVO.setOpenid(orderObject.getOpenid()); orderVO.setAlias(orderObject.getFansAlias());
orderVO.setCourierNumber(orderObject.getCourierNumber()); orderVO.setCourierNumber(orderObject.getCourierNumber());
String payStatus = "";
switch (orderObject.getStatus()) {
case "0":
payStatus = "待确认";
break;
case "1":
payStatus = "待付款";
break;
case "2":
payStatus = "待发货";
break;
case "3":
payStatus = "待收货";
break;
case "4":
payStatus = "已完成";
break;
case "5":
payStatus = "已取消";
break;
default:
payStatus = "";
}
orderVO.setPayStatus(payStatus);
orderVO.setTradeNo(orderObject.getTradeNo()); orderVO.setTradeNo(orderObject.getTradeNo());
orderVO.setConfirm(StringUtils.isNotBlank(orderObject.getConfirm()) ? "是":"否"); orderVO.setConfirm(StringUtils.isNotBlank(orderObject.getConfirm()) ? "是":"否");
orderVO.setCreateTime(simpleDateFormat.format(orderObject.getCreateTime())); orderVO.setIsThree(StringUtils.equals(orderObject.getIsThree(), "1") ? "是":"否");
orderVO.setOpenid(orderObject.getOpenid());
orderVO.setCreateTime(orderObject.getCreateTime() != null ? simpleDateFormat.format(orderObject.getCreateTime()) : "");
orderVO.setOrderTime(orderObject.getOrderTime() != null ? simpleDateFormat.format(orderObject.getOrderTime()) : "");
orderVO.setPayTime(orderObject.getPayTime() != null ? simpleDateFormat.format(orderObject.getPayTime()) : "");
orderVO.setSendTime(orderObject.getSendExpressDateStr());
orderVO.setAcceptTime(orderObject.getAcceptExpressDateStr());
orderVO.setCencalTime(orderObject.getCancelTime()!= null ? simpleDateFormat.format(orderObject.getCancelTime()) : "");
orderVOS.add(orderVO); orderVOS.add(orderVO);
} }
ExcelKit.$Export(OrderVO.class, response).toExcel(orderVOS, "订单管理信息"); ExcelKit.$Export(OrderVO.class, response).toExcel(orderVOS, "订单管理信息");
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
<form role="form" id="myForm"> <form role="form" id="myForm">
<input name="id" value="$!{data.id}" hidden="true"/> <input name="id" value="$!{data.id}" hidden="true"/>
<div class="box-body"> <div class="box-body">
</div>
<div class="form-group form-md-line-input col-md-12"> <div class="form-group form-md-line-input col-md-12">
<label>上级分类</label> <label>上级分类</label>
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
>$!{data.description}</textarea> >$!{data.description}</textarea>
</div> </div>
</div>
<div class="box-footer"> <div class="box-footer">
#if($shiro.hasPermission("qy:productclassify:edit")) #if($shiro.hasPermission("qy:productclassify:edit"))
<input class="btn btn-primary" id="save" value="保存" type="submit"> <input class="btn btn-primary" id="save" value="保存" type="submit">
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
<form role="form" id="myForm"> <form role="form" id="myForm">
<input name="id" value="$!{data.id}" hidden="true"/> <input name="id" value="$!{data.id}" hidden="true"/>
<div class="box-body"> <div class="box-body">
</div>
<div class="form-group form-md-line-input col-md-12"> <div class="form-group form-md-line-input col-md-12">
<label>所属分类</label> <label>所属分类</label>
...@@ -251,18 +251,27 @@ ...@@ -251,18 +251,27 @@
</div> </div>
<div class="form-group form-md-line-input col-md-12"> <div class="form-group form-md-line-input col-md-12">
<label>销量</label> <label>产品税收编码</label>
<input type="text" class="form-control pull-right" <input type="text" class="form-control pull-right"
value="$!{data.reading}" maxlength="200" required value="$!{data.invoiceCode}" maxlength="200" required
name="reading" placeholder="销量" name="invoiceCode" placeholder="产品税收编码"
> >
</div> </div>
<!--<div class="form-group form-md-line-input col-md-12">-->
<!--<label>销量</label>-->
<!--<input type="text" class="form-control pull-right"-->
<!--value="$!{data.reading}" maxlength="200" required-->
<!--name="reading" placeholder="销量"-->
<!--&gt;-->
<!--</div>-->
</div>
<input type="text" style="display: none" name="_csrf" value="${_csrf.token}"/> <input type="text" style="display: none" name="_csrf" value="${_csrf.token}"/>
<input type="text" style="display: none" name="_csrf_header" value="${_csrf.headerName}"/> <input type="text" style="display: none" name="_csrf_header" value="${_csrf.headerName}"/>
<div class="box-footer"> <div class="box-footer">
#if($shiro.hasPermission("qy:product:edit")) #if($shiro.hasPermission("qy:product:edit"))
<input class="btn btn-primary" id="save" value="保存" type="submit"> <input class="btn btn-primary" id="save" value="保存" type="submit">
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
<result column="size" property="size"/> <result column="size" property="size"/>
<result column="isreading" property="isreading"/> <result column="isreading" property="isreading"/>
<result column="unit" property="unit"/> <result column="unit" property="unit"/>
<result column="invoice_code" property="invoiceCode"/>
</resultMap> </resultMap>
<sql id="sqlWhere"> <sql id="sqlWhere">
...@@ -94,7 +95,8 @@ ...@@ -94,7 +95,8 @@
reading, reading,
size, size,
isreading, isreading,
unit unit,
invoice_code
</sql> </sql>
<sql id="productList"> <sql id="productList">
...@@ -121,7 +123,8 @@ ...@@ -121,7 +123,8 @@
c.classify_name AS classifyName, c.classify_name AS classifyName,
t.product_img_detail AS productImgDetail, t.product_img_detail AS productImgDetail,
t.reading, t.reading,
t.isreading t.isreading,
t.invoice_code invoiceCode
</sql> </sql>
<insert id="save" parameterType="com.cftech.product.model.Product" useGeneratedKeys="true" <insert id="save" parameterType="com.cftech.product.model.Product" useGeneratedKeys="true"
...@@ -162,7 +165,8 @@ ...@@ -162,7 +165,8 @@
#{reading,jdbcType=VARCHAR}, #{reading,jdbcType=VARCHAR},
#{size, jdbcType=BIGINT}, #{size, jdbcType=BIGINT},
#{isreading, jdbcType=BIGINT}, #{isreading, jdbcType=BIGINT},
#{unit,jdbcType=VARCHAR} #{unit,jdbcType=VARCHAR},
#{invoiceCode,jdbcType=VARCHAR}
) )
</insert> </insert>
...@@ -210,7 +214,8 @@ ...@@ -210,7 +214,8 @@
a.update_by updateBy, a.update_by updateBy,
a.product_number productNumber, a.product_number productNumber,
a.is_rs isRs, a.is_rs isRs,
a.reading reading a.reading reading,
a.invoice_code
FROM FROM
t_aidea_product a t_aidea_product a
LEFT JOIN t_aidea_product_classify b ON a.classify_id = b.id LEFT JOIN t_aidea_product_classify b ON a.classify_id = b.id
...@@ -249,7 +254,8 @@ ...@@ -249,7 +254,8 @@
a.update_by updateBy, a.update_by updateBy,
a.product_number productNumber, a.product_number productNumber,
a.is_rs isRs, a.is_rs isRs,
a.reading reading a.reading reading,
a.invoice_code
FROM FROM
t_aidea_product a t_aidea_product a
LEFT JOIN t_aidea_product_classify b ON FIND_IN_SET(b.id,a.classify_id) LEFT JOIN t_aidea_product_classify b ON FIND_IN_SET(b.id,a.classify_id)
...@@ -357,7 +363,10 @@ ...@@ -357,7 +363,10 @@
unit = #{unit , jdbcType=VARCHAR}, unit = #{unit , jdbcType=VARCHAR},
</if> </if>
<if test="isreading != null"> <if test="isreading != null">
isreading = #{isreading , jdbcType=BIGINT} isreading = #{isreading , jdbcType=BIGINT},
</if>
<if test="invoiceCode != null">
invoice_code = #{invoiceCode , jdbcType=VARCHAR}
</if> </if>
</set> </set>
where id=#{id,jdbcType=BIGINT} where id=#{id,jdbcType=BIGINT}
...@@ -372,6 +381,5 @@ ...@@ -372,6 +381,5 @@
<include refid="productList"/> <include refid="productList"/>
FROM t_aidea_product t LEFT JOIN t_aidea_product_classify c FROM t_aidea_product t LEFT JOIN t_aidea_product_classify c
ON c.id = t.classify_id WHERE t.del_flag=0 and t.id= #{ID} ON c.id = t.classify_id WHERE t.del_flag=0 and t.id= #{ID}
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -134,6 +134,12 @@ public class Product implements Serializable { ...@@ -134,6 +134,12 @@ public class Product implements Serializable {
*/ */
@ExportConfig(value = "销量", width = 200) @ExportConfig(value = "销量", width = 200)
private String reading; private String reading;
/**
* 商品对应发票代码
*/
private String invoiceCode;
/** /**
* 单位 * 单位
*/ */
......
...@@ -142,39 +142,34 @@ ...@@ -142,39 +142,34 @@
value="$!{data.mobile}" readonly> value="$!{data.mobile}" readonly>
</div> </div>
<div class="form-group form-md-line-input col-xs-5"> <!--<div class="form-group form-md-line-input col-xs-5">-->
<label>省份</label> <!--<label>省份</label>-->
<input type="text" <!--<input type="text"-->
class="form-control" id="province" name="province" <!--class="form-control" id="province" name="province"-->
maxlength="500" placeholder="省份" <!--maxlength="500" placeholder="省份"-->
value="$!{data.province}" readonly> <!--value="$!{data.province}" readonly>-->
</div> <!--</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"> <!--<div class="form-group form-md-line-input col-xs-5">-->
<label>详细地址</label> <!--<label>城市</label>-->
<!--<input type="text"--> <!--<input type="text"-->
<!--class="form-control" id="address" name="address"--> <!--class="form-control" id="city" name="city"-->
<!--maxlength="500" placeholder="详细地址"--> <!--maxlength="500" placeholder="城市"-->
<!--value="$!{data.address}" readonly>--> <!--value="$!{data.city}" readonly>-->
<!--</div>-->
<textarea class="form-control" id="address" name="address" rows="3" readonly>$!{data.address}</textarea> <!--<div class="form-group form-md-line-input col-xs-5">-->
</div> <!--<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>-->
<!--<textarea class="form-control" id="address" name="address" rows="3" readonly>$!{data.address}</textarea>-->
<!--</div>-->
</div> </div>
</div> </div>
...@@ -215,7 +210,7 @@ ...@@ -215,7 +210,7 @@
<input type="text" <input type="text"
class="form-control" id="sendExpressDate" name="sendExpressDate" class="form-control" id="sendExpressDate" name="sendExpressDate"
maxlength="500" placeholder="发件时间" maxlength="500" placeholder="发件时间"
value="$!{data.sendExpressDate}" readonly> value="$!{data.sendExpressDateStr}" readonly>
</div> </div>
<div class="form-group form-md-line-input col-xs-5"> <div class="form-group form-md-line-input col-xs-5">
...@@ -223,7 +218,7 @@ ...@@ -223,7 +218,7 @@
<input type="text" <input type="text"
class="form-control" id="acceptExpressDate" name="acceptExpressDate" class="form-control" id="acceptExpressDate" name="acceptExpressDate"
maxlength="500" placeholder="收件时间" maxlength="500" placeholder="收件时间"
value="$!{data.acceptExpressDate}" readonly> value="$!{data.acceptExpressDateStr}" readonly>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
</div> </div>
<div class="col-xs-2"> <div class="col-xs-2">
<input type="text" class="form-control" name="waybillNo" placeholder="运单号"> <input type="text" class="form-control" name="waybillNo" placeholder="顺丰运单号">
</div> </div>
<div class="col-xs-2"> <div class="col-xs-2">
...@@ -108,14 +108,14 @@ ...@@ -108,14 +108,14 @@
<thead> <thead>
<tr> <tr>
<td hidden="true">Id</td> <td hidden="true">Id</td>
<th>物流编码</th> <th>物流编码</th>
<th>顺丰运单号</th> <th>顺丰运单号</th>
<th>订单编码</th> <th>订单编码</th>
<th>咨询单编码</th> <th>咨询单编码</th>
<th>是否打印</th> <th>是否打印</th>
<th>粉丝昵称</th> <th>粉丝昵称</th>
<th>OpenId</th> <th>OpenId</th>
<th>联系人名称</th> <th>联系人</th>
<th>联系人手机号</th> <th>联系人手机号</th>
<th>订单员</th> <th>订单员</th>
<th>收派状态</th> <th>收派状态</th>
...@@ -225,7 +225,15 @@ ...@@ -225,7 +225,15 @@
"mData": "number" "mData": "number"
}, },
{ {
"mData": "waybillNo" "mData": "waybillNo",
"mRender": function (a, b, c, d) {
if (a) {
var html = `#if($shiro.hasPermission("qy:logistics:view"))<a href="#springUrl("/a/logistics/list?mailNo=` + a + `")">` + a + `</a>#else` + a + `#end`;
} else {
return '';
}
return html;
}
}, },
{ {
"mData": "orderCode" "mData": "orderCode"
...@@ -272,7 +280,6 @@ ...@@ -272,7 +280,6 @@
{ {
"mData": "storageManageName", "mData": "storageManageName",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
console.log(a);
if (c.storageManage == '1') { if (c.storageManage == '1') {
return 'admin'; return 'admin';
} else { } else {
......
...@@ -278,7 +278,7 @@ ...@@ -278,7 +278,7 @@
od.price, od.price,
AES_DECRYPT(f.nickname, 'aideakey') nickName, AES_DECRYPT(f.nickname, 'aideakey') nickName,
cs.consult_id consultSheetCode, cs.consult_id consultSheetCode,
qyu.name storageManageName, CASE WHEN t.storage_manage = '1' THEN 'admin' ELSE qyu.name END storageManageName,
t.route_des routeDes, t.route_des routeDes,
t.filter_result filterResult, t.filter_result filterResult,
t.dest_code destCode, t.dest_code destCode,
......
...@@ -25,7 +25,7 @@ public interface WaybillService extends GenericService<Waybill> { ...@@ -25,7 +25,7 @@ public interface WaybillService extends GenericService<Waybill> {
* 调用顺丰下订单接口 * 调用顺丰下订单接口
* @param orderId * @param orderId
*/ */
JSONObject orderSendOutForWaybill(HttpServletRequest request, Long orderId); JSONObject orderSendOutForWaybill(HttpServletRequest request, Long orderId, String datas);
/** /**
* 调用顺分sdk打印面单 * 调用顺分sdk打印面单
......
...@@ -72,7 +72,7 @@ public class WaybillServiceImpl extends GenericServiceImpl<Waybill> implements W ...@@ -72,7 +72,7 @@ public class WaybillServiceImpl extends GenericServiceImpl<Waybill> implements W
@Override @Override
@Transactional @Transactional
public JSONObject orderSendOutForWaybill(HttpServletRequest request, Long orderId) { public JSONObject orderSendOutForWaybill(HttpServletRequest request, Long orderId, String datas) {
JSONObject retObj = new JSONObject(); JSONObject retObj = new JSONObject();
Long accountsId = UserUtils.getmpaccounts(request); Long accountsId = UserUtils.getmpaccounts(request);
User user = UserUtils.getUser(); User user = UserUtils.getUser();
...@@ -107,7 +107,7 @@ public class WaybillServiceImpl extends GenericServiceImpl<Waybill> implements W ...@@ -107,7 +107,7 @@ public class WaybillServiceImpl extends GenericServiceImpl<Waybill> implements W
Address address = addressService.fetchById(order.getAddressId()); Address address = addressService.fetchById(order.getAddressId());
if (address == null) { if (address == null) {
retObj.put("errorNo", 1); retObj.put("errorNo", 1);
retObj.put("errorMsg", " 收货地址不存在 ! "); retObj.put("errorMsg", " 收货地址不存在! ");
return retObj; return retObj;
} }
...@@ -147,7 +147,8 @@ public class WaybillServiceImpl extends GenericServiceImpl<Waybill> implements W ...@@ -147,7 +147,8 @@ public class WaybillServiceImpl extends GenericServiceImpl<Waybill> implements W
if (closeableHttpEntity != null && closeableHttpEntity.getCode() == 200) { if (closeableHttpEntity != null && closeableHttpEntity.getCode() == 200) {
waybill.setDescription(msgDataObj.toString()); waybill.setDescription(msgDataObj.toString());
if (closeableHttpEntity.getRetObj().containsKey("apiResultCode") && StringUtils.equals(closeableHttpEntity.getRetObj().getString("apiResultCode"), "A1000")) { if (closeableHttpEntity.getRetObj().containsKey("apiResultCode") &&
StringUtils.equals(closeableHttpEntity.getRetObj().getString("apiResultCode"), "A1000")) {
JSONObject apiResultData = closeableHttpEntity.getRetObj().getJSONObject("apiResultData"); JSONObject apiResultData = closeableHttpEntity.getRetObj().getJSONObject("apiResultData");
if (apiResultData.getBoolean("success")) { if (apiResultData.getBoolean("success")) {
JSONObject msgData = apiResultData.getJSONObject("msgData"); JSONObject msgData = apiResultData.getJSONObject("msgData");
...@@ -178,6 +179,27 @@ public class WaybillServiceImpl extends GenericServiceImpl<Waybill> implements W ...@@ -178,6 +179,27 @@ public class WaybillServiceImpl extends GenericServiceImpl<Waybill> implements W
waybill.setWaybillRemark(msgData.getString("remark"));//不可派发原因 waybill.setWaybillRemark(msgData.getString("remark"));//不可派发原因
//更新出库批次号
// if (StringUtils.isNoneBlank(datas) && JSONObject.parseArray(datas).size() > 0) {
// JSONArray arr = JSONObject.parseArray(datas);
//
// Conds orderDesConds = new Conds();
// orderDesConds.equal("d.del_flag", Constants.DEL_FLAG_0);
// orderDesConds.equal("d.order_id", orderId);
// List<OrderDetails> orderDetailsList = orderDetailsService.fetchSearchByPage(orderDesConds, null, 0, 0);
// for (OrderDetails orderDetails : orderDetailsList) {
// for (int i=0; i< arr.size(); i++) {
// JSONObject obj = arr.getJSONObject(i);
// if (StringUtils.equals(orderDetails.getDrugsCode(), obj.getString("productCode"))) {
// orderDetails.setDrugsName(obj.getString("productName"));
// orderDetails.setDrugsMateriel(obj.getString("batchNo"));
// orderDetailsService.update(orderDetails);
// continue;
// }
// }
// }
// }
waybillMapper.save(waybill); waybillMapper.save(waybill);
orderService.update(order); orderService.update(order);
......
...@@ -87,7 +87,8 @@ public class ExpressOrderInfoUtils { ...@@ -87,7 +87,8 @@ public class ExpressOrderInfoUtils {
JSONArray cargoInfoDtoList = new JSONArray(); JSONArray cargoInfoDtoList = new JSONArray();
for (OrderDetails ord: orderDetails) { for (OrderDetails ord: orderDetails) {
JSONObject cargoInfo = new JSONObject(); JSONObject cargoInfo = new JSONObject();
cargoInfo.put("cargo", ord.getCommonName()); //cargoInfo.put("cargo", ord.getCommonName());
cargoInfo.put("cargo", "***");
cargoInfo.put("cargoCount", ord.getDrugsNum()); cargoInfo.put("cargoCount", ord.getDrugsNum());
cargoInfo.put("cargoUnit", "盒"); cargoInfo.put("cargoUnit", "盒");
cargoInfo.put("remark", "医药物品,请小心轻放!"); cargoInfo.put("remark", "医药物品,请小心轻放!");
...@@ -157,6 +158,13 @@ public class ExpressOrderInfoUtils { ...@@ -157,6 +158,13 @@ public class ExpressOrderInfoUtils {
//waybill.put("isReturnRoutelabel", "0");//是否返回路由标签: 默认0, 1:返回路由标签, 0:不返回 //waybill.put("isReturnRoutelabel", "0");//是否返回路由标签: 默认0, 1:返回路由标签, 0:不返回
//waybill.put("podModelAddress", "url");//签单返回范本地址 //waybill.put("podModelAddress", "url");//签单返回范本地址
//增值服务签收口令
JSONArray serviceArray = new JSONArray();
JSONObject serviceObj = new JSONObject();
serviceObj.put("name", "IN59");
serviceArray.add(serviceObj);
waybill.put("serviceList", serviceArray);
//特殊需求药品,需冷冻、冷藏 //特殊需求药品,需冷冻、冷藏
if (StringUtils.isNoneBlank(waybillObj.getExpressTypeId())) { if (StringUtils.isNoneBlank(waybillObj.getExpressTypeId())) {
waybill.put("expressTypeId", waybillObj.getExpressTypeId());//快件产品类别Id 12医药类 冷冻 冷藏 waybill.put("expressTypeId", waybillObj.getExpressTypeId());//快件产品类别Id 12医药类 冷冻 冷藏
...@@ -167,7 +175,8 @@ public class ExpressOrderInfoUtils { ...@@ -167,7 +175,8 @@ public class ExpressOrderInfoUtils {
JSONArray cargoDetails = new JSONArray(); JSONArray cargoDetails = new JSONArray();
for (OrderDetails orderd: orderDetails) { for (OrderDetails orderd: orderDetails) {
JSONObject cargo = new JSONObject(); JSONObject cargo = new JSONObject();
cargo.put("name", orderd.getProductName());//商品名称 //cargo.put("name", orderd.getProductName());//商品名称
cargo.put("name", "药品");//商品名称
cargo.put("count", orderd.getDrugsNum());//商品数量 cargo.put("count", orderd.getDrugsNum());//商品数量
cargo.put("unit", "盒");//商品单位 cargo.put("unit", "盒");//商品单位
cargo.put("amount", orderd.getPrice());//商品价格 cargo.put("amount", orderd.getPrice());//商品价格
......
...@@ -2,6 +2,7 @@ package com.cftech.waybill.web; ...@@ -2,6 +2,7 @@ package com.cftech.waybill.web;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.cftech.accounts.service.MpAccountsService; import com.cftech.accounts.service.MpAccountsService;
import com.cftech.core.util.DateFormatUtils;
import com.cftech.order.model.Order; import com.cftech.order.model.Order;
import com.cftech.order.service.OrderService; import com.cftech.order.service.OrderService;
import com.cftech.orderdetail.model.OrderDetails; import com.cftech.orderdetail.model.OrderDetails;
...@@ -70,6 +71,25 @@ public class WaybillController { ...@@ -70,6 +71,25 @@ public class WaybillController {
public String form(HttpServletRequest request, String id, Model model) { public String form(HttpServletRequest request, String id, Model model) {
if (!StringUtils.isEmpty(id)) { if (!StringUtils.isEmpty(id)) {
Waybill waybill = waybillService.fetchByWayBillId(id); Waybill waybill = waybillService.fetchByWayBillId(id);
if (waybill != null) {
StringBuilder sb = new StringBuilder();
if (StringUtils.isNoneBlank(waybill.getContact())) {
sb.append(waybill.getContact());
waybill.setContact(sb.replace(1,2, "*").toString());
sb.setLength(0);
}
if (StringUtils.isNoneBlank(waybill.getMobile())) {
sb.append(waybill.getMobile());
waybill.setMobile(sb.replace(3, 7, "****").toString());
sb.setLength(0);
}
if (waybill.getSendExpressDate() != null) {
waybill.setSendExpressDateStr(DateFormatUtils.getDateFormat(waybill.getSendExpressDate(), "yyyy-MM-dd HH:ss"));
}
if (waybill.getAcceptExpressDate() != null) {
waybill.setAcceptExpressDateStr(DateFormatUtils.getDateFormat(waybill.getAcceptExpressDate(), "yyyy-MM-dd HH:ss"));
}
}
model.addAttribute("data", waybill); model.addAttribute("data", waybill);
} }
return "waybill/waybillform"; return "waybill/waybillform";
...@@ -247,8 +267,8 @@ public class WaybillController { ...@@ -247,8 +267,8 @@ public class WaybillController {
*/ */
@RequestMapping("/orderSendOutForWaybill") @RequestMapping("/orderSendOutForWaybill")
@ResponseBody @ResponseBody
public JSONObject orderSendOutForWaybill(HttpServletRequest request, Long orderId) { public JSONObject orderSendOutForWaybill(HttpServletRequest request, Long orderId, String datas) {
return waybillService.orderSendOutForWaybill(request, orderId); return waybillService.orderSendOutForWaybill(request, orderId, datas);
} }
/** /**
......
##JDBC Global Setting ##JDBC Global Setting
#\u5916\u7F51 #\u5916\u7F51
jdbc.driver=com.mysql.jdbc.Driver jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://58.220.99.124:3306/aidea_wechat?useSSL=false&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true #jdbc.url=jdbc:mysql://58.220.99.124:3306/aidea_wechat?useSSL=false&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
jdbc.username=root
jdbc.password=Aidea@2017
#\u5185\u7F51
#jdbc.url=jdbc:mysql://172.18.10.40:3306/aidea_wechat?useSSL=false&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
#jdbc.username=root #jdbc.username=root
#jdbc.password=Aidea@2017 #jdbc.password=Aidea@2017
#\u5185\u7F51
jdbc.url=jdbc:mysql://172.18.10.40:3306/aidea_wechat?useSSL=false&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
jdbc.username=root
jdbc.password=Aidea@2017
##DataSource Global Setting ##DataSource Global Setting
......
...@@ -50,7 +50,7 @@ LOG_URL=http://www.michang-tech.com.cn:6989/log/addlog ...@@ -50,7 +50,7 @@ LOG_URL=http://www.michang-tech.com.cn:6989/log/addlog
#\u6821\u9A8C\u5151\u6362\u5BC6\u7801KEY #\u6821\u9A8C\u5151\u6362\u5BC6\u7801KEY
MEMBER_PASSWORD_KEY=DONGCHANGINT9527; MEMBER_PASSWORD_KEY=DONGCHANGINT9527;
list.refreshtoken=true list.refreshtoken=true
jwt.domain=pd.shxrtech.com jwt.domain=localhost
#\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD #\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
jwt.duration=86400000 jwt.duration=86400000
#\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u03AAtrue #\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u03AAtrue
...@@ -60,9 +60,9 @@ quartz.isCluster=true ...@@ -60,9 +60,9 @@ quartz.isCluster=true
#\u987A\u4E30\u7269\u6D41\u914D\u7F6E\u4FE1\u606F\u53C2\u6570 #\u987A\u4E30\u7269\u6D41\u914D\u7F6E\u4FE1\u606F\u53C2\u6570
#\u987A\u4E30\u5BA2\u6237\u7F16\u7801 #\u987A\u4E30\u5BA2\u6237\u7F16\u7801
sf.partnerID=NKDYFr sf.partnerID=XXYZ
#\u987A\u4E30\u5BA2\u6237\u6821\u9A8C\u7801 #\u987A\u4E30\u5BA2\u6237\u6821\u9A8C\u7801
sf.checkWord=ExAMu7ADrjDeUMJCKOAf45Ywgo2q12Sd sf.checkWord=5Nhuavqk0JG7zTYLtPKq7JpnceuekRcH
#\u987A\u4E30\u6708\u7ED3\u5361\u53F7 #\u987A\u4E30\u6708\u7ED3\u5361\u53F7
sf.monthlyCard=7551234567 sf.monthlyCard=7551234567
...@@ -78,7 +78,12 @@ KAIHUHANG_ADDRESS=\u6C5F\u82CF\u94F6\u884C\u626C\u5DDE\u5510\u57CE\u652F\u884C 9 ...@@ -78,7 +78,12 @@ KAIHUHANG_ADDRESS=\u6C5F\u82CF\u94F6\u884C\u626C\u5DDE\u5510\u57CE\u652F\u884C 9
CLERK=\u5415\u5029 CLERK=\u5415\u5029
CHECKER=\u7530\u59DD CHECKER=\u7530\u59DD
PAYEE=\u6C6A\u8A00\u52C7 PAYEE=\u6C6A\u8A00\u52C7
#\u5F00\u53D1\u7968\u63A5\u53E3
INVOICE_API=nuonuo.ElectronInvoice.requestBillingNew INVOICE_API=nuonuo.ElectronInvoice.requestBillingNew
#\u67E5\u8BE2\u53D1\u7968\u63A5\u53E3
INVOICE_QUERY_API=nuonuo.ElectronInvoice.queryInvoiceResult
#\u90AE\u7BB1\u63A8\u9001\u63A5\u53E3
INVOICE_SEND_EMAIL_API=nuonuo.ElectronInvoice.deliveryInvoice
INVOICE_URL=https://sandbox.nuonuocs.cn/open/v1/services INVOICE_URL=https://sandbox.nuonuocs.cn/open/v1/services
REGION_LONG_ID=0,1,5, REGION_LONG_ID=0,1,5,
......
...@@ -50,13 +50,13 @@ LOG_URL=http://www.michang-tech.com.cn:6989/log/addlog ...@@ -50,13 +50,13 @@ LOG_URL=http://www.michang-tech.com.cn:6989/log/addlog
#\u6821\u9A8C\u5151\u6362\u5BC6\u7801KEY #\u6821\u9A8C\u5151\u6362\u5BC6\u7801KEY
MEMBER_PASSWORD_KEY=DONGCHANGINT9527; MEMBER_PASSWORD_KEY=DONGCHANGINT9527;
list.refreshtoken=true list.refreshtoken=true
jwt.domain=localhost jwt.domain=pe.aidea.com.cn
#\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD #\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
jwt.duration=86400000 jwt.duration=86400000
#\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u03AAtrue #\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u03AAtrue
security.secure=false security.secure=false
#\u662F\u5426\u96C6\u7FA4 master\u4E3Atrue #\u662F\u5426\u96C6\u7FA4 master\u4E3Atrue
quartz.isCluster=true quartz.isCluster=false
#\u987A\u4E30\u7269\u6D41\u914D\u7F6E\u4FE1\u606F\u53C2\u6570 #\u987A\u4E30\u7269\u6D41\u914D\u7F6E\u4FE1\u606F\u53C2\u6570
#\u987A\u4E30\u5BA2\u6237\u7F16\u7801 #\u987A\u4E30\u5BA2\u6237\u7F16\u7801
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
# Redis\uFFFD\uFFFD\uFFFD\u077F\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u012C\uFFFD\uFFFD\u03AA0\uFFFD\uFFFD # Redis\uFFFD\uFFFD\uFFFD\u077F\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u012C\uFFFD\uFFFD\u03AA0\uFFFD\uFFFD
spring.redis.database=10 spring.redis.database=10
# Redis\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u05B7 # Redis\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u05B7
spring.redis.host=58.220.99.124 #spring.redis.host=58.220.99.124
# \u5185\u7F51Reids # \u5185\u7F51Reids
#spring.redis.host=172.18.10.44 spring.redis.host=172.18.10.44
# Redis\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u04F6\u02FF\uFFFD # Redis\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u04F6\u02FF\uFFFD
spring.redis.port=6379 spring.redis.port=6379
# Redis\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uB8E8\u012C\uFFFD\uFFFD\u03AA\uFFFD\u0563\uFFFD # Redis\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uB8E8\u012C\uFFFD\uFFFD\u03AA\uFFFD\u0563\uFFFD
......
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
//,iframeCssUrl: URL + '/themes/iframe.css' //给编辑器内部引入一个css文件 //,iframeCssUrl: URL + '/themes/iframe.css' //给编辑器内部引入一个css文件
//,initialFrameWidth:1000 //初始化编辑器宽度,默认1000 ,initialFrameWidth: '90%' //初始化编辑器宽度,默认1000
,initialFrameHeight:320 //初始化编辑器高度,默认320 ,initialFrameHeight:320 //初始化编辑器高度,默认320
//,readonly : false //编辑器初始化结束后,编辑区域是否是只读的,默认是false //,readonly : false //编辑器初始化结束后,编辑区域是否是只读的,默认是false
......
...@@ -293,6 +293,7 @@ public class CfarticleController { ...@@ -293,6 +293,7 @@ public class CfarticleController {
@RequestMapping(value = "/mergeArticles",method = {RequestMethod.POST}) @RequestMapping(value = "/mergeArticles",method = {RequestMethod.POST})
@ResponseBody @ResponseBody
public JSONObject mergeArticles(String articles,HttpServletRequest request,String domain) throws WexinReqException, ParserException, IOException { public JSONObject mergeArticles(String articles,HttpServletRequest request,String domain) throws WexinReqException, ParserException, IOException {
domain = "https://pe.aidea.com.cn";
JSONObject rtnJson = new JSONObject(); JSONObject rtnJson = new JSONObject();
Long accountsId = UserUtils.getmpaccounts(request); Long accountsId = UserUtils.getmpaccounts(request);
Conds conds = new Conds(); Conds conds = new Conds();
......
...@@ -148,6 +148,11 @@ ...@@ -148,6 +148,11 @@
<script src="dist/js/app.min.js"></script> <script src="dist/js/app.min.js"></script>
<script type="text/javascript" <script type="text/javascript"
src="plugins/jquery-validation/js/jquery.validate.min.js"></script> src="plugins/jquery-validation/js/jquery.validate.min.js"></script>
<script>
var csrfheader = {name: '_csrf_header', value: '${_csrf.headerName}'};
var csrftoken = {name: '_csrf', value: '${_csrf.token}'};
</script>
<!-- AdminLTE for demo purposes --> <!-- AdminLTE for demo purposes -->
<script src="common/js/cfapp.js"></script> <script src="common/js/cfapp.js"></script>
<script> <script>
...@@ -318,7 +323,9 @@ ...@@ -318,7 +323,9 @@
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "#springUrl('/a/materialCategory/delete')", url: "#springUrl('/a/materialCategory/delete')",
data: {id: data}, data: {id: data,
csrfheader: csrfheader.value,
_csrf: csrftoken.value},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.errorNo == 0) { if (data.errorNo == 0) {
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<select id="count" parameterType="java.util.Map" resultType="java.lang.Integer"> <select id="count" parameterType="java.util.Map" resultType="java.lang.Integer">
SELECT COUNT(1) FROM wx_material_category SELECT COUNT(1) FROM wx_material_category
<include refid="sqlWhere"/> <include refid="sqlWhere"/>
and instr(parent_ids,'${pId},')>0 and parent_id = ${pId}
</select> </select>
<select id="fetchSearchByPage" parameterType="java.util.Map" resultMap="resultMap"> <select id="fetchSearchByPage" parameterType="java.util.Map" resultMap="resultMap">
......
...@@ -16,7 +16,14 @@ import java.util.List; ...@@ -16,7 +16,14 @@ import java.util.List;
public interface MaterialCategoryService extends GenericService<MaterialCategory> { public interface MaterialCategoryService extends GenericService<MaterialCategory> {
List<MaterialCategory> fetchSearchByPage(Long parentId, Conds conds, Sort sort, int page, int pageSize); List<MaterialCategory> fetchSearchByPage(Long parentId, Conds conds, Sort sort, int page, int pageSize);
List<MaterialCategory> fetchTreeByPage(Conds conds, Sort sort, int page, int pageSize); List<MaterialCategory> fetchTreeByPage(Conds conds, Sort sort, int page, int pageSize);
int count(Long parentId, Conds conds); int count(Long parentId, Conds conds);
/**
* 删除分类以及对应分类下图片
* @param id
*/
void deleteAndFile(String id);
} }
...@@ -7,9 +7,11 @@ import com.cftech.core.sql.Sort; ...@@ -7,9 +7,11 @@ import com.cftech.core.sql.Sort;
import com.cftech.cos.uploader.category.dao.MaterialCategoryMapper; import com.cftech.cos.uploader.category.dao.MaterialCategoryMapper;
import com.cftech.cos.uploader.category.model.MaterialCategory; import com.cftech.cos.uploader.category.model.MaterialCategory;
import com.cftech.cos.uploader.category.service.MaterialCategoryService; import com.cftech.cos.uploader.category.service.MaterialCategoryService;
import com.cftech.cos.uploader.service.MaterialUploadService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -24,6 +26,9 @@ import java.util.Map; ...@@ -24,6 +26,9 @@ import java.util.Map;
@Service("materialCategoryService") @Service("materialCategoryService")
public class MaterialCategoryServiceImpl extends GenericServiceImpl<MaterialCategory> implements MaterialCategoryService { public class MaterialCategoryServiceImpl extends GenericServiceImpl<MaterialCategory> implements MaterialCategoryService {
@Autowired
private MaterialUploadService materialUploadService;
@Autowired @Autowired
@Qualifier("materialCategoryMapper") @Qualifier("materialCategoryMapper")
private MaterialCategoryMapper papercategoryMapper; private MaterialCategoryMapper papercategoryMapper;
...@@ -67,4 +72,15 @@ public class MaterialCategoryServiceImpl extends GenericServiceImpl<MaterialCate ...@@ -67,4 +72,15 @@ public class MaterialCategoryServiceImpl extends GenericServiceImpl<MaterialCate
params.put("conds", conds); params.put("conds", conds);
return papercategoryMapper.count(params); return papercategoryMapper.count(params);
} }
@Transactional
@Override
public void deleteAndFile(String id) {
try {
papercategoryMapper.delete(id);
materialUploadService.deleteFormMaterial(id);
} catch (Exception e) {
e.printStackTrace();
}
}
} }
\ No newline at end of file
...@@ -156,14 +156,15 @@ public class MaterialCategoryController { ...@@ -156,14 +156,15 @@ public class MaterialCategoryController {
JSONObject rtnJosn = new JSONObject(); JSONObject rtnJosn = new JSONObject();
Conds conds = new Conds(); Conds conds = new Conds();
conds.equal("del_flag", Constants.DEL_FLAG_0); conds.equal("del_flag", Constants.DEL_FLAG_0);
conds.equal("create_by", user.getId()); //conds.equal("create_by", user.getId());
Integer counts = materialCategoryService.count(Long.valueOf(id), conds); Integer counts = materialCategoryService.count(Long.valueOf(id), conds);
if (counts > 0) { if (counts > 0) {
rtnJosn.put("errorNo", 2); rtnJosn.put("errorNo", 2);
rtnJosn.put("errorMsg", "还有下级分类未删除"); rtnJosn.put("errorMsg", "还有下级分类未删除");
} else { } else {
try { try {
materialCategoryService.delete(id); materialCategoryService.deleteAndFile(id);
rtnJosn.put("errorNo", 0); rtnJosn.put("errorNo", 0);
} catch (Exception e) { } catch (Exception e) {
rtnJosn.put("errorNo", 1); rtnJosn.put("errorNo", 1);
......
...@@ -17,4 +17,11 @@ public interface MaterialUploadMapper extends GenericDao<Material> { ...@@ -17,4 +17,11 @@ public interface MaterialUploadMapper extends GenericDao<Material> {
Map<String,Object> fetchSeaechByNumber(Map<String, Object> params); Map<String,Object> fetchSeaechByNumber(Map<String, Object> params);
List<Material> fetchSearchByPageVo(Map<String,Object> params); List<Material> fetchSearchByPageVo(Map<String,Object> params);
int countVo(Map<String,Object> params); int countVo(Map<String,Object> params);
/**
* 通过分类id删除分类以及分类下图片
* @param id
* @return
*/
int deleteFormMaterial(String id);
} }
\ No newline at end of file
...@@ -127,12 +127,16 @@ ...@@ -127,12 +127,16 @@
<select id="fetchSeaechByNumber" parameterType="java.util.Map" resultType="java.util.Map"> <select id="fetchSeaechByNumber" parameterType="java.util.Map" resultType="java.util.Map">
select substring_index(title,'-', 1) prefix,substring_index(title,'-', -1) number from wx_material w select substring_index(title,'-', 1) prefix,substring_index(title,'-', -1) number from wx_material w
where substring_index(title,'-', 1)=#{titlePrefix} and del_flag=0 where substring_index(title,'-', 1)=#{titlePrefix} and del_flag=0
order by substring_index(title,'-', -1) desc order by substring_index(title,'-', -1) desc
limit 0,1 limit 0,1
</select> </select>
<update id="delete" parameterType="java.lang.Long"> <update id="delete" parameterType="java.lang.Long">
update wx_material set del_flag=1 where id=#{id,jdbcType=BIGINT} update wx_material set del_flag = 1 where id = #{id,jdbcType=BIGINT}
</update>
<update id="deleteFormMaterial" parameterType="java.lang.Long">
update wx_material set del_flag = 1 where categoryid = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>
\ No newline at end of file
...@@ -21,4 +21,11 @@ public interface MaterialUploadService extends GenericService<Material> { ...@@ -21,4 +21,11 @@ public interface MaterialUploadService extends GenericService<Material> {
List<Material> fetchSearchByPageVo(Long pId,Conds conds, Sort sort,int page,int pageSize); List<Material> fetchSearchByPageVo(Long pId,Conds conds, Sort sort,int page,int pageSize);
int countVo(Long pId,Conds conds); int countVo(Long pId,Conds conds);
/**
* 通过分类id删除分类以及分类下图片
* @param id
* @return
*/
int deleteFormMaterial(String id);
} }
...@@ -55,4 +55,9 @@ public class MaterialUploadServiceImpl extends GenericServiceImpl<Material> impl ...@@ -55,4 +55,9 @@ public class MaterialUploadServiceImpl extends GenericServiceImpl<Material> impl
params.put("pId", pId); params.put("pId", pId);
return materialUploadMapper.countVo(params); return materialUploadMapper.countVo(params);
} }
@Override
public int deleteFormMaterial(String id) {
return materialUploadMapper.deleteFormMaterial(id);
}
} }
\ No newline at end of file
...@@ -267,7 +267,7 @@ ...@@ -267,7 +267,7 @@
"aTargets": [2], "aTargets": [2],
"mData": "sex", "mData": "sex",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
if (a == 0) { if (a == 2) {
return '女' return '女'
} else if (a == 1) { } else if (a == 1) {
return '男'; return '男';
...@@ -301,12 +301,18 @@ ...@@ -301,12 +301,18 @@
"aTargets": [4], "aTargets": [4],
"mData": "name", "mData": "name",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
if (a == '' || a == null) {
return '';
}
return a.slice(0, 1) + '*' + a.slice(2, a.length); return a.slice(0, 1) + '*' + a.slice(2, a.length);
} }
}, { }, {
"aTargets": [5], "aTargets": [5],
"mData": "phone", "mData": "phone",
"mRender": function (a, b, c, d) { "mRender": function (a, b, c, d) {
if (a == '' || a == null) {
return '';
}
return a.slice(0, 3) + '****' + a.slice(7); return a.slice(0, 3) + '****' + a.slice(7);
} }
}, { }, {
......
...@@ -157,7 +157,7 @@ public class MemberServiceImpl extends GenericServiceImpl<Member> implements Mem ...@@ -157,7 +157,7 @@ public class MemberServiceImpl extends GenericServiceImpl<Member> implements Mem
List<MemberVO> memberVOS = memberMapper.memberFormation(memberVO.getOpenid()); List<MemberVO> memberVOS = memberMapper.memberFormation(memberVO.getOpenid());
if (memberVOS == null || memberVOS.size() == 0) { if (memberVOS == null || memberVOS.size() == 0) {
Member member = new Member(); Member member = new Member();
memberVO.setNumber(codingruleUtils.getNumber(accounts.getId(), Member.class.getName())); member.setNumber(codingruleUtils.getNumber(accounts.getId(), Member.class.getName()));
member.setOpenId(memberVO.getOpenid()); member.setOpenId(memberVO.getOpenid());
member.setName(memberVO.getMemberName()); member.setName(memberVO.getMemberName());
member.setSex(Long.parseLong(memberVO.getSex())); member.setSex(Long.parseLong(memberVO.getSex()));
......
...@@ -565,13 +565,11 @@ public class CoreService { ...@@ -565,13 +565,11 @@ public class CoreService {
MpFanssEntity fannsEntity = new MpFanssEntity(); MpFanssEntity fannsEntity = new MpFanssEntity();
//增加粉丝别名 //增加粉丝别名
if (fansList != null && fansList.size() > 0) { if (fansList != null && fansList.size() > 0 && StringUtils.isNoneBlank(fansList.get(0).getStore())) {
if (StringUtils.isNoneBlank(fansList.get(0).getStore())) {
fannsEntity.setStore(fansList.get(0).getStore()); fannsEntity.setStore(fansList.get(0).getStore());
} else { } else {
fannsEntity.setStore(codingruleUtils.getAlias()); fannsEntity.setStore(codingruleUtils.getAlias());
} }
}
fannsEntity.setHeadimgurl(user.getHeadimgurl()); fannsEntity.setHeadimgurl(user.getHeadimgurl());
fannsEntity.setCity(user.getCity()); fannsEntity.setCity(user.getCity());
...@@ -592,7 +590,6 @@ public class CoreService { ...@@ -592,7 +590,6 @@ public class CoreService {
fannsEntity.setTaglist(tags); fannsEntity.setTaglist(tags);
mpFanssService.insert(fannsEntity); mpFanssService.insert(fannsEntity);
} catch (WexinReqException e) { } catch (WexinReqException e) {
// TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} }
} }
......
...@@ -91,15 +91,18 @@ public class OrgUnitController { ...@@ -91,15 +91,18 @@ public class OrgUnitController {
model.addAttribute("parentName", parentOrgName); model.addAttribute("parentName", parentOrgName);
model.addAttribute("accountId", orgUnit.getAccountsId()); model.addAttribute("accountId", orgUnit.getAccountsId());
conds.equal("accounts_id", orgUnit.getAccountsId()); conds.equal("accounts_id", orgUnit.getAccountsId());
} else { } else {//新增
if (parentId.equals("0")) { if (parentId.equals("0")) {
OrgUnit orgUnit = new OrgUnit(); OrgUnit parentUnit = new OrgUnit();
orgUnit.setParentId(0L); parentUnit.setParentId(0L);
model.addAttribute("data", orgUnit); model.addAttribute("data", parentUnit);
model.addAttribute("parentName", rootOrgName); model.addAttribute("parentName", rootOrgName);
} else { } else {
OrgUnit orgUnit = orgUnitService.fetchById(parentId); OrgUnit orgUnit = orgUnitService.fetchById(parentId);
model.addAttribute("data", orgUnit); OrgUnit parentUnit = new OrgUnit();
parentUnit.setParentId(Long.valueOf(parentId));
parentUnit.setParentName(orgUnit.getOrgName());
model.addAttribute("data", parentUnit);
model.addAttribute("parentName", orgUnit.getOrgName()); model.addAttribute("parentName", orgUnit.getOrgName());
} }
model.addAttribute("accountId", accountsId); model.addAttribute("accountId", accountsId);
......
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