Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -5,10 +5,10 @@
|
|||||||
<!-- ${ew.customSqlSegment} -->
|
<!-- ${ew.customSqlSegment} -->
|
||||||
|
|
||||||
<insert id="saveBags" parameterType="java.util.List">
|
<insert id="saveBags" parameterType="java.util.List">
|
||||||
insert into lpk_giftbag(sid,createTime,dateStart,dateEnd)
|
insert into lpk_giftbag(sid,createTime,`name`,dateStart,dateEnd)
|
||||||
values
|
values
|
||||||
<foreach collection="bags" item="item" index="index" separator=",">
|
<foreach collection="bags" item="item" index="index" separator=",">
|
||||||
(#{item.sid},#{item.createTime},#{item.dateStart},#{item.dateEnd})
|
(#{item.sid},#{item.createTime},#{item.name},#{item.dateStart},#{item.dateEnd})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|||||||
@@ -1123,6 +1123,7 @@ public class LpkGiftCardService extends MybatisBaseService<LpkGiftCardMapper, Lp
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public ResultBean getExcelInfo3(String startDate, String endDate, MultipartFile file, HttpServletRequest request, HttpServletResponse response) throws IOException {
|
public ResultBean getExcelInfo3(String startDate, String endDate, MultipartFile file, HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||||
ResultBean rb = ResultBean.fireFail();
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
try {
|
||||||
String temp = request.getSession().getServletContext().getRealPath(File.separator) + "temp";// 临时目录
|
String temp = request.getSession().getServletContext().getRealPath(File.separator) + "temp";// 临时目录
|
||||||
File tempFile = new File(temp);
|
File tempFile = new File(temp);
|
||||||
if (!tempFile.exists()) {
|
if (!tempFile.exists()) {
|
||||||
@@ -1272,6 +1273,9 @@ public class LpkGiftCardService extends MybatisBaseService<LpkGiftCardMapper, Lp
|
|||||||
}
|
}
|
||||||
return rb.success().setMsg("本次导入:" + importReturn.size() + "条数据,生成卡券共计" + importReturn.size() + "张;卡券序列号:" + startNo + "-" + endNo);
|
return rb.success().setMsg("本次导入:" + importReturn.size() + "条数据,生成卡券共计" + importReturn.size() + "张;卡券序列号:" + startNo + "-" + endNo);
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
return rb.success().setMsg("导入成功");
|
return rb.success().setMsg("导入成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1345,12 +1349,12 @@ public class LpkGiftCardService extends MybatisBaseService<LpkGiftCardMapper, Lp
|
|||||||
importVoList.add(details);
|
importVoList.add(details);
|
||||||
}
|
}
|
||||||
if (!isNum(temp)) {
|
if (!isNum(temp)) {
|
||||||
setMsg.add("第" + (r + 1) + "行菜品数量必须为大于0的整数");
|
setMsg.add("第" + (r + 1) + "行菜品数量必须为大于等于0的整数");
|
||||||
} else {
|
} else {
|
||||||
if (temp.contains(".")) {
|
if (temp.contains(".")) {
|
||||||
String num = temp.substring(temp.indexOf(".") + 1);
|
String num = temp.substring(temp.indexOf(".") + 1);
|
||||||
if (Integer.parseInt(num) != 0) {
|
if (Integer.parseInt(num) != 0) {
|
||||||
setMsg.add("第" + (r + 1) + "行菜品数量必须为大于0的整数");
|
setMsg.add("第" + (r + 1) + "行菜品数量必须为大于等于0的整数");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user