pms出库单表添加记录号作为主键;添加任务状态赋值

This commit is contained in:
葛林强 2025-03-05 09:32:18 +08:00
parent f67563e0d2
commit e2ac149376
4 changed files with 33 additions and 17 deletions

View File

@ -115,12 +115,14 @@ public class AppPmsController extends BaseController {
return error("出库单号重复。");
}
AppPmsOrderOut appPmsOrderOut = new AppPmsOrderOut();
appPmsOrderOut.setRecordId(UUID.randomUUID().toString());
appPmsOrderOut.setListId(orderOutRequest.getListId());
appPmsOrderOut.setOrderType(Long.valueOf(orderOutRequest.getOrderType()));
appPmsOrderOut.setCustomerId(orderOutRequest.getCustomerId());
appPmsOrderOut.setGoodsId(orderOutRequest.getGoodsId());
appPmsOrderOut.setGoodsNum(BigDecimal.valueOf(orderOutRequest.getGoodsNum()));
appPmsOrderOut.setGoodsDesc(orderOutRequest.getGoodsDesc());
appPmsOrderOut.setOrderStatus(0);
appPmsOrderOut.setCreateTime(new Date());
appPmsOrderOut.setUpdateTime(new Date());
insertRow += appPmsOrderOutService.insertAppPmsOrderOut(appPmsOrderOut);

View File

@ -16,6 +16,16 @@ public class AppPmsOrderOut extends BaseEntity
{
private static final long serialVersionUID = 1L;
private String recordId;
public String getRecordId() {
return recordId;
}
public void setRecordId(String recordId) {
this.recordId = recordId;
}
/** 出库单号 */
private String listId;
@ -48,7 +58,7 @@ public class AppPmsOrderOut extends BaseEntity
private String spare2;
@Excel(name = "订单状态")
private String orderStatus;
private Integer orderStatus;
public void setListId(String listId)
{
@ -123,11 +133,11 @@ public class AppPmsOrderOut extends BaseEntity
return spare2;
}
public String getOrderStatus() {
public Integer getOrderStatus() {
return orderStatus;
}
public void setOrderStatus(String orderStatus) {
public void setOrderStatus(Integer orderStatus) {
this.orderStatus = orderStatus;
}

View File

@ -15,10 +15,10 @@ public interface AppPmsOrderOutMapper
/**
* 查询请填写功能名称
*
* @param listId 请填写功能名称主键
* @param recordId 请填写功能名称主键
* @return 请填写功能名称
*/
public AppPmsOrderOut selectAppPmsOrderOutByListId(String listId);
public AppPmsOrderOut selectAppPmsOrderOutByListId(String recordId);
/**
* 查询请填写功能名称列表
@ -47,16 +47,16 @@ public interface AppPmsOrderOutMapper
/**
* 删除请填写功能名称
*
* @param listId 请填写功能名称主键
* @param recordId 请填写功能名称主键
* @return 结果
*/
public int deleteAppPmsOrderOutByListId(String listId);
public int deleteAppPmsOrderOutByListId(String recordId);
/**
* 批量删除请填写功能名称
*
* @param listIds 需要删除的数据主键集合
* @param recordIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteAppPmsOrderOutByListIds(String[] listIds);
public int deleteAppPmsOrderOutByListIds(String[] recordIds);
}

View File

@ -5,6 +5,7 @@
<mapper namespace="com.ruoyi.app.mapper.AppPmsOrderOutMapper">
<resultMap type="AppPmsOrderOut" id="AppPmsOrderOutResult">
<id property="recordId" column="record_id" />
<result property="listId" column="list_id" />
<result property="orderType" column="order_type" />
<result property="customerId" column="customer_id" />
@ -16,7 +17,7 @@
</resultMap>
<sql id="selectAppPmsOrderOutVo">
select list_id, order_type, customer_id, goods_id, goods_num, goods_desc, spare1, spare2 from app_pms_order_out
select record_id, list_id, order_type, customer_id, goods_id, goods_num, goods_desc, spare1, spare2 from app_pms_order_out
</sql>
<select id="selectAppPmsOrderOutList" parameterType="AppPmsOrderOut" resultMap="AppPmsOrderOutResult">
@ -34,12 +35,13 @@
<select id="selectAppPmsOrderOutByListId" parameterType="String" resultMap="AppPmsOrderOutResult">
<include refid="selectAppPmsOrderOutVo"/>
where list_id = #{listId}
where record_id = #{recordId}
</select>
<insert id="insertAppPmsOrderOut" parameterType="AppPmsOrderOut">
insert into app_pms_order_out
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="recordId != null">record_id,</if>
<if test="listId != null">list_id,</if>
<if test="orderType != null">order_type,</if>
<if test="customerId != null and customerId != ''">customer_id,</if>
@ -51,6 +53,7 @@
<if test="orderStatus != null">order_status,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="recordId != null">#{recordId},</if>
<if test="listId != null">#{listId},</if>
<if test="orderType != null">#{orderType},</if>
<if test="customerId != null and customerId != ''">#{customerId},</if>
@ -66,6 +69,7 @@
<update id="updateAppPmsOrderOut" parameterType="AppPmsOrderOut">
update app_pms_order_out
<trim prefix="SET" suffixOverrides=",">
<if test="listId != null">list_id = #{listId},</if>
<if test="orderType != null">order_type = #{orderType},</if>
<if test="customerId != null and customerId != ''">customer_id = #{customerId},</if>
<if test="goodsId != null and goodsId != ''">goods_id = #{goodsId},</if>
@ -74,17 +78,17 @@
<if test="spare1 != null and spare1 != ''">spare1 = #{spare1},</if>
<if test="spare2 != null">spare2 = #{spare2},</if>
</trim>
where list_id = #{listId}
where record_id = #{recordId}
</update>
<delete id="deleteAppPmsOrderOutByListId" parameterType="String">
delete from app_pms_order_out where list_id = #{listId}
delete from app_pms_order_out where record_id = #{recordId}
</delete>
<delete id="deleteAppPmsOrderOutByListIds" parameterType="String">
delete from app_pms_order_out where list_id in
<foreach item="listId" collection="array" open="(" separator="," close=")">
#{listId}
delete from app_pms_order_out where record_id in
<foreach item="record_id" collection="array" open="(" separator="," close=")">
#{recordId}
</foreach>
</delete>
</mapper>