This commit is contained in:
sxu 2023-12-06 20:20:48 +08:00
parent 56fa00ea09
commit eeffaa0491
4 changed files with 7 additions and 58 deletions

View File

@ -21,76 +21,22 @@ public class OrderInfoVo extends OrderInfo {
/** 需求单位 */ /** 需求单位 */
@Excel(name = "需求单位") @Excel(name = "需求单位")
private String needCompany; private String needCompany;
/** 设备计划进场时间 */
@Excel(name = "设备计划进场时间")
private String planStartTime; private String planStartTime;
/** 是否需要机手 */
@Excel(name = "是否需要机手")
private String isMachinist; private String isMachinist;
/** 详细地址 */
@Excel(name = "设备进场省市县")
private Integer addressId; private Integer addressId;
/** 详细地址 */
@Excel(name = "详细地址")
private String address; private String address;
/** 工期时长 */
@Excel(name = "工期时长")
private String duration; private String duration;
/** 发票类型 */
@Excel(name = "发票类型")
private String invoiceType; private String invoiceType;
/** 项目说明 */
@Excel(name = "项目说明")
private String description; private String description;
/** 租赁类型 */
@Excel(name = "租赁类型")
private Long leaseType; private Long leaseType;
/** 租赁单价 */
@Excel(name = "租赁单价")
private String leasePrice; private String leasePrice;
/** 机手单价 */
@Excel(name = "机手单价")
private String machinistPrice; private String machinistPrice;
/** 订单合同 */
@Excel(name = "订单合同")
private String orderContract; private String orderContract;
/** 机手姓名 */
@Excel(name = "机手姓名")
private String machinistName; private String machinistName;
/** 联系电话 */
@Excel(name = "联系电话")
private String phone; private String phone;
/** 物流司机电话 */
@Excel(name = "物流司机电话")
private String logisticsPhone; private String logisticsPhone;
/** 设备实际进场时间 */
@Excel(name = "设备实际进场时间")
private String realStartTime; private String realStartTime;
/** 租方进场确认人 */
@Excel(name = "租方进场确认人")
private String renterName; private String renterName;
/** 出租方进场确认人 */
@Excel(name = "出租方进场确认人")
private String tenantName; private String tenantName;
/** 进场附件 */
@Excel(name = "进场附件")
private String entryAttachment; private String entryAttachment;
} }

View File

@ -61,4 +61,6 @@ public interface OrderInfoMapper
* @return 结果 * @return 结果
*/ */
public int deleteOrderInfoByOrderIds(Long[] orderIds); public int deleteOrderInfoByOrderIds(Long[] orderIds);
public Long selectLastInsertId();
} }

View File

@ -60,8 +60,7 @@ public class OrderInfoServiceImpl implements IOrderInfoService
LoginUser user = SecurityUtils.getLoginUser(); LoginUser user = SecurityUtils.getLoginUser();
orderInfo.setOrderUser(user.getUserid()); orderInfo.setOrderUser(user.getUserid());
orderInfoMapper.insertOrderInfo(orderInfo); orderInfoMapper.insertOrderInfo(orderInfo);
Long orderId = orderInfo.getOrderId(); Long orderId = orderInfoMapper.selectLastInsertId();
System.out.println("xxxx" + orderId);
orderInfo.setOrderId(orderId); orderInfo.setOrderId(orderId);
return orderInfoMapper.insertOrderDetails(orderInfo); return orderInfoMapper.insertOrderDetails(orderInfo);
} }

View File

@ -82,7 +82,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertOrderDetails" parameterType="com.bonus.zlpt.common.core.domain.order.vo.OrderInfoVo"> <insert id="insertOrderDetails" parameterType="com.bonus.zlpt.common.core.domain.order.vo.OrderInfoVo">
insert into ma_order_details insert into ma_order_details
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="orderId != null">order_id,</if> <if test="orderId != null">order_id,</if>
<if test="needCompany != null">need_company,</if> <if test="needCompany != null">need_company,</if>
<if test="planStartTime != null">plan_start_time,</if> <if test="planStartTime != null">plan_start_time,</if>
@ -106,7 +105,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="entryAttachment != null">entry_attachment,</if> <if test="entryAttachment != null">entry_attachment,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="orderId != null">#{orderId},</if> <if test="orderId != null">#{orderId},</if>
<if test="needCompany != null">#{needCompany},</if> <if test="needCompany != null">#{needCompany},</if>
<if test="planStartTime != null">#{planStartTime},</if> <if test="planStartTime != null">#{planStartTime},</if>
@ -158,4 +156,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{orderId} #{orderId}
</foreach> </foreach>
</delete> </delete>
<select id="selectLastInsertId" resultType="Long">
SELECT LAST_INSERT_ID()
</select>
</mapper> </mapper>