Commit 13b79a44 authored by 谢希宇's avatar 谢希宇

Submit by Strive

Submit Date 2021/03/10
parent bba6ff3c
...@@ -229,9 +229,9 @@ ...@@ -229,9 +229,9 @@
i.create_time invoiceCreateTime, i.create_time invoiceCreateTime,
i.invoice_code invoiceCode, i.invoice_code invoiceCode,
i.invoice_num invoiceNum, i.invoice_num invoiceNum,
t.order_amount orderAmount, o.order_amount orderAmount,
t.image_url imageUrl, i.image_url imageUrl,
t.pdf_url pdfUrl i.pdf_url pdfUrl
FROM FROM
t_order o t_order o
LEFT JOIN t_order_details d ON d.order_id = o.id LEFT JOIN t_order_details d ON d.order_id = o.id
......
...@@ -276,7 +276,7 @@ ...@@ -276,7 +276,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>openid</th>--> <!--<th>openid</th>-->
......
...@@ -298,7 +298,7 @@ ...@@ -298,7 +298,7 @@
</select> </select>
<select id="count" parameterType="java.util.Map" resultType="java.lang.Integer"> <select id="count" parameterType="java.util.Map" resultType="java.lang.Integer">
SELECT IFNULL(SUM(col), 0) SELECT COUNT(1)
FROM ( FROM (
SELECT COUNT(1) col SELECT COUNT(1) col
FROM t_order o FROM t_order o
...@@ -313,25 +313,24 @@ ...@@ -313,25 +313,24 @@
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"/>
<if test="userid != null"> AND (o.service_id = ${userid} or o.doctor_id =${userid} or o.clerk_id = ${userid}) </if> <if test="userid != null"> AND (o.service_id = ${userid} or o.doctor_id =${userid} or o.clerk_id = ${userid}) </if>
<if test="userid != null"> AND (o.service_id = ${userid} or o.doctor_id =${userid} or o.clerk_id = ${userid}) </if> GROUP BY o.id
GROUP BY o.id <if test="orderAmount != null or payAmount != null">
<if test="orderAmount != null or payAmount != null"> HAVING 1=1
HAVING 1=1 <choose>
<choose> <when test="orderAmount == 6">
<when test="orderAmount == 6"> AND drugsNum >= ${orderAmount}
AND drugsNum >= ${orderAmount} </when>
</when> <when test="payAmount == 6">
<when test="payAmount == 6"> AND drugsNum >= ${payAmount}
AND drugsNum >= ${payAmount} </when>
</when> <when test="orderAmount != 6">
<when test="orderAmount != 6"> AND drugsNum = ${orderAmount}
AND drugsNum = ${orderAmount} </when>
</when> <when test="payAmount != 6">
<when test="payAmount != 6"> AND drugsNum = ${payAmount}
AND drugsNum = ${payAmount} </when>
</when> </choose>
</choose> </if>
</if>
) duals ) duals
</select> </select>
......
...@@ -542,7 +542,10 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order ...@@ -542,7 +542,10 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
order.setPayTime(date); order.setPayTime(date);
} }
if (orderMapper.update(order) > 0) { if (orderMapper.update(order) > 0) {
couponrecordService.sendCouponRecord(order.getOpenid(), order.getAccountsId()); //非三期用户才能发券
if (isThreeUsers(order.getOpenid()) == 0) {
couponrecordService.sendCouponRecord(order.getOpenid(), order.getAccountsId());
}
sendQyWechatMassage(order.getId()); sendQyWechatMassage(order.getId());
return WechatPayUtils.retSucXml; return WechatPayUtils.retSucXml;
} }
......
...@@ -66,7 +66,8 @@ public class InvoiceUtil { ...@@ -66,7 +66,8 @@ public class InvoiceUtil {
JSONObject order = new JSONObject(); JSONObject order = new JSONObject();
order.put("terminalNumber", "");//终端号(开票终端号,只能 为空或数字) order.put("terminalNumber", "");//终端号(开票终端号,只能 为空或数字)
//购方电话 非必传 //购方电话 非必传
order.put("buyerTel", orderObj.getMemberPhone()); order.put("buyerTel", StringUtils.isNoneBlank(orderObj.getMemberPhone()) ? "": //
orderObj.getMemberPhone().substring(0,3) + "****" + orderObj.getMemberPhone().substring(7, orderObj.getMemberPhone().length()));
//清单标志:非清单:0;清单:1,默认:0 非必传 //清单标志:非清单:0;清单:1,默认:0 非必传
order.put("listFlag", "0"); order.put("listFlag", "0");
//推送方式:-1,不推送;0,邮箱;1,手机(默认);2,邮箱、手机 非必填 //推送方式:-1,不推送;0,邮箱;1,手机(默认);2,邮箱、手机 非必填
...@@ -82,7 +83,8 @@ public class InvoiceUtil { ...@@ -82,7 +83,8 @@ public class InvoiceUtil {
//收款人 非必填 //收款人 非必填
order.put("payee", SystemConfig.p.getProperty("PAYEE")); order.put("payee", SystemConfig.p.getProperty("PAYEE"));
//购方地址 非必填 //购方地址 非必填
order.put("buyerAddress", orderObj.getAddressDes()); order.put("buyerAddress", StringUtils.isNoneBlank(orderObj.getAddressDes()) ? "": //
orderObj.getAddressDes().substring(0,3) + "****" + orderObj.getAddressDes().substring(7, orderObj.getMemberPhone().length()));
//购方税号(企业要填,个人可为空) //购方税号(企业要填,个人可为空)
if (StringUtils.isNotBlank(unitTax)){ if (StringUtils.isNotBlank(unitTax)){
order.put("buyerTaxNum", unitTax); order.put("buyerTaxNum", unitTax);
...@@ -107,7 +109,7 @@ public class InvoiceUtil { ...@@ -107,7 +109,7 @@ public class InvoiceUtil {
if(type.equals("0")){ if(type.equals("0")){
order.put("buyerName", "个人"); order.put("buyerName", "个人");
}else{ }else{
order.put("buyerName", "企业名称"); order.put("buyerName", invoiceTitle);
} }
// 订单时间 必填 // 订单时间 必填
order.put("invoiceDate", orderObj.getCreateTimeStr()); order.put("invoiceDate", orderObj.getCreateTimeStr());
...@@ -200,4 +202,10 @@ public class InvoiceUtil { ...@@ -200,4 +202,10 @@ public class InvoiceUtil {
return result; return result;
} }
public static void main(String[] args) {
String aaa= "15800815547";
aaa= aaa.substring(0,3) + "****" + aaa.substring(7, aaa.length());
System.out.println(aaa);
}
} }
...@@ -273,10 +273,8 @@ public class OrderController { ...@@ -273,10 +273,8 @@ public class OrderController {
if (StringUtils.equals("-1", order.getStatus())) { if (StringUtils.equals("-1", order.getStatus())) {
conds.in("o.status", new String[]{"0", "1"}); conds.in("o.status", new String[]{"0", "1"});
} else if (StringUtils.isNoneBlank(order.getStatus())) { } else if (StringUtils.isNoneBlank(order.getStatus()) && !StringUtils.equals(order.getStatus(), "all")) {
conds.equal("o.status", order.getStatus()); conds.equal("o.status", order.getStatus());
} else if (StringUtils.equals("all", order.getStatus())) {
} }
//三期患者 //三期患者
...@@ -581,7 +579,10 @@ public class OrderController { ...@@ -581,7 +579,10 @@ public class OrderController {
try { try {
OrderFromVO orderFromVO = orderService.fetchId(id); OrderFromVO orderFromVO = orderService.fetchId(id);
if (orderFromVO != null && StringUtils.isNoneBlank(orderFromVO.getOpenid())) { if (orderFromVO != null && StringUtils.isNoneBlank(orderFromVO.getOpenid())) {
couponrecordService.sendCouponRecord(orderFromVO.getOpenid(), accountId); //非三期用户才能发券
if (orderService.isThreeUsers(orderFromVO.getOpenid()) == 0) {
couponrecordService.sendCouponRecord(orderFromVO.getOpenid(), accountId);
}
} }
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
......
...@@ -332,8 +332,6 @@ ...@@ -332,8 +332,6 @@
} }
$().ready(function () { $().ready(function () {
let redingType = $("#redingType").val(); let redingType = $("#redingType").val();
let redingYes = $("#redingYes").val(); let redingYes = $("#redingYes").val();
if (redingType==redingYes){ if (redingType==redingYes){
......
...@@ -100,6 +100,13 @@ public class ProductController { ...@@ -100,6 +100,13 @@ public class ProductController {
if (StringUtils.isNotBlank(product.getDescription())) { if (StringUtils.isNotBlank(product.getDescription())) {
product.setDescription(product.getDescription().replace("\n", "<br/>")); product.setDescription(product.getDescription().replace("\n", "<br/>"));
} }
if (StringUtils.isNoneBlank(product.getDescription())) {
String htmlStr = product.getDescription()//
.replaceAll("\r\n", "<br>")
.replaceAll("\n", "<br>");
product.setDescription(htmlStr);
}
if (product != null && product.getId() != null) { if (product != null && product.getId() != null) {
product.setUpdateBy(UserUtils.getUser().getId()); product.setUpdateBy(UserUtils.getUser().getId());
productService.update(product); productService.update(product);
......
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