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

Aidea product update by Strive Date 2020-12-25

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