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

Aidea product update by Strive Date 2020-11-28

parent 97255f1c
......@@ -372,23 +372,15 @@ public class ConsultSheetController {
order.setStatus("0");//添加订单待确认
order.setDescription(goodsDes);
//获取默认地址
if (StringUtils.isNoneBlank(consultSheet.getAddressId())) {
Conds adsConds = new Conds();
adsConds.equal("t.del_flag", Constants.DEL_FLAG_0);
adsConds.equal("t.open_id", consultSheet.getOpenId());
adsConds.equal("t.whether", "1");
adsConds.equal("t.id", consultSheet.getAddressId());
Address address = addressService.fetchSearchByConds(adsConds);
if (address != null) {
order.setAddressId(address.getId());
order.setAddressDes(address.getProvinceName()+address.getCityName()+address.getCountyName()+address.getAddressName());
}
} else {//固化地址
Conds adsConds = new Conds();
adsConds.equal("t.del_flag", Constants.DEL_FLAG_0);
adsConds.equal("t.id", consultSheet.getAddressId());
Address address = addressService.fetchSearchByConds(adsConds);
order.setAddressId(Long.parseLong(consultSheet.getAddressId()));
order.setAddressDes(address.getProvinceName()+address.getCityName()+address.getCountyName()+address.getAddressName());
}
orderService.save(order);
......
package com.cftech.invoice.model;
import com.sun.tools.corba.se.idl.StringGen;
import lombok.Data;
/**
......
......@@ -290,6 +290,7 @@
goodsList = JSON.parse(res.data);
if (isView == "true") {//查看
let details = `$!{list}`;
console.log(details);
if (details != null && details != '' && details != '[]') {
let arr = JSON.parse(details);
for (let i = 0; i < arr.length; i ++) {
......@@ -336,7 +337,7 @@
let bool = `$!{isThree}`;
var HtmlPrice = "";
if (price != null && price != '') {
if (price != null) {
HtmlPrice += `<input name="htmlPrice" class="form-control" data-price="`+price+`" style="width: 180px ;margin-right: 50px" type='text' `;
if (bool == "1" || isView == "true") { HtmlPrice += `readonly="readonly"`; }
let priceTmp = parseInt(price).toFixed(2);
......@@ -349,10 +350,10 @@
}
var HtmlAmount = "";
if (amount != null && amount != '') {
if (amount != null) {
HtmlAmount += `<input id="htmlAmount" class="form-control" name="htmlAmount" style="width: 180px ;margin-right: 50px" type='text' readonly="readonly" value="`+parseInt(amount).toFixed(2)+`" ></input>`;
} else {
var amountTmp = parseInt(goodsList[0].price).toFixed(2);
var amountTmp = parseInt(goodsList[0].amount).toFixed(2);
HtmlAmount += `<input id="htmlAmount" class="form-control" name="htmlAmount" style="width: 180px;margin-right: 50px" type="number" readonly="readonly" value="`+amountTmp+`"></input>`
}
......
......@@ -104,7 +104,6 @@
<div class="form-group">
<label for="message-text" class="col-form-label">请输入关闭原由:</label>
<textarea class="form-control" rows="3" id="js-textarea"></textarea>
<input type="hidden" id="orderId">
</div>
</form>
</div>
......@@ -509,7 +508,10 @@
"aTargets": [4],
"mData": "orderAmount",
"mRender": function (a, b, c, d) {
return a;
if (a != null) {
return parseInt(a).toFixed(2);
}
return '';
}
}
,
......@@ -517,7 +519,10 @@
"aTargets": [5],
"mData": "totalAmount",
"mRender": function (a, b, c, d) {
return a;
if (a != null) {
return parseInt(a).toFixed(2);
}
return '';
}
}
,
......@@ -829,7 +834,7 @@
});
Cfapp.init();
function showRemindModal() {
function showRemindModal(id) {
$("#orderId").val(id);
$('#remindExampleModal').modal('show');
}
......@@ -849,7 +854,7 @@
url: url,
type: "GET",
data: {id: $("#orderId").val(),
option: option},
option: option},
success: function (rsp) {
$('#remindExampleModal').modal('hide');
if (rsp.errorNo == "0") {
......
......@@ -183,7 +183,7 @@
<button type="button" class="btn btn-info" onclick="clearSearch()">重置</button>
#if($shiro.hasPermission("qy:order:edit"))
<!-- <a href="#springUrl('/a/order/form')" class="btn btn-primary">新增</a>-->
<a href="#springUrl('/a/order/exportExcel')" class="btn btn-primary">导出</a>
<!--<a href="#springUrl('/a/order/exportExcel')" class="btn btn-primary">导出</a>-->
#end
<!-- <a onclick="importExcel();" class="btn btn-primary">导入</a>-->
......
......@@ -82,4 +82,12 @@ public interface OrderMapper extends GenericDao<Order> {
* @return
*/
Integer isThreeUsers(@Param("openid") String openid);
/**
* 更新提醒状态
* @param orderId
* @param option
* @return
*/
Integer updateRemindType(@Param("orderId")Long orderId, @Param("option") String option);
}
\ No newline at end of file
......@@ -35,6 +35,7 @@
<result column="clerk_id" property="clerkId"/>
<result column="address_des" property="addressDes"/>
<result column="order_time" property="orderTime"/>
<result column="remind_type" property="remindType"/>
</resultMap>
<resultMap id="resultMapList" type="com.cftech.order.model.Order">
......@@ -74,14 +75,16 @@
<result column="nickName" property="nickName"/>
<result column="format" property="format"/>
<result column="price" property="price"/>
<result column="memberName" property="memberName"/>
<result column="memberPhone" property="memberPhone"/>
<result column="address" property="address"/>
<result column="order_time" property="orderTime"/>
<result column="cancel_time" property="cancelTime"/>
<result column="remind_type" property="remindType"/>
<result column="memberPhone" property="memberPhone"/>
<result column="memberName" property="memberName"/>
<result column="sendExpressDateStr" property="sendExpressDateStr"/>
<result column="acceptExpressDateStr" property="acceptExpressDateStr"/>
<result column="outTime" property="outTime"/>
<result column="takeFrequency" property="takeFrequency"/>
<collection property="list" ofType="com.cftech.order.model.ProductVO">
<result column="product_name" property="productName"/>
</collection>
......@@ -164,16 +167,7 @@
o.status
</sql>
<sql id="sqlColumnProduct">
d.id,
d.order_id,
t.product_number AS productNumber,
t.product_name AS productName,
t.id AS productId,
d.drugs_num AS drugsNum,
d.price,
d.amount
</sql>
<sql id="Column">
order_id,
......@@ -222,7 +216,8 @@
`clerk_id`,
address_des,
order_time,
cancel_time
cancel_time,
remind_type
)
values
(
......@@ -255,7 +250,8 @@
#{clerkId, jdbcType=BIGINT},
#{addressDes, jdbcType=VARCHAR},
#{orderTime, jdbcType=TIMESTAMP},
#{cancelTime, jdbcType=TIMESTAMP}
#{cancelTime, jdbcType=TIMESTAMP},
#{remindType, jdbcType=VARCHAR}
)
</insert>
<update id="deleteAll" >
......@@ -272,15 +268,22 @@
LEFT JOIN area a ON s.province_id = a.areaid
LEFT JOIN area b ON s.city_id = b.areaid
LEFT JOIN area c ON s.area_id = c.areaid
WHERE o.id=#{id}
WHERE o.id = #{id}
</select>
<select id="fetchProductId" parameterType="java.lang.Long" resultType="com.cftech.order.model.OrderFromVO">
SELECT
<include refid="sqlColumnProduct"/>
d.id,
d.order_id,
t.product_number AS productNumber,
t.product_name AS productName,
t.id AS productId,
d.drugs_num AS drugsNum,
d.price,
d.amount
from
t_order_details d
LEFT JOIN t_order o ON d.order_id =o.id
LEFT JOIN t_order o ON d.order_id = o.id
LEFT JOIN t_aidea_product t ON d.drugs_id = t.id
WHERE
d.order_id =#{id}
......@@ -329,13 +332,15 @@
o.address_id,
o.order_time,
o.cancel_time,
DATE_FORMAT(aw.send_express_date, '%Y-%m-%d %H:%i') sendExpressDateStr,
DATE_FORMAT(aw.accept_express_date, '%Y-%m-%d %H:%i') acceptExpressDateStr,
DATE_FORMAT(aw.send_express_date, '%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,
CONVERT ( AES_DECRYPT( m.phone, 'aideakey' ) USING UTF8 ) memberPhone,
a.address,
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,
t.take_frequency takeFrequency
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
......@@ -456,7 +461,10 @@
order_time = #{orderTime, jdbcType=TIMESTAMP},
</if>
<if test="cancelTime != null">
cancel_time = #{cancelTime, jdbcType=TIMESTAMP}
cancel_time = #{cancelTime, jdbcType=TIMESTAMP},
</if>
<if test="remindType != null">
remind_type = #{remindType, jdbcType=VARCHAR},
</if>
</set>
where id=#{id,jdbcType=BIGINT}
......@@ -672,4 +680,14 @@
INNER JOIN t_aidea_authentication au ON m.cardid = au.id_card
WHERE f.delflag = '0' AND m.del_flag = '0' AND au.del_flag = '0' AND m.open_id = #{openid}
</select>
<update id="updateRemindType">
UPDATE t_order
<set>
<if test="option != null and option != ''">
remind_type = #{option}
</if>
</set>
WHERE id= #{id}
</update>
</mapper>
\ No newline at end of file
......@@ -73,7 +73,7 @@ public class OrderExpiredRemindJob implements Job {
sysJob.setJobuid(id);
sysJob.setStatus("0");
jobService.updateStatus(sysJob);
log.info("订单半小时未付款过期任务,已执行完成");
log.info("订单半小时未付款过期任务,已执行完成");
}
}
}
......@@ -100,6 +100,11 @@ public class Order extends OrderDetail implements Serializable {
private Long productId;
/**
* 订单提醒类型
*/
private String remindType;
/**
* 购方地址
*/
......@@ -118,10 +123,12 @@ public class Order extends OrderDetail implements Serializable {
* 商品单价
*/
private Double price;
/**
* 会员名称
*/
private String memberName;
/**
* 会员手机
*/
......@@ -129,6 +136,7 @@ public class Order extends OrderDetail implements Serializable {
/**
* 搜索字段
*/
......@@ -145,6 +153,7 @@ public class Order extends OrderDetail implements Serializable {
private String sendExpressDateStr;//发件时间
private String acceptExpressDateStr;//签收时间
private String outTime;//出库时间
private String takeFrequency;//服用频率
......
......@@ -82,4 +82,12 @@ public interface OrderService extends GenericService<Order> {
* @return
*/
JSONObject invoice(InvoiceDto invoiceDto);
/**
* 更新跟进提醒状态
* @param id
* @param option
* @return
*/
Integer updateRemindType(Long id, String option);
}
......@@ -368,4 +368,9 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
return jsonObject;
}
@Override
public Integer updateRemindType(Long id, String option) {
return orderMapper.updateRemindType(id, option);
}
}
\ No newline at end of file
......@@ -476,16 +476,13 @@ public class OrderController {
@ResponseBody
public JSONObject setOrderRemind(Long id, String option, HttpServletRequest request) {
JSONObject rtnJson = new JSONObject();
//Integer integer = orderService.updateStatus(id, status, orderCancel);
//设置已付款
// if (integer > 0){
// //线下付款成功
// if (StringUtils.equals(status, "2")) {
// sendQyWechatMassage(id);
// }
// rtnJson.put("errorNo","0");
// return rtnJson;
// }
if (id != null && StringUtils.isNoneBlank(option)) {
Integer integer = orderService.updateRemindType(id, option);
if (integer > 0){
rtnJson.put("errorNo","0");
return rtnJson;
}
}
rtnJson.put("errorNo","1");
return rtnJson;
}
......
......@@ -3,7 +3,6 @@ package com.cftech.waybill.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.cftech.addresst.model.Address;
import com.cftech.addresst.model.AddressVO;
import com.cftech.addresst.service.AddressService;
import com.cftech.base.codingrule.utils.CodingruleUtils;
import com.cftech.core.util.Constants;
......@@ -165,6 +164,7 @@ public class WaybillServiceImpl extends GenericServiceImpl<Waybill> implements W
if (obj.getInteger("waybillType") == 1) {
waybill.setWaybillNo(obj.getString("waybillNo"));//顺丰运单号
order.setCourierNumber(obj.getString("waybillNo"));
order.setStatus("3");
}
}
......
......@@ -48,7 +48,7 @@ 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=false
quartz.isCluster=true
#\u987A\u4E30API\u914D\u7F6E\u53C2\u6570
#\u987A\u4E30\u5BA2\u6237\u7F16\u7801
......
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