This commit is contained in:
linfso 2024-03-28 11:42:07 +08:00
parent 6075868ffe
commit 248a7da0f3
3 changed files with 44 additions and 37 deletions

View File

@ -1,10 +1,10 @@
/**
/**
* @Project: emis
* @Title: EmisElectronicPag.java
* @author linfso
* @date 2024-03-01 10:49:49
* @date 2024-03-28 03:40:50
* @Copyright: ShangHai Duta 2022 All rights reserved.
* @version v1.0
* @version v1.0
* @Description: <p> 电子面单 实体类 </p>
*/
@ -26,9 +26,9 @@ import lombok.Data;
* @ClassName EmisElectronicPag
* @Description 电子面单
* @author linfso
* @date 2024-03-01 10:49:49
* @date 2024-03-28 03:40:50
*/
@Data
@Data
public class EmisElectronicPag extends BaseEntity
{
private static final long serialVersionUID = 1L;
@ -40,13 +40,13 @@ public class EmisElectronicPag extends BaseEntity
/* 结束编号 */
private String endNo;
/* 单号数量 */
private String billCount;
private Integer billCount;
/* 面单费 */
private String billFee;
private BigDecimal billFee;
/* 已分配当前编号 */
private String curStartNo;
/* 剩余数量 */
private String hasBillCount;
private Integer hasBillCount;
/* 提供日期 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date provideDate;
@ -55,7 +55,7 @@ public class EmisElectronicPag extends BaseEntity
/* 提供站点 */
private String provideSite;
/* 状态 0-未启用 1-启用 */
private String status;
private Integer status;
/* 创建站点代码 */
private String createSiteCode;
/* 修改站点代码 */

View File

@ -158,6 +158,15 @@ public class EmisElectronicPagServiceImpl implements IEmisElectronicPagService
return emisElectronicPagMapper.deleteEmisElectronicPagById(id);
}
public static void main(String[] args) {
String curStartNo="T7080110001";
long newStartNumber = Long.valueOf(curStartNo.replace(PAG_PREFIX,""));
newStartNumber= newStartNumber+1;
String waybillNo=PAG_PREFIX+String.valueOf(newStartNumber);
System.out.println(waybillNo);
}
}

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xdadan.erp.emis.mapper.EmisElectronicPagMapper">
<resultMap type="EmisElectronicPag" id="EmisElectronicPagResult">
<result property="id" column="id" />
<result property="startNo" column="start_no" />
@ -32,18 +32,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectEmisElectronicPagList" parameterType="EmisElectronicPag" resultMap="EmisElectronicPagResult">
<include refid="selectEmisElectronicPagVo"/>
<where>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="startNo != null and startNo != ''"> and start_no like concat('%', #{startNo}, '%')</if>
<if test="endNo != null and endNo != ''"> and end_no like concat('%', #{endNo}, '%')</if>
<if test="billCount != null and billCount != ''"> and bill_count like concat('%', #{billCount}, '%')</if>
<if test="billFee != null and billFee != ''"> and bill_fee like concat('%', #{billFee}, '%')</if>
<if test="billCount != null "> and bill_count like concat('%', #{billCount}, '%')</if>
<if test="billFee != null "> and bill_fee like concat('%', #{billFee}, '%')</if>
<if test="curStartNo != null and curStartNo != ''"> and cur_start_no like concat('%', #{curStartNo}, '%')</if>
<if test="hasBillCount != null and hasBillCount != ''"> and has_bill_count like concat('%', #{hasBillCount}, '%')</if>
<if test="hasBillCount != null "> and has_bill_count like concat('%', #{hasBillCount}, '%')</if>
<if test="provideDate != null "> and provide_date = #{provideDate}</if>
<if test="provideMan != null and provideMan != ''"> and provide_man like concat('%', #{provideMan}, '%')</if>
<if test="provideSite != null and provideSite != ''"> and provide_site like concat('%', #{provideSite}, '%')</if>
<if test="status != null and status != ''"> and status like concat('%', #{status}, '%')</if>
<if test="status != null "> and status like concat('%', #{status}, '%')</if>
<if test="createSiteCode != null and createSiteCode != ''"> and create_site_code like concat('%', #{createSiteCode}, '%')</if>
<if test="modifySiteCode != null and modifySiteCode != ''"> and modify_site_code like concat('%', #{modifySiteCode}, '%')</if>
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
@ -55,27 +55,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
order by create_time desc
</select>
<select id="selectEmisElectronicPagById" parameterType="Long" resultMap="EmisElectronicPagResult">
select id, start_no, end_no, bill_count, bill_fee, cur_start_no, has_bill_count, provide_date, provide_man, provide_site, status, create_site_code, modify_site_code, del_flag, create_by, create_time, update_by, update_time, remark
select id, start_no, end_no, bill_count, bill_fee, cur_start_no, has_bill_count, provide_date, provide_man, provide_site, status, create_site_code, modify_site_code, del_flag, create_by, create_time, update_by, update_time, remark
from emis_electronic_pag a
where a.id = #{id}
</select>
<insert id="insertEmisElectronicPag" parameterType="EmisElectronicPag">
insert into emis_electronic_pag
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="startNo != null and startNo != ''">start_no,</if>
<if test="endNo != null and endNo != ''">end_no,</if>
<if test="billCount != null and billCount != ''">bill_count,</if>
<if test="billFee != null and billFee != ''">bill_fee,</if>
<if test="billCount != null">bill_count,</if>
<if test="billFee != null">bill_fee,</if>
<if test="curStartNo != null and curStartNo != ''">cur_start_no,</if>
<if test="hasBillCount != null and hasBillCount != ''">has_bill_count,</if>
<if test="hasBillCount != null">has_bill_count,</if>
<if test="provideDate != null">provide_date,</if>
<if test="provideMan != null and provideMan != ''">provide_man,</if>
<if test="provideSite != null and provideSite != ''">provide_site,</if>
<if test="status != null and status != ''">status,</if>
<if test="status != null">status,</if>
<if test="createSiteCode != null and createSiteCode != ''">create_site_code,</if>
<if test="modifySiteCode != null and modifySiteCode != ''">modify_site_code,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
@ -84,19 +84,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null and remark != ''">remark,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="startNo != null and startNo != ''">#{startNo},</if>
<if test="endNo != null and endNo != ''">#{endNo},</if>
<if test="billCount != null and billCount != ''">#{billCount},</if>
<if test="billFee != null and billFee != ''">#{billFee},</if>
<if test="billCount != null">#{billCount},</if>
<if test="billFee != null">#{billFee},</if>
<if test="curStartNo != null and curStartNo != ''">#{curStartNo},</if>
<if test="hasBillCount != null and hasBillCount != ''">#{hasBillCount},</if>
<if test="hasBillCount != null">#{hasBillCount},</if>
<if test="provideDate != null">#{provideDate},</if>
<if test="provideMan != null and provideMan != ''">#{provideMan},</if>
<if test="provideSite != null and provideSite != ''">#{provideSite},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="status != null">#{status},</if>
<if test="createSiteCode != null and createSiteCode != ''">#{createSiteCode},</if>
<if test="modifySiteCode != null and modifySiteCode != ''">#{modifySiteCode},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
@ -105,7 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null and remark != ''">#{remark},</if>
</trim>
</trim>
</insert>
<update id="updateEmisElectronicPag" parameterType="EmisElectronicPag">
@ -113,14 +113,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="SET" suffixOverrides=",">
<if test="startNo != null and startNo != ''">start_no = #{startNo},</if>
<if test="endNo != null and endNo != ''">end_no = #{endNo},</if>
<if test="billCount != null and billCount != ''">bill_count = #{billCount},</if>
<if test="billFee != null and billFee != ''">bill_fee = #{billFee},</if>
<if test="billCount != null">bill_count = #{billCount},</if>
<if test="billFee != null">bill_fee = #{billFee},</if>
<if test="curStartNo != null and curStartNo != ''">cur_start_no = #{curStartNo},</if>
<if test="hasBillCount != null and hasBillCount != ''">has_bill_count = #{hasBillCount},</if>
<if test="hasBillCount != null">has_bill_count = #{hasBillCount},</if>
<if test="provideDate != null">provide_date = #{provideDate},</if>
<if test="provideMan != null and provideMan != ''">provide_man = #{provideMan},</if>
<if test="provideSite != null and provideSite != ''">provide_site = #{provideSite},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="status != null">status = #{status},</if>
<if test="createSiteCode != null and createSiteCode != ''">create_site_code = #{createSiteCode},</if>
<if test="modifySiteCode != null and modifySiteCode != ''">modify_site_code = #{modifySiteCode},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
@ -138,11 +138,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteEmisElectronicPagByIds" parameterType="String">
delete from emis_electronic_pag where id in
delete from emis_electronic_pag where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>