Browse Source

删除旧版无用的标签打印模板 tag_template和系统中对应的前端所有代码和后端所有代码 和对应的系统菜单数据

dev
liuxiaoxu 1 month ago
parent
commit
60d6333813
  1. 249
      ruoyi-admin/src/main/java/com/ruoyi/ck/domain/TagTemplate.java
  2. 63
      ruoyi-admin/src/main/java/com/ruoyi/ck/mapper/TagTemplateMapper.java
  3. 61
      ruoyi-admin/src/main/java/com/ruoyi/ck/service/ITagTemplateService.java
  4. 95
      ruoyi-admin/src/main/java/com/ruoyi/ck/service/impl/TagTemplateServiceImpl.java
  5. 92
      ruoyi-admin/src/main/resources/mapper/ck/TagTemplateMapper.xml

249
ruoyi-admin/src/main/java/com/ruoyi/ck/domain/TagTemplate.java

@ -1,249 +0,0 @@
package com.ruoyi.ck.domain;
import java.math.BigInteger;
import java.util.Calendar;
/**
* Created by sunzhenhu on 2021/7/26 14:44
* 标签打印模板
*/
public class TagTemplate {
private String box_id;
private String box_id_text;
private String wlCode;
private String wlCode_text;
private String batch;
private String batch_text;
private String vendor;
private String vendor_text;
private String quantity;
private String quantity_text;
private String createtime;
private String createtime_text;
// private String workformcode;
private String special;
private String special_text;
private String other;
private String other_text;
private String other_prefix;
public void initBoxId_text(String vendor, String address, Calendar calendar,int sn){
StringBuilder builder=new StringBuilder();
String convert="0123456789ABCDEFGHJKLMNPRSTUVWXYZ";
String date=dateConvert(calendar);
BigInteger bigInteger=new BigInteger(String.valueOf((sn+1)),10);
int dec=bigInteger.intValue();
StringBuilder result= new StringBuilder(base(dec, convert));
int dis=5-result.length();
for (int j=1;j<=dis;j++){
result.insert(0, "0");
}
builder.append(vendor).append(address).append(date).append(result);
this.box_id_text=builder.toString();
}
public String base(int num,String convert){
if (num<convert.length()){
return convert.substring(num,num+1);
}
int high = num / convert.length();
int unit=num%convert.length();
return base(high,convert)+convert.substring(unit,unit+1);
}
public String dateConvert(Calendar calendar){
// calendar.setTimeInMillis(Calendar.getInstance().getTimeInMillis());//时间戳
calendar.setFirstDayOfWeek(Calendar.MONDAY);//设置星期一为一周开始的第一天
calendar.setMinimalDaysInFirstWeek(4);//
// calendar.set(2021,0,4);
int year = calendar.get(Calendar.YEAR);
int month = calendar.get(Calendar.MONTH);
// int date = calendar.get(Calendar.DATE);
int weekOfYear=calendar.get(Calendar.WEEK_OF_YEAR);
if (month==11&&weekOfYear==1){
year++;
}else if(month==0&&weekOfYear>50){
year--;
}
year=year%10;
String weekYear=weekOfYear+"";
for (int i=0;i<2;i++){
if (weekYear.length()<2){
weekYear="0"+weekYear;
}
}
String result=year+""+weekYear;
System.out.println(result);
return result;
}
public String getBox_id_text() {
return box_id_text;
}
public void setBox_id_text(String box_id_text) {
this.box_id_text = box_id_text;
}
public String getWlCode_text() {
return wlCode_text;
}
public void setWlCode_text(String wlCode_text) {
this.wlCode_text = wlCode_text;
}
public String getBatch_text() {
return batch_text;
}
public void setBatch_text(String batch_text) {
this.batch_text = batch_text;
}
public String getVendor_text() {
return vendor_text;
}
public void setVendor_text(String vendor_text) {
this.vendor_text = vendor_text;
}
public String getQuantity_text() {
return quantity_text;
}
public void setQuantity_text(String quantity_text) {
this.quantity_text = quantity_text;
}
public String getCreatetime_text() {
return createtime_text;
}
public void setCreatetime_text(String createtime_text) {
this.createtime_text = createtime_text;
}
public String getSpecial_text() {
return special_text;
}
public void setSpecial_text(String special_text) {
this.special_text = special_text;
}
public String getBox_id() {
return box_id;
}
public void setBox_id(String box_id) {
this.box_id = box_id;
}
public String getWlCode() {
return wlCode;
}
public void setWlCode(String wlCode) {
this.wlCode = wlCode;
}
public String getBatch() {
return batch;
}
public void setBatch(String batch) {
this.batch = batch;
}
public String getVendor() {
return vendor;
}
public void setVendor(String vendor) {
this.vendor = vendor;
}
public String getQuantity() {
return quantity;
}
public void setQuantity(String quantity) {
this.quantity = quantity;
}
public String getCreatetime() {
return createtime;
}
public void setCreatetime(String createtime) {
this.createtime = createtime;
}
public String getOther() {
return other;
}
public void setOther(String other) {
this.other = other;
}
public String getOther_text() {
return other_text;
}
public void setOther_text(String other_text) {
this.other_text = other_text;
}
public String getOther_prefix() {
return other_prefix;
}
public void setOther_prefix(String other_prefix) {
this.other_prefix = other_prefix;
}
// public String getWorkformcode() {
// return workformcode;
// }
//
// public void setWorkformcode(String workformcode) {
// this.workformcode = workformcode;
// }
//
//
public String getSpecial() {
return special;
}
public void setSpecial(String special) {
this.special = special;
}
@Override
public String toString() {
return "TagTemplate{" +
"box_id='" + box_id + '\'' +
", box_id_text='" + box_id_text + '\'' +
", wlCode='" + wlCode + '\'' +
", wlCode_text='" + wlCode_text + '\'' +
", batch='" + batch + '\'' +
", batch_text='" + batch_text + '\'' +
", vendor='" + vendor + '\'' +
", vendor_text='" + vendor_text + '\'' +
", quantity='" + quantity + '\'' +
", quantity_text='" + quantity_text + '\'' +
", createtime='" + createtime + '\'' +
", createtime_text='" + createtime_text + '\'' +
", special='" + special + '\'' +
", special_text='" + special_text + '\'' +
", other='" + other + '\'' +
", other_text='" + other_text + '\'' +
", other_prefix='" + other_prefix + '\'' +
'}';
}
}

63
ruoyi-admin/src/main/java/com/ruoyi/ck/mapper/TagTemplateMapper.java

@ -1,63 +0,0 @@
package com.ruoyi.ck.mapper;
import com.ruoyi.ck.domain.TagTemplate;
import java.util.List;
/**
* 标签打印记录Mapper接口
*
* @author ruoyi
* @date 2021-07-26
*/
public interface TagTemplateMapper
{
/**
* 查询标签打印记录
*
* @param id 标签打印记录ID
* @return 标签打印记录
*/
public TagTemplate selectTagTemplateById(Long id);
/**
* 查询标签打印记录列表
*
* @param tagTemplate 标签打印记录
* @return 标签打印记录集合
*/
public List<TagTemplate> selectTagTemplateList(TagTemplate tagTemplate);
/**
* 新增标签打印记录
*
* @param tagTemplate 标签打印记录
* @return 结果
*/
public int insertTagTemplate(TagTemplate tagTemplate);
/**
* 修改标签打印记录
*
* @param tagTemplate 标签打印记录
* @return 结果
*/
public int updateTagTemplate(TagTemplate tagTemplate);
/**
* 删除标签打印记录
*
* @param id 标签打印记录ID
* @return 结果
*/
public int deleteTagTemplateById(Long id);
/**
* 批量删除标签打印记录
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteTagTemplateByIds(String[] ids);
}

61
ruoyi-admin/src/main/java/com/ruoyi/ck/service/ITagTemplateService.java

@ -1,61 +0,0 @@
package com.ruoyi.ck.service;
import java.util.List;
import com.ruoyi.ck.domain.TagTemplate;
/**
* 标签打印记录Service接口
*
* @author ruoyi
* @date 2021-07-26
*/
public interface ITagTemplateService
{
/**
* 查询标签打印记录
*
* @param id 标签打印记录ID
* @return 标签打印记录
*/
public TagTemplate selectTagTemplateById(Long id);
/**
* 查询标签打印记录列表
*
* @param tagTemplate 标签打印记录
* @return 标签打印记录集合
*/
public List<TagTemplate> selectTagTemplateList(TagTemplate tagTemplate);
/**
* 新增标签打印记录
*
* @param tagTemplate 标签打印记录
* @return 结果
*/
public int insertTagTemplate(TagTemplate tagTemplate);
/**
* 修改标签打印记录
*
* @param tagTemplate 标签打印记录
* @return 结果
*/
public int updateTagTemplate(TagTemplate tagTemplate);
/**
* 批量删除标签打印记录
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteTagTemplateByIds(String ids);
/**
* 删除标签打印记录信息
*
* @param id 标签打印记录ID
* @return 结果
*/
public int deleteTagTemplateById(Long id);
}

95
ruoyi-admin/src/main/java/com/ruoyi/ck/service/impl/TagTemplateServiceImpl.java

@ -1,95 +0,0 @@
package com.ruoyi.ck.service.impl;
import com.ruoyi.ck.domain.TagTemplate;
import com.ruoyi.ck.mapper.TagTemplateMapper;
import com.ruoyi.ck.service.ITagTemplateService;
import com.ruoyi.common.core.text.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 标签打印记录Service业务层处理
*
* @author ruoyi
* @date 2021-07-26
*/
@Service
public class TagTemplateServiceImpl implements ITagTemplateService
{
@Autowired
private TagTemplateMapper tagTemplateMapper;
/**
* 查询标签打印记录
*
* @param id 标签打印记录ID
* @return 标签打印记录
*/
@Override
public TagTemplate selectTagTemplateById(Long id)
{
return tagTemplateMapper.selectTagTemplateById(id);
}
/**
* 查询标签打印记录列表
*
* @param tagTemplate 标签打印记录
* @return 标签打印记录
*/
@Override
public List<TagTemplate> selectTagTemplateList(TagTemplate tagTemplate)
{
return tagTemplateMapper.selectTagTemplateList(tagTemplate);
}
/**
* 新增标签打印记录
*
* @param tagTemplate 标签打印记录
* @return 结果
*/
@Override
public int insertTagTemplate(TagTemplate tagTemplate)
{
return tagTemplateMapper.insertTagTemplate(tagTemplate);
}
/**
* 修改标签打印记录
*
* @param tagTemplate 标签打印记录
* @return 结果
*/
@Override
public int updateTagTemplate(TagTemplate tagTemplate)
{
return tagTemplateMapper.updateTagTemplate(tagTemplate);
}
/**
* 删除标签打印记录对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteTagTemplateByIds(String ids)
{
return tagTemplateMapper.deleteTagTemplateByIds(Convert.toStrArray(ids));
}
/**
* 删除标签打印记录信息
*
* @param id 标签打印记录ID
* @return 结果
*/
@Override
public int deleteTagTemplateById(Long id)
{
return tagTemplateMapper.deleteTagTemplateById(id);
}
}

92
ruoyi-admin/src/main/resources/mapper/ck/TagTemplateMapper.xml

@ -1,92 +0,0 @@
<?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">
<mapper namespace="com.ruoyi.ck.mapper.TagTemplateMapper">
<resultMap type="TagTemplate" id="TagTemplateResult">
<result property="id" column="id" />
<result property="wlCode" column="wlCode" />
<result property="batch" column="batch" />
<result property="vendor" column="vendor" />
<result property="quantity" column="quantity" />
<result property="createtime" column="createtime" />
<result property="special" column="special" />
<result property="workformcode" column="workformcode" />
</resultMap>
<sql id="selectTagTemplateVo">
select id, wlCode, batch, vendor, quantity, createtime, special, workformcode from tag_template
</sql>
<select id="selectTagTemplateList" parameterType="TagTemplate" resultMap="TagTemplateResult">
<include refid="selectTagTemplateVo"/>
<where>
<if test="wlCode != null and wlCode != ''"> and wlCode = #{wlCode}</if>
<if test="batch != null and batch != ''"> and batch = #{batch}</if>
<if test="vendor != null and vendor != ''"> and vendor = #{vendor}</if>
<if test="quantity != null "> and quantity = #{quantity}</if>
<if test="createtime != null and createtime != ''"> and createtime = #{createtime}</if>
<if test="special != null and special != ''"> and special = #{special}</if>
<if test="workformcode != null and workformcode != ''"> and workformcode = #{workformcode}</if>
</where>
</select>
<select id="selectTagTemplateById" parameterType="Long" resultMap="TagTemplateResult">
<include refid="selectTagTemplateVo"/>
where id = #{id}
</select>
<insert id="insertTagTemplate" parameterType="TagTemplate" useGeneratedKeys="true" keyProperty="id">
insert into tag_template
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="wlCode != null">wlCode,</if>
<if test="batch != null">batch,</if>
<if test="vendor != null">vendor,</if>
<if test="quantity != null">quantity,</if>
<if test="createtime != null">createtime,</if>
<if test="special != null">special,</if>
<if test="workformcode != null">workformcode,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="wlCode != null">#{wlCode},</if>
<if test="batch != null">#{batch},</if>
<if test="vendor != null">#{vendor},</if>
<if test="quantity != null">#{quantity},</if>
<if test="createtime != null">#{createtime},</if>
<if test="special != null">#{special},</if>
<if test="workformcode != null">#{workformcode},</if>
</trim>
</insert>
<update id="updateTagTemplate" parameterType="TagTemplate">
update tag_template
<trim prefix="SET" suffixOverrides=",">
<if test="wlCode != null">wlCode = #{wlCode},</if>
<if test="batch != null">batch = #{batch},</if>
<if test="vendor != null">vendor = #{vendor},</if>
<if test="quantity != null">quantity = #{quantity},</if>
<if test="createtime != null">createtime = #{createtime},</if>
<if test="special != null">special = #{special},</if>
<if test="workformcode != null">workformcode = #{workformcode},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTagTemplateById" parameterType="Long">
delete from tag_template where id = #{id}
</delete>
<delete id="deleteTagTemplateByIds" parameterType="String">
delete from tag_template where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
Loading…
Cancel
Save