liuxiaoxu
1 month ago
5 changed files with 0 additions and 604 deletions
@ -1,117 +0,0 @@ |
|||||
package com.ruoyi.ck.domain; |
|
||||
|
|
||||
import com.ruoyi.common.annotation.Excel; |
|
||||
import com.ruoyi.common.core.domain.BaseEntity; |
|
||||
|
|
||||
/** |
|
||||
* 箱号对象 box_workform_head |
|
||||
* |
|
||||
* @author sunzhenhu |
|
||||
* @date 2021-07-20 |
|
||||
*/ |
|
||||
public class BoxWorkformHead extends BaseEntity |
|
||||
{ |
|
||||
private static final long serialVersionUID = 1L; |
|
||||
|
|
||||
/** */ |
|
||||
private Long id; |
|
||||
|
|
||||
/** 箱号 */ |
|
||||
@Excel(name = "箱号") |
|
||||
private String boxCode; |
|
||||
|
|
||||
/** 所属单号 */ |
|
||||
@Excel(name = "所属单号") |
|
||||
private String workformCode; |
|
||||
|
|
||||
|
|
||||
/** 最大值 */ |
|
||||
@Excel(name = "最大值") |
|
||||
private Long maxNum; |
|
||||
|
|
||||
@Excel(name = "当前数量") |
|
||||
private Long currNum; |
|
||||
/** */ |
|
||||
@Excel(name = "") |
|
||||
private String space1; |
|
||||
|
|
||||
/** */ |
|
||||
@Excel(name = "") |
|
||||
private String space2; |
|
||||
|
|
||||
public void setId(Long id) |
|
||||
{ |
|
||||
this.id = id; |
|
||||
} |
|
||||
|
|
||||
public Long getId() |
|
||||
{ |
|
||||
return id; |
|
||||
} |
|
||||
public void setBoxCode(String boxCode) |
|
||||
{ |
|
||||
this.boxCode = boxCode; |
|
||||
} |
|
||||
|
|
||||
public String getBoxCode() |
|
||||
{ |
|
||||
return boxCode; |
|
||||
} |
|
||||
public void setWorkformCode(String workformCode) |
|
||||
{ |
|
||||
this.workformCode = workformCode; |
|
||||
} |
|
||||
|
|
||||
public String getWorkformCode() |
|
||||
{ |
|
||||
return workformCode; |
|
||||
} |
|
||||
public void setMaxNum(Long maxNum) |
|
||||
{ |
|
||||
this.maxNum = maxNum; |
|
||||
} |
|
||||
|
|
||||
public Long getMaxNum() |
|
||||
{ |
|
||||
return maxNum; |
|
||||
} |
|
||||
public void setSpace1(String space1) |
|
||||
{ |
|
||||
this.space1 = space1; |
|
||||
} |
|
||||
|
|
||||
public String getSpace1() |
|
||||
{ |
|
||||
return space1; |
|
||||
} |
|
||||
public void setSpace2(String space2) |
|
||||
{ |
|
||||
this.space2 = space2; |
|
||||
} |
|
||||
|
|
||||
public String getSpace2() |
|
||||
{ |
|
||||
return space2; |
|
||||
} |
|
||||
|
|
||||
public Long getCurrNum() { |
|
||||
return currNum; |
|
||||
} |
|
||||
|
|
||||
public void setCurrNum(Long currNum) { |
|
||||
this.currNum = currNum; |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public String toString() { |
|
||||
return "BoxWorkformHead{" + |
|
||||
"id=" + id + |
|
||||
", boxCode='" + boxCode + '\'' + |
|
||||
", workformCode='" + workformCode + '\'' + |
|
||||
", maxNum=" + maxNum + |
|
||||
", currNum=" + currNum + |
|
||||
", space1='" + space1 + '\'' + |
|
||||
", space2='" + space2 + '\'' + |
|
||||
'}'; |
|
||||
} |
|
||||
} |
|
@ -1,73 +0,0 @@ |
|||||
package com.ruoyi.ck.mapper; |
|
||||
|
|
||||
import com.ruoyi.ck.domain.BoxWorkformHead; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* 箱号Mapper接口 |
|
||||
* |
|
||||
* @author sunzhenhu |
|
||||
* @date 2021-07-20 |
|
||||
*/ |
|
||||
public interface BoxWorkformHeadMapper |
|
||||
{ |
|
||||
/** |
|
||||
* 查询箱号 |
|
||||
* |
|
||||
* @param id 箱号ID |
|
||||
* @return 箱号 |
|
||||
*/ |
|
||||
public BoxWorkformHead selectBoxWorkformHeadById(Long id); |
|
||||
|
|
||||
|
|
||||
/** |
|
||||
* 返回流水数量 |
|
||||
* |
|
||||
* @return 数量 |
|
||||
*/ |
|
||||
public int selectCountByDate(); |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
/** |
|
||||
* 查询箱号列表 |
|
||||
* |
|
||||
* @param boxWorkformHead 箱号 |
|
||||
* @return 箱号集合 |
|
||||
*/ |
|
||||
public List<BoxWorkformHead> selectBoxWorkformHeadList(BoxWorkformHead boxWorkformHead); |
|
||||
|
|
||||
/** |
|
||||
* 新增箱号 |
|
||||
* |
|
||||
* @param boxWorkformHead 箱号 |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int insertBoxWorkformHead(BoxWorkformHead boxWorkformHead); |
|
||||
|
|
||||
/** |
|
||||
* 修改箱号 |
|
||||
* |
|
||||
* @param boxWorkformHead 箱号 |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int updateBoxWorkformHead(BoxWorkformHead boxWorkformHead); |
|
||||
|
|
||||
/** |
|
||||
* 删除箱号 |
|
||||
* |
|
||||
* @param id 箱号ID |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int deleteBoxWorkformHeadById(Long id); |
|
||||
|
|
||||
/** |
|
||||
* 批量删除箱号 |
|
||||
* |
|
||||
* @param ids 需要删除的数据ID |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int deleteBoxWorkformHeadByIds(String[] ids); |
|
||||
} |
|
@ -1,90 +0,0 @@ |
|||||
package com.ruoyi.ck.service; |
|
||||
|
|
||||
import com.ruoyi.ck.domain.BoxWorkformHead; |
|
||||
import com.ruoyi.ck.utils.Result; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* 箱号Service接口 |
|
||||
* |
|
||||
* @author sunzhenhu |
|
||||
* @date 2021-07-20 |
|
||||
*/ |
|
||||
public interface IBoxWorkformHeadService |
|
||||
{ |
|
||||
/** |
|
||||
* 查询箱号 |
|
||||
* |
|
||||
* @param id 箱号ID |
|
||||
* @return 箱号 |
|
||||
*/ |
|
||||
public BoxWorkformHead selectBoxWorkformHeadById(Long id); |
|
||||
|
|
||||
/** |
|
||||
* 返回流水数量 |
|
||||
* |
|
||||
* @return 数量 |
|
||||
*/ |
|
||||
public int selectCountByDate(); |
|
||||
|
|
||||
/** |
|
||||
* 查询箱号列表 |
|
||||
* |
|
||||
* @param boxWorkformHead 箱号 |
|
||||
* @return 箱号集合 |
|
||||
*/ |
|
||||
public List<BoxWorkformHead> selectBoxWorkformHeadList(BoxWorkformHead boxWorkformHead); |
|
||||
|
|
||||
/** |
|
||||
* 新增箱号 |
|
||||
* |
|
||||
* @param boxWorkformHead 箱号 |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int insertBoxWorkformHead(BoxWorkformHead boxWorkformHead); |
|
||||
|
|
||||
/** |
|
||||
* 修改箱号 |
|
||||
* |
|
||||
* @param boxWorkformHead 箱号 |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int updateBoxWorkformHead(BoxWorkformHead boxWorkformHead); |
|
||||
|
|
||||
/** |
|
||||
* 批量删除箱号 |
|
||||
* |
|
||||
* @param ids 需要删除的数据ID |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int deleteBoxWorkformHeadByIds(String ids); |
|
||||
|
|
||||
/** |
|
||||
* 删除箱号信息 |
|
||||
* |
|
||||
* @param id 箱号ID |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int deleteBoxWorkformHeadById(Long id); |
|
||||
|
|
||||
|
|
||||
/** |
|
||||
* 为工单formCode设置n个箱子 |
|
||||
* |
|
||||
* @param boxWorkformHead 箱子相关参数 |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int setBoxNumWorkform(BoxWorkformHead boxWorkformHead); |
|
||||
|
|
||||
/** |
|
||||
* 打印盒子标签 |
|
||||
* |
|
||||
* @param boxWorkformHead 箱子相关参数 |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int printBoxTag(BoxWorkformHead boxWorkformHead); |
|
||||
|
|
||||
public Result deleteBox(String boxCode)throws Exception; |
|
||||
|
|
||||
} |
|
@ -1,232 +0,0 @@ |
|||||
//package com.ruoyi.ck.service.impl;
|
|
||||
//
|
|
||||
//import com.ruoyi.ck.domain.BoxWorkformHead;
|
|
||||
//import com.ruoyi.ck.domain.TagTemplate;
|
|
||||
//import com.ruoyi.ck.domain.WorkformHead;
|
|
||||
//import com.ruoyi.ck.mapper.BoxWorkformHeadMapper;
|
|
||||
//import com.ruoyi.ck.mapper.WorkformBoxProductMapper;
|
|
||||
//import com.ruoyi.ck.mapper.WorkformHeadMapper;
|
|
||||
//import com.ruoyi.ck.service.IBoxWorkformHeadService;
|
|
||||
//import com.ruoyi.ck.utils.Result;
|
|
||||
//import com.ruoyi.common.core.text.Convert;
|
|
||||
//import com.ruoyi.common.utils.BartenderUtils;
|
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
|
||||
//import org.springframework.stereotype.Service;
|
|
||||
//
|
|
||||
//import java.text.SimpleDateFormat;
|
|
||||
//import java.util.*;
|
|
||||
//
|
|
||||
///**
|
|
||||
// * 箱号Service业务层处理
|
|
||||
// *
|
|
||||
// * @author sunzhenhu
|
|
||||
// * @date 2021-07-20
|
|
||||
// */
|
|
||||
//@Service
|
|
||||
//public class BoxWorkformHeadServiceImpl implements IBoxWorkformHeadService {
|
|
||||
// @Autowired
|
|
||||
// private BoxWorkformHeadMapper boxWorkformHeadMapper;
|
|
||||
//
|
|
||||
// @Autowired
|
|
||||
// private WorkformHeadMapper workformHeadMapper;
|
|
||||
//
|
|
||||
// @Autowired
|
|
||||
// private BartenderUtils bartenderUtils;
|
|
||||
//
|
|
||||
// @Autowired
|
|
||||
// private WorkformBoxProductMapper workformBoxProductMapper;
|
|
||||
//
|
|
||||
// /**
|
|
||||
// * 查询箱号
|
|
||||
// *
|
|
||||
// * @param id 箱号ID
|
|
||||
// * @return 箱号
|
|
||||
// */
|
|
||||
// @Override
|
|
||||
// public BoxWorkformHead selectBoxWorkformHeadById(Long id) {
|
|
||||
// return boxWorkformHeadMapper.selectBoxWorkformHeadById(id);
|
|
||||
// }
|
|
||||
//
|
|
||||
// /**
|
|
||||
// * 返回流水数量
|
|
||||
// *
|
|
||||
// * @return 数量
|
|
||||
// */
|
|
||||
// @Override
|
|
||||
// public int selectCountByDate() {
|
|
||||
// return boxWorkformHeadMapper.selectCountByDate();
|
|
||||
// }
|
|
||||
//
|
|
||||
// /**
|
|
||||
// * 查询箱号列表
|
|
||||
// *
|
|
||||
// * @param boxWorkformHead 箱号
|
|
||||
// * @return 箱号
|
|
||||
// */
|
|
||||
// @Override
|
|
||||
// public List<BoxWorkformHead> selectBoxWorkformHeadList(BoxWorkformHead boxWorkformHead) {
|
|
||||
// return boxWorkformHeadMapper.selectBoxWorkformHeadList(boxWorkformHead);
|
|
||||
// }
|
|
||||
//
|
|
||||
// /**
|
|
||||
// * 新增箱号
|
|
||||
// *
|
|
||||
// * @param boxWorkformHead 箱号
|
|
||||
// * @return 结果
|
|
||||
// */
|
|
||||
// @Override
|
|
||||
// public int insertBoxWorkformHead(BoxWorkformHead boxWorkformHead) {
|
|
||||
// return boxWorkformHeadMapper.insertBoxWorkformHead(boxWorkformHead);
|
|
||||
// }
|
|
||||
//
|
|
||||
// /**
|
|
||||
// * 修改箱号
|
|
||||
// *
|
|
||||
// * @param boxWorkformHead 箱号
|
|
||||
// * @return 结果
|
|
||||
// */
|
|
||||
// @Override
|
|
||||
// public int updateBoxWorkformHead(BoxWorkformHead boxWorkformHead) {
|
|
||||
// return boxWorkformHeadMapper.updateBoxWorkformHead(boxWorkformHead);
|
|
||||
// }
|
|
||||
//
|
|
||||
// /**
|
|
||||
// * 删除箱号对象
|
|
||||
// *
|
|
||||
// * @param ids 需要删除的数据ID
|
|
||||
// * @return 结果
|
|
||||
// */
|
|
||||
// @Override
|
|
||||
// public int deleteBoxWorkformHeadByIds(String ids) {
|
|
||||
// return boxWorkformHeadMapper.deleteBoxWorkformHeadByIds(Convert.toStrArray(ids));
|
|
||||
// }
|
|
||||
//
|
|
||||
// /**
|
|
||||
// * 删除箱号信息
|
|
||||
// *
|
|
||||
// * @param id 箱号ID
|
|
||||
// * @return 结果
|
|
||||
// */
|
|
||||
// @Override
|
|
||||
// public int deleteBoxWorkformHeadById(Long id) {
|
|
||||
// return boxWorkformHeadMapper.deleteBoxWorkformHeadById(id);
|
|
||||
// }
|
|
||||
//
|
|
||||
// /**
|
|
||||
// * 为工单formCode设置n个箱子
|
|
||||
// *
|
|
||||
// * @param boxWorkformHead 箱子相关参数
|
|
||||
// * @return 结果
|
|
||||
// */
|
|
||||
// @Override
|
|
||||
// public int setBoxNumWorkform(BoxWorkformHead boxWorkformHead) {
|
|
||||
// WorkformHead workformHead = new WorkformHead();
|
|
||||
// workformHead.setFormCode(boxWorkformHead.getWorkformCode());
|
|
||||
// workformHead = workformHeadMapper.selectWorkformHeadByCode(workformHead);
|
|
||||
// int maxNum = Math.toIntExact(boxWorkformHead.getMaxNum());
|
|
||||
// int sum = workformHead.getFormNeedNum();
|
|
||||
// int boxnum = (sum / maxNum);
|
|
||||
// if (sum % maxNum != 0) {
|
|
||||
// boxnum++;
|
|
||||
// }
|
|
||||
// int key = 0;
|
|
||||
// boxWorkformHead.setCurrNum((long) 0);
|
|
||||
// for (int i = 0; i < boxnum; i++) {
|
|
||||
// key = boxWorkformHeadMapper.insertBoxWorkformHead(boxWorkformHead);
|
|
||||
// if (key == 0) {
|
|
||||
// return key;
|
|
||||
// }
|
|
||||
// }
|
|
||||
// return key;
|
|
||||
// }
|
|
||||
//
|
|
||||
// /**
|
|
||||
// * 打印盒子标签
|
|
||||
// *
|
|
||||
// * @param boxWorkformHead 箱子相关参数
|
|
||||
// * @return 结果
|
|
||||
// */
|
|
||||
// @Override
|
|
||||
// public int printBoxTag(BoxWorkformHead boxWorkformHead) {
|
|
||||
// WorkformHead workformHead = new WorkformHead();
|
|
||||
// workformHead.setFormCode(boxWorkformHead.getWorkformCode());
|
|
||||
// workformHead = workformHeadMapper.selectWorkformHeadByCode(workformHead);
|
|
||||
// if (workformHead == null) {//以防万一这里继续判断一次
|
|
||||
// return 0;
|
|
||||
// }
|
|
||||
// SimpleDateFormat df = new SimpleDateFormat("yyMMdd");
|
|
||||
// SimpleDateFormat df02 = new SimpleDateFormat("MM");
|
|
||||
//
|
|
||||
// Calendar calendar = Calendar.getInstance();
|
|
||||
// calendar.setTimeInMillis(Calendar.getInstance().getTimeInMillis());
|
|
||||
// Date date = new Date();
|
|
||||
// int year = date.getYear();
|
|
||||
// year = year % 10;
|
|
||||
// int count = boxWorkformHeadMapper.selectCountByDate();
|
|
||||
//
|
|
||||
// TagTemplate tagTemplate = new TagTemplate();
|
|
||||
// if (boxWorkformHead.getBoxCode() != null && !boxWorkformHead.getBoxCode().equals("")) {
|
|
||||
// tagTemplate.setBox_id(boxWorkformHead.getBoxCode());
|
|
||||
// String a = boxWorkformHead.getBoxCode().substring(1);
|
|
||||
// tagTemplate.setBox_id_text(a);
|
|
||||
// } else {
|
|
||||
// tagTemplate.initBoxId_text(workformHead.getVendor(), "A", calendar, count);
|
|
||||
// tagTemplate.setBox_id("B" + tagTemplate.getBox_id_text());
|
|
||||
// }
|
|
||||
//
|
|
||||
// tagTemplate.setVendor_text(workformHead.getVendor());
|
|
||||
// tagTemplate.setVendor("V" + workformHead.getVendor());
|
|
||||
//
|
|
||||
// tagTemplate.setBatch_text(year + "" + df02.format(date) + workformHead.getBatch());
|
|
||||
// tagTemplate.setBatch("L" + year + "" + df02.format(date) + workformHead.getBatch());
|
|
||||
//
|
|
||||
// tagTemplate.setCreatetime_text(df.format(date));
|
|
||||
// tagTemplate.setCreatetime("D" + (df.format(date)));
|
|
||||
//
|
|
||||
// tagTemplate.setQuantity_text(String.valueOf(boxWorkformHead.getCurrNum()));
|
|
||||
// tagTemplate.setQuantity("Q" + Math.toIntExact(boxWorkformHead.getCurrNum()));
|
|
||||
//
|
|
||||
// tagTemplate.setWlCode_text(workformHead.getWlCode());
|
|
||||
// tagTemplate.setWlCode("P" + workformHead.getWlCode());
|
|
||||
//
|
|
||||
// tagTemplate.setSpecial_text(workformHead.getSpecial());
|
|
||||
// tagTemplate.setSpecial("S" + workformHead.getSpecial());
|
|
||||
//
|
|
||||
// tagTemplate.setOther_text(workformHead.getOther());
|
|
||||
// if (workformHead.getOther() == null || workformHead.getOther().equals("")) {
|
|
||||
// tagTemplate.setOther_prefix("");
|
|
||||
// } else {
|
|
||||
// tagTemplate.setOther_prefix("(O)");
|
|
||||
// tagTemplate.setOther("O" + workformHead.getOther());
|
|
||||
// }
|
|
||||
// List<TagTemplate> tagTemplates = new ArrayList<>();
|
|
||||
// tagTemplates.add(tagTemplate);
|
|
||||
// int i = bartenderUtils.printQRcodeLabel(Collections.singletonList(tagTemplates));
|
|
||||
// if (i > 0) {
|
|
||||
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
|
||||
// boxWorkformHead.setBoxCode(tagTemplate.getBox_id());
|
|
||||
// boxWorkformHead.setSpace1(format.format(date));
|
|
||||
// return boxWorkformHeadMapper.updateBoxWorkformHead(boxWorkformHead);
|
|
||||
// }
|
|
||||
// return 0;
|
|
||||
// }
|
|
||||
//
|
|
||||
// @Override
|
|
||||
// public Result deleteBox(String boxCode)throws Exception {
|
|
||||
// BoxWorkformHead boxWorkformHead = new BoxWorkformHead();
|
|
||||
// boxWorkformHead.setBoxCode(boxCode);
|
|
||||
// List<BoxWorkformHead> list = boxWorkformHeadMapper.selectBoxWorkformHeadList(boxWorkformHead);
|
|
||||
// if (list.size() > 1) {
|
|
||||
// return Result.getFailResult("箱号查询到多条!", null);
|
|
||||
// }
|
|
||||
// if (list.size() <= 0){
|
|
||||
// return Result.getFailResult("未查询到该箱号!", null);
|
|
||||
// }
|
|
||||
// Long id = list.get(0).getId();
|
|
||||
// boxWorkformHeadMapper.deleteBoxWorkformHeadById(id);
|
|
||||
// workformBoxProductMapper.deleteWorkformBoxProductByBoxId(Math.toIntExact(id));
|
|
||||
// return Result.getSuccessResult(null);
|
|
||||
// }
|
|
||||
//
|
|
||||
//
|
|
||||
//}
|
|
@ -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.BoxWorkformHeadMapper"> |
|
||||
|
|
||||
<resultMap type="BoxWorkformHead" id="BoxWorkformHeadResult"> |
|
||||
<result property="id" column="id" /> |
|
||||
<result property="boxCode" column="box_code" /> |
|
||||
<result property="workformCode" column="workform_code" /> |
|
||||
<result property="maxNum" column="max_num" /> |
|
||||
<result property="currNum" column="curr_num" /> |
|
||||
<result property="space1" column="space1" /> |
|
||||
<result property="space2" column="space2" /> |
|
||||
</resultMap> |
|
||||
|
|
||||
<sql id="selectBoxWorkformHeadVo"> |
|
||||
select id, box_code, workform_code, max_num, curr_num, space1, space2 from box_workform_head |
|
||||
</sql> |
|
||||
|
|
||||
<select id="selectBoxWorkformHeadList" parameterType="BoxWorkformHead" resultMap="BoxWorkformHeadResult"> |
|
||||
<include refid="selectBoxWorkformHeadVo"/> |
|
||||
<where> |
|
||||
<if test="boxCode != null and boxCode != ''"> and box_code = #{boxCode}</if> |
|
||||
<if test="workformCode != null and workformCode != ''"> and workform_code = #{workformCode}</if> |
|
||||
<if test="maxNum != null "> and max_num = #{maxNum}</if> |
|
||||
<if test="currNum != null "> and curr_num = #{currNum}</if> |
|
||||
<if test="space1 != null and space1 != ''"> and space1 = #{space1}</if> |
|
||||
<if test="space2 != null and space2 != ''"> and space2 = #{space2}</if> |
|
||||
</where> |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectBoxWorkformHeadById" parameterType="Long" resultMap="BoxWorkformHeadResult"> |
|
||||
<include refid="selectBoxWorkformHeadVo"/> |
|
||||
where id = #{id} |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectCountByDate" parameterType="String" resultType="int"> |
|
||||
select count(*) from box_workform_head |
|
||||
where space1 != "" |
|
||||
|
|
||||
</select> |
|
||||
|
|
||||
|
|
||||
<insert id="insertBoxWorkformHead" parameterType="BoxWorkformHead" useGeneratedKeys="true" keyProperty="id"> |
|
||||
insert into box_workform_head |
|
||||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
||||
<if test="boxCode != null">box_code,</if> |
|
||||
<if test="workformCode != null">workform_code,</if> |
|
||||
<if test="maxNum != null">max_num,</if> |
|
||||
<if test="currNum != null "> curr_num</if> |
|
||||
|
|
||||
<if test="space1 != null">space1,</if> |
|
||||
<if test="space2 != null">space2,</if> |
|
||||
</trim> |
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
||||
<if test="boxCode != null">#{boxCode},</if> |
|
||||
<if test="workformCode != null">#{workformCode},</if> |
|
||||
<if test="maxNum != null">#{maxNum},</if> |
|
||||
<if test="currNum != null ">#{currNum}</if> |
|
||||
|
|
||||
<if test="space1 != null">#{space1},</if> |
|
||||
<if test="space2 != null">#{space2},</if> |
|
||||
</trim> |
|
||||
</insert> |
|
||||
|
|
||||
<update id="updateBoxWorkformHead" parameterType="BoxWorkformHead"> |
|
||||
update box_workform_head |
|
||||
<trim prefix="SET" suffixOverrides=","> |
|
||||
<if test="boxCode != null">box_code = #{boxCode},</if> |
|
||||
<if test="workformCode != null">workform_code = #{workformCode},</if> |
|
||||
<if test="maxNum != null">max_num = #{maxNum},</if> |
|
||||
<if test="currNum != null">curr_num = #{currNum},</if> |
|
||||
<if test="space1 != null">space1 = #{space1},</if> |
|
||||
<if test="space2 != null">space2 = #{space2},</if> |
|
||||
</trim> |
|
||||
where id = #{id} |
|
||||
</update> |
|
||||
|
|
||||
<delete id="deleteBoxWorkformHeadById" parameterType="Long"> |
|
||||
delete from box_workform_head where id = #{id} |
|
||||
</delete> |
|
||||
|
|
||||
<delete id="deleteBoxWorkformHeadByIds" parameterType="String"> |
|
||||
delete from box_workform_head where id in |
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|
||||
#{id} |
|
||||
</foreach> |
|
||||
</delete> |
|
||||
|
|
||||
|
|
||||
</mapper> |
|
Loading…
Reference in new issue