Jelajahi Sumber

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

李书文 1 tahun lalu
induk
melakukan
b7ce05f3e6

+ 2 - 1
sp-core/sp-base/src/main/java/com/pj/aliyun/sms/AliyunInformSmsService.java

@@ -67,7 +67,8 @@ public class AliyunInformSmsService {
             例如模板内容为:亲爱的同事,很高兴的通知您,您抽中了由领导${userName}派发的大饼奖励${money}元,请及时找财务领取!
             变量属性:userName-其他;money-其他;
             则短信内容为:【某某公司】 亲爱的同事,很高兴的通知您,您抽中了由领导${userName}派发的大饼奖励${money}元,请及时找财务领取!*/
-            request.setTemplateParam("{\"mobile\":\""+ mobile +"\",\"mobile\":\""+ mobile +"\"}");
+            request.setTemplateParam("您好,您的组长已接单,请前往app进行确认。");
+//            request.setTemplateParam("{\"mobile\":\""+ mobile +"\",\"mobile\":\""+ mobile +"\"}");
 
             SendSmsResponse sendSmsResponse = acsClient.getAcsResponse(request);
             if ((sendSmsResponse.getCode() != null) && (sendSmsResponse.getCode().equals("OK"))) {

+ 0 - 304
sp-service/level-one-server/src/main/java/com/pj/tb_order/TbOrderDto.java

@@ -1,304 +0,0 @@
-package com.pj.tb_order;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.extension.activerecord.Model;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * Model: tb_order -- 订单表
- * @author lbl
- */
-public class TbOrderDto {
-
-	// ---------- 表中字段 ----------
-	/**
-	 * 主键
-	 */
-	private Long id;
-
-	/**
-	 *
-	 */
-	private Long tradeAreaId;
-	/**
-	 *
-	 */
-	private Long groupId;
-
-	/**
-	 *
-	 */
-	private String tradeAreaName;
-
-	/**
-	 *
-	 */
-	private String goodsImg;
-
-	/**
-	 *
-	 */
-	private String addressIds;
-
-	/**
-	 *
-	 */
-	private Long saleMainId;
-
-	/**
-	 *  商品ID
-	 */
-	private Long goodsId;
-
-	/**
-	 * 订单号
-	 */
-	private String tradeNo;
-
-	/**
-	 * 买家ID
-	 */
-	private Long buyUserId;
-
-	/**
-	 * 买家
-	 */
-	private String buyUserName;
-
-	/**
-	 * 购买用户类型(3=边民,2=组长)
-	 */
-	private String buyUserType;
-
-	/**
-	 * 商家ID
-	 */
-	private Long enterpriseId;
-
-	/**
-	 * 商家名称
-	 */
-	private String enterpriseName;
-
-	/**
-	 * 总重量
-	 */
-	private Double totalWeight;
-
-	/**
-	 * 总金额
-	 */
-	private Double totalPrice;
-
-	/**
-	 * 交易时间
-	 */
-	@JsonFormat(pattern = "yyyy-MM-dd")
-	private Date tradeTime;
-
-	/**
-	 * 交易状态(0=未支付,1=已支付)
-	 */
-	private String tradeStatus;
-
-	/**
-	 * 支付方式(0=金融互助,1=现金刷卡)
-	 */
-	private String payType;
-
-	/**
-	 * 结算时间
-	 */
-	private String settleTime;
-
-	/**
-	 * 当前结算金额
-	 */
-	private Double realPrice;
-
-	/**
-	 * 应结金额
-	 */
-	private Double shouldPrice;
-
-	/**
-	 * 对账人
-	 */
-	private Long settleUserId;
-
-	/**
-	 * 对账人员
-	 */
-	private Long recordUserId;
-
-	/**
-	 * 对账时间
-	 */
-	private String recordTime;
-
-	/**
-	 * 是否对账(0=否,)
-	 */
-	private String record;
-
-	/**
-	 * 退款原因
-	 */
-	private String refundReason;
-
-	/**
-	 * 退款时间
-	 */
-	private String refundTime;
-
-	/**
-	 *
-	 */
-	private String receiveName;
-
-	/**
-	 *
-	 */
-	private String receivePhone;
-
-	/**
-	 *
-	 */
-	private String receiveAddress;
-
-	/**
-	 * 出互市区时间
-	 */
-	private String outTime;
-
-	/**
-	 * 商品名称字符串
-	 */
-	private String goodsNames;
-
-	/**
-	 * 是否申报
-	 */
-	private String apply;
-
-	/**
-	 * 申报时间
-	 */
-	private String applyTime;
-
-	/**
-	 * 申报结果
-	 */
-	private String applyResult;
-
-	/**
-	 *
-	 */
-	private String applyFailReason;
-
-	/**
-	 * 分配方式(0=均分,1=自选数量)
-	 */
-	private String distribution;
-
-	/**
-	 * 是否确认(0=否,1=是)
-	 */
-	private Integer confirm;
-
-	/**
-	 * 是否接单
-	 */
-	private String pick;
-
-	/**
-	 * 接单时间
-	 */
-	private String pickTime;
-
-	/**
-	 *
-	 */
-	private Long shopId;
-
-	/**
-	 *
-	 */
-	private String shopName;
-
-	/**
-	 * 是否发货
-	 */
-	private Integer send;
-
-	/**
-	 * 发货时间
-	 */
-	private String sendTime;
-
-	/**
-	 * 对应二级市场中的收购单ID
-	 */
-	private Long levelTwoOrderId;
-
-	/**
-	 * 创建时间
-	 */
-	@JsonFormat(pattern = "yyyy-MM-dd")
-	private Date createTime;
-
-	/**
-	 * 创建人编号
-	 */
-	private String createBy;
-
-	/**
-	 * 创建人名称
-	 */
-	private String createName;
-
-	/**
-	 * 更新时间
-	 */
-	@JsonFormat(pattern = "yyyy-MM-dd")
-	private Date updateTime;
-
-	/**
-	 * 更新人编号
-	 */
-	private String updateBy;
-
-	/**
-	 * 更新人名称
-	 */
-	private String updateName;
-
-	/**
-	 * 删除状态(0=禁用,1=启用)
-	 */
-	private Integer deleteStatus;
-
-	/**
-	 * 订单状态(0=未完成,1=已完成)
-	 */
-	private Integer finishStatus;
-
-	/**
-	 * 是否转售(0=未转售,1=已转售)
-	 */
-	private Integer resaleStatus;
-
-
-
-
-}

+ 1 - 17
sp-service/transport-server/src/main/java/com/pj/project/tb_car_record/AppCarRecordController.java

@@ -1,6 +1,5 @@
 package com.pj.project.tb_car_record;
 
-import cn.dev33.satoken.annotation.SaCheckPermission;
 import com.pj.project4sp.SP;
 import com.pj.utils.sg.AjaxJson;
 import com.pj.utils.so.SoMap;
@@ -13,7 +12,7 @@ import java.util.List;
 
 
 /**
- * Controller: tb_car_record -- 商户司机叫车记录表
+ * app: tb_car_record -- 商户司机叫车记录表
  * @author yzs 
  */
 @RestController
@@ -24,14 +23,6 @@ public class AppCarRecordController {
 	@Autowired
 	TbCarRecordService tbCarRecordService;
 
-	/** 增 */  
-	@RequestMapping("add")
-	public AjaxJson add(TbCarRecord t){
-		tbCarRecordService.add(t);
-		t = tbCarRecordService.getById(SP.publicMapper.getPrimarykey());
-		return AjaxJson.getSuccessData(t);
-	}
-
 	/** 删 */  
 	@RequestMapping("delete")
 	public AjaxJson delete(Long id){
@@ -46,13 +37,6 @@ public class AppCarRecordController {
 		int line = SP.publicMapper.deleteByIds(TbCarRecord.TABLE_NAME, ids);
 		return AjaxJson.getByLine(line);
 	}
-	
-	/** 改 */  
-	@RequestMapping("update")
-	public AjaxJson update(TbCarRecord t){
-		tbCarRecordService.update(t);
-		return AjaxJson.getSuccess();
-	}
 
 	/** app:查 - 根据id */
 	@RequestMapping("getById")

+ 15 - 0
sp-service/transport-server/src/main/java/com/pj/project/tb_driver/TbDriverService.java

@@ -64,6 +64,21 @@ public class TbDriverService extends ServiceImpl<TbDriverMapper, TbDriver> imple
 	List<TbDriver> getList(SoMap so) { 
 		return tbDriverMapper.getList(so);	
 	}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 	/**
 	 * 导入
 	 * @param file excel文件

+ 13 - 0
sp-service/transport-server/src/main/java/com/pj/project/tb_vehicle/TbVehicleService.java

@@ -124,6 +124,14 @@ public class TbVehicleService extends ServiceImpl<TbVehicleMapper, TbVehicle> im
 	 * @throws Exception
 	 */
 	public boolean informDriver(MakeCarRecordParam makeCarRecordParam) throws Exception {
+		//防止重复叫车
+		Integer tbCarRecords = tbCarRecordMapper.selectCount
+				(new LambdaQueryWrapper<TbCarRecord>()
+						.eq(TbCarRecord::getOrderId, makeCarRecordParam.getOrderId())
+						.eq(TbCarRecord::getEnterpriseId, makeCarRecordParam.getEnterpriseId())
+						.ne(TbCarRecord::getDriverResult,2) // 非司机拒绝
+						.eq(TbCarRecord::getDeleteStatus, DeleteStatus.DELETE_STATUS_ON.getCode()));
+		if(tbCarRecords != 0)throw new ServiceException("您当前订单已正在叫车中,请勿重复叫车~");
 		//通过driverId查询司机表
 		TbDriver tbDriver = tbDriverMapper.selectById(makeCarRecordParam.getDriverId());
 		if(tbDriver == null)throw new ServiceException("司机信息有误!");
@@ -147,6 +155,11 @@ public class TbVehicleService extends ServiceImpl<TbVehicleMapper, TbVehicle> im
 		//获取当前登录人
 		APPLoginUserInfo appLoginInfo = StpAPPUserUtil.getAPPLoginInfo();
 		boolean agree = methodVehicleService.agree(appLoginInfo, driverResultParam);
+		//todo: 将司机车辆状态返还给航通
+		if(agree){
+			//车辆状态, 默认作业中
+
+		}
 		return agree;
 	}
 

+ 1 - 1
sp-service/transport-server/src/main/java/com/pj/project/tb_vehicle/param/MakeCarRecordParam.java

@@ -23,7 +23,7 @@ public class MakeCarRecordParam {
      * 交易地区名称
      */
     @NotNull(message = "tradeAreaName,交易地区名称不能为空")
-    private Long tradeAreaName;
+    private String tradeAreaName;
 
     /**
      * 司机表ID