Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
nmy 2023-12-08 17:42:03 +08:00
commit cf10de2628
10 changed files with 65 additions and 26 deletions

View File

@ -78,7 +78,7 @@ public class DevInfo extends BaseEntity
/** 设备月租价 */ /** 设备月租价 */
@Excel(name = "设备月租价") @Excel(name = "设备月租价")
@ApiModelProperty(value = "设备月租价") @ApiModelProperty(value = "设备月租价")
private String monthLeasePrice; private Float monthLeasePrice;
/** 设备天租价 */ /** 设备天租价 */
@Excel(name = "设备天租价") @Excel(name = "设备天租价")

View File

@ -69,4 +69,5 @@ public class DevInfoVo extends DevInfo {
private String monthLeasePriceOrderBy; // ASC or DESC private String monthLeasePriceOrderBy; // ASC or DESC
@ApiModelProperty(value = "搜索装备更新时间排序 ASC or DESC") @ApiModelProperty(value = "搜索装备更新时间排序 ASC or DESC")
private String updateTimeOrderBy; // ASC or DESC private String updateTimeOrderBy; // ASC or DESC
private Integer level; //ma_type_level 级别: 1,2,3
} }

View File

@ -70,6 +70,10 @@ public class OrderInfo extends BaseEntity
@ApiModelProperty(value = "订单状态, 参考数据字典") @ApiModelProperty(value = "订单状态, 参考数据字典")
private String orderStatus; private String orderStatus;
@Excel(name = "驳回原因")
@ApiModelProperty(value = "驳回原因")
private String rejectReason;
/** 下单用户id */ /** 下单用户id */
@Excel(name = "下单用户id") @Excel(name = "下单用户id")
@ApiModelProperty(value = "下单用户id") @ApiModelProperty(value = "下单用户id")

View File

@ -19,6 +19,18 @@ public class OrderInfoVo extends OrderInfo {
/* 装备名称 child */ /* 装备名称 child */
@ApiModelProperty(value = "装备名称") @ApiModelProperty(value = "装备名称")
private String deviceName; private String deviceName;
@ApiModelProperty(value = "装备编码")
private String deviceCode;
@ApiModelProperty(value = "装备图片")
private String devicePicUrl;
@ApiModelProperty(value = "装备品牌")
private String deviceBrand;
@ApiModelProperty(value = "装备规格")
private String deviceSpecification;
@ApiModelProperty(value = "装备位置")
private String deviceLocation;
@ApiModelProperty(value = "装备月租金")
private Double deviceMonthLeasePrice;
@ApiModelProperty(value = "装备id") @ApiModelProperty(value = "装备id")
private Long maId; private Long maId;
@ApiModelProperty(value = "联系电话") @ApiModelProperty(value = "联系电话")
@ -53,7 +65,7 @@ public class OrderInfoVo extends OrderInfo {
private String orderContract; private String orderContract;
@ApiModelProperty(value = "机手姓名") @ApiModelProperty(value = "机手姓名")
private String machinistName; private String machinistName;
@ApiModelProperty(value = "联系电话") @ApiModelProperty(value = "机手联系电话")
private String phone; private String phone;
@ApiModelProperty(value = "物流司机电话") @ApiModelProperty(value = "物流司机电话")
private String logisticsPhone; private String logisticsPhone;
@ -68,4 +80,6 @@ public class OrderInfoVo extends OrderInfo {
/* 合同附件 */ /* 合同附件 */
@ApiModelProperty(value = "合同附件") @ApiModelProperty(value = "合同附件")
private String contractUrl; private String contractUrl;
@ApiModelProperty(value = "订单状态文字")
private String orderStatusStr;
} }

View File

@ -59,7 +59,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where> <where>
<if test="maId != null "> and d.ma_id = #{maId}</if> <if test="maId != null "> and d.ma_id = #{maId}</if>
<if test="code != null and code != ''"> and d.code = #{code}</if> <if test="code != null and code != ''"> and d.code = #{code}</if>
<if test="typeId != null "> and d.type_id = #{typeId}</if> <if test="typeId != null and level != null and level != 1">
and d.type_id = #{typeId} or t.parent_id = #{typeId}
</if>
<if test="maStatus != null and maStatus != ''"> and d.ma_status = #{maStatus}</if> <if test="maStatus != null and maStatus != ''"> and d.ma_status = #{maStatus}</if>
<if test="leaseScope != null "> and d.lease_scope = #{leaseScope}</if> <if test="leaseScope != null "> and d.lease_scope = #{leaseScope}</if>
<if test="location != null and location != ''"> and d.location = #{location}</if> <if test="location != null and location != ''"> and d.location = #{location}</if>
@ -73,7 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and d.working_hours &gt;= #{workingHoursMin} and d.working_hours &lt;= #{workingHoursMax} and d.working_hours &gt;= #{workingHoursMin} and d.working_hours &lt;= #{workingHoursMax}
</if> </if>
<if test="serialNumber != null and serialNumber != ''"> and d.serial_number = #{serialNumber}</if> <if test="serialNumber != null and serialNumber != ''"> and d.serial_number = #{serialNumber}</if>
<if test="monthLeasePriceMin != null and monthLeasePriceMin != '' and monthLeasePriceMax != null and monthLeasePriceMax != ''"> <if test="monthLeasePriceMin != null and monthLeasePriceMax != null">
and d.month_lease_price &gt;= #{monthLeasePriceMin} and d.month_lease_price &lt;= #{monthLeasePriceMax} and d.month_lease_price &gt;= #{monthLeasePriceMin} and d.month_lease_price &lt;= #{monthLeasePriceMax}
</if> </if>
<if test="dayLeasePrice != null and dayLeasePrice != ''"> and d.day_lease_price = #{dayLeasePrice}</if> <if test="dayLeasePrice != null and dayLeasePrice != ''"> and d.day_lease_price = #{dayLeasePrice}</if>
@ -90,13 +92,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isActive != null and isActive != ''"> and d.is_active = #{isActive}</if> <if test="isActive != null and isActive != ''"> and d.is_active = #{isActive}</if>
<if test="keyWord != null and keyWord != ''"> <if test="keyWord != null and keyWord != ''">
and ( and (
locate(#{typeName},t.type_name) > 0 locate(#{keyWord},t.type_name) > 0
or locate(#{companyName},c.company_name) > 0 or locate(#{keyWord},c.company_name) > 0
or locate(#{maId},d.ma_id) > 0 or locate(#{keyWord},d.ma_id) > 0
or locate(#{modelName},d.model_name) > 0 or locate(#{keyWord},d.model_name) > 0
or locate(#{specification},d.specification) > 0 or locate(#{keyWord},d.specification) > 0
or locate(#{serialNumber},d.serial_number) > 0 or locate(#{keyWord},d.serial_number) > 0
or locate(#{description},d.description) > 0 or locate(#{keyWord},d.description) > 0
) )
</if> </if>
and d.is_active='1' and d.is_active='1'
@ -109,10 +111,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="monthLeasePriceOrderBy != null and monthLeasePriceOrderBy == 'DESC'"> <if test="monthLeasePriceOrderBy != null and monthLeasePriceOrderBy == 'DESC'">
,d.month_lease_price DESC ,d.month_lease_price DESC
</if> </if>
<if test="updateTime != null and monthLeasePriceOrderBy == 'ASC'"> <if test="updateTimeOrderBy != null and updateTimeOrderBy == 'ASC'">
,d.update_time ,d.update_time
</if> </if>
<if test="updateTime != null and monthLeasePriceOrderBy == 'DESC'"> <if test="updateTimeOrderBy != null and updateTimeOrderBy == 'DESC'">
,d.update_time DESC ,d.update_time DESC
</if> </if>
</select> </select>

View File

@ -112,6 +112,18 @@ public class OrderInfoController extends BaseController
orderInfo.setTypeName(typeName); orderInfo.setTypeName(typeName);
orderInfo.setGroupName(groupName); orderInfo.setGroupName(groupName);
orderInfo.setDeviceName(modelName + deviceName); orderInfo.setDeviceName(modelName + deviceName);
//装备编号图片品牌规格位置addressId月租金
orderInfo.setDeviceCode((String) map2.get("code"));
orderInfo.setDevicePicUrl((String) map2.get("picUrl"));
orderInfo.setDeviceBrand((String) map2.get("brand"));
orderInfo.setDeviceSpecification((String) map2.get("specification"));
orderInfo.setDeviceLocation((String) map2.get("location"));
try {
Double price = (Double) map2.get("monthLeasePrice");
orderInfo.setDeviceMonthLeasePrice(price);
} catch (Exception e) {
e.printStackTrace();
}
} }
} }
return success(orderInfo); return success(orderInfo);

View File

@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectOrderInfoVo"> <sql id="selectOrderInfoVo">
select order_id, p_id, code, time, end_time, deposit, cost, pay_type, supplier, order_status, order_user, order_company from ma_order_info select order_id, p_id, code, time, end_time, deposit, cost, pay_type, supplier, order_status, reject_reason, order_user, order_company from ma_order_info
</sql> </sql>
<select id="selectOrderInfoList" parameterType="com.bonus.zlpt.common.core.domain.order.vo.OrderInfoVo" resultType="com.bonus.zlpt.common.core.domain.order.vo.OrderInfoVo"> <select id="selectOrderInfoList" parameterType="com.bonus.zlpt.common.core.domain.order.vo.OrderInfoVo" resultType="com.bonus.zlpt.common.core.domain.order.vo.OrderInfoVo">
@ -44,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectOrderInfoByOrderId" parameterType="Long" resultType="com.bonus.zlpt.common.core.domain.order.vo.OrderInfoVo"> <select id="selectOrderInfoByOrderId" parameterType="Long" resultType="com.bonus.zlpt.common.core.domain.order.vo.OrderInfoVo">
select d.*,o.code,o.time as order_time,o.order_status select d.*,o.code,o.time,o.order_status,o.reject_reason
from ma_order_info o from ma_order_info o
left join ma_order_details d on d.order_id = o.order_id left join ma_order_details d on d.order_id = o.order_id
where o.order_id = #{orderId} where o.order_id = #{orderId}
@ -68,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="payType != null">pay_type,</if> <if test="payType != null">pay_type,</if>
<if test="supplier != null">supplier,</if> <if test="supplier != null">supplier,</if>
<if test="orderStatus != null">order_status,</if> <if test="orderStatus != null">order_status,</if>
<if test="rejectReason != null">reject_reason,</if>
<if test="orderUser != null">order_user,</if> <if test="orderUser != null">order_user,</if>
<if test="orderCompany != null">order_company,</if> <if test="orderCompany != null">order_company,</if>
</trim> </trim>
@ -82,6 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="payType != null">#{payType},</if> <if test="payType != null">#{payType},</if>
<if test="supplier != null">#{supplier},</if> <if test="supplier != null">#{supplier},</if>
<if test="orderStatus != null">#{orderStatus},</if> <if test="orderStatus != null">#{orderStatus},</if>
<if test="rejectReason != null">#{rejectReason},</if>
<if test="orderUser != null">#{orderUser},</if> <if test="orderUser != null">#{orderUser},</if>
<if test="orderCompany != null">#{orderCompany},</if> <if test="orderCompany != null">#{orderCompany},</if>
</trim> </trim>
@ -150,6 +152,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="payType != null">pay_type = #{payType},</if> <if test="payType != null">pay_type = #{payType},</if>
<if test="supplier != null">supplier = #{supplier},</if> <if test="supplier != null">supplier = #{supplier},</if>
<if test="orderStatus != null">order_status = #{orderStatus},</if> <if test="orderStatus != null">order_status = #{orderStatus},</if>
<if test="rejectReason != null">reject_reason = #{rejectReason},</if>
<if test="orderUser != null">order_user = #{orderUser},</if> <if test="orderUser != null">order_user = #{orderUser},</if>
<if test="orderCompany != null">order_company = #{orderCompany},</if> <if test="orderCompany != null">order_company = #{orderCompany},</if>
</trim> </trim>

View File

@ -26,22 +26,22 @@ import org.springframework.stereotype.Component;
@Slf4j @Slf4j
public class SmsComponent { public class SmsComponent {
@Value("${sms.sdkAppId}") // 注入参数值 @Value("${tencent.sms.smsSdkAppId}") // 注入参数值
private String sdkAppId; private String sdkAppId;
@Value("${sms.secretId}") @Value("${tencent.sms.secretId}")
private String secretId; private String secretId;
@Value("${sms.secretKey}") @Value("${tencent.sms.keysecret}")
private String secretKey; private String secretKey;
@Value("${sms.signName}") @Value("${tencent.sms.signName}")
private String signName; private String signName;
@Value("${sms.templateCodeId}") @Value("${tencent.sms.templateId}")
private String templateCodeId; private String templateCodeId;
@Value("${sms.timeout}") @Value("${tencent.sms.timeout}")
private Integer timeout; private Integer timeout;
/** /**
@ -59,7 +59,7 @@ public class SmsComponent {
ClientProfile clientProfile = new ClientProfile(); ClientProfile clientProfile = new ClientProfile();
clientProfile.setHttpProfile(httpProfile); clientProfile.setHttpProfile(httpProfile);
// 实例化要请求产品的client对象,clientProfile是可选的 // 实例化要请求产品的client对象,clientProfile是可选的
return new SmsClient(cred, "ap-beijing", clientProfile); return new SmsClient(cred, "ap-nanjing", clientProfile);
} }
/** /**
@ -77,7 +77,7 @@ public class SmsComponent {
req.setPhoneNumberSet(phoneNumberSet); req.setPhoneNumberSet(phoneNumberSet);
req.setSignName(signName); req.setSignName(signName);
req.setTemplateId(templateId); req.setTemplateId(templateId);
//模板内容的参数有几个就设置几个我这里是两个 // 根据模板所需参数量选择
String[] templateParamSetOne = {code}; String[] templateParamSetOne = {code};
String[] templateParamSetTwo = {code,param2}; String[] templateParamSetTwo = {code,param2};
req.setTemplateParamSet(templateParamSetOne); req.setTemplateParamSet(templateParamSetOne);

View File

@ -4,6 +4,7 @@ import com.bonus.zlpt.common.core.web.controller.BaseController;
import com.bonus.zlpt.common.core.web.domain.AjaxResult; import com.bonus.zlpt.common.core.web.domain.AjaxResult;
import com.bonus.zlpt.system.service.ISmsService; import com.bonus.zlpt.system.service.ISmsService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@ -22,7 +23,7 @@ public class SmsSendController extends BaseController {
@Autowired @Autowired
private ISmsService smsService; private ISmsService smsService;
@RequestMapping("/send") @PostMapping("send")
public AjaxResult send(@RequestParam("phone") String phone){ public AjaxResult send(@RequestParam("phone") String phone){
try { try {
String msg = smsService.sendCode(phone, 5 * 60 * 1000); String msg = smsService.sendCode(phone, 5 * 60 * 1000);

View File

@ -9,11 +9,13 @@ tencent:
secretId: AKIDbF1pTyU6iHn6EH9uc9O6kJgrrfI2rV04 secretId: AKIDbF1pTyU6iHn6EH9uc9O6kJgrrfI2rV04
keysecret: zGPRJ9z68AGZVMAoHYyDFDAxhR2Xs0Qf keysecret: zGPRJ9z68AGZVMAoHYyDFDAxhR2Xs0Qf
# 短信应用ID # 短信应用ID
smsSdkAppId: 564559 smsSdkAppId: 1400874270
# 短信签名内容 # 短信签名内容
signName: 作业智慧管控系统小程序 signName: 作业智慧管控系统小程序
# 正文模板ID # 正文模板ID
templateId: 2010811 templateId: 2014173
# 超时时间
timeout: 1000
sms: sms:
sdkAppId: sdkAppId: