新增采购单
This commit is contained in:
parent
bfe641ed15
commit
3451fd40fd
|
@ -1,12 +1,15 @@
|
|||
package com.snow.web.controller.system;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.excel.ExcelReader;
|
||||
import com.alibaba.excel.read.metadata.ReadSheet;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.snow.common.constant.SequenceContants;
|
||||
import com.snow.common.utils.poi.EasyExcelUtil;
|
||||
import com.snow.framework.excel.FinanceAlipayFlowListener;
|
||||
import com.snow.framework.excel.PurchaseOrderListener;
|
||||
import com.snow.framework.util.ShiroUtils;
|
||||
|
@ -33,6 +36,8 @@ import com.snow.common.utils.poi.ExcelUtil;
|
|||
import com.snow.common.core.page.TableDataInfo;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* 采购单主表Controller
|
||||
*
|
||||
|
@ -84,6 +89,29 @@ public class PurchaseOrderController extends BaseController
|
|||
return util.exportExcel(list, "purchaseOrder");
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载标准模板
|
||||
*/
|
||||
@GetMapping("/download")
|
||||
@ResponseBody
|
||||
public AjaxResult download(HttpServletResponse response)
|
||||
{
|
||||
PurchaseOrderImport purchaseOrderImport=new PurchaseOrderImport();
|
||||
purchaseOrderImport.setGoodsNo("CSJ0001");
|
||||
purchaseOrderImport.setGoodsName("示例商品1");
|
||||
purchaseOrderImport.setGoodsPrice(new BigDecimal(2.5));
|
||||
purchaseOrderImport.setGoodsQuantity(new BigDecimal(2));
|
||||
purchaseOrderImport.setGoodsSize("示例规格1");
|
||||
purchaseOrderImport.setRemark("示例备注1");
|
||||
List<PurchaseOrderImport> list=Lists.newArrayList();
|
||||
list.add(purchaseOrderImport);
|
||||
try {
|
||||
EasyExcelUtil.writeExcel("采购单明细表","明细表",PurchaseOrderImport.class,list,response);
|
||||
return AjaxResult.success("下载成功");
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("下载模板异常,请联系管理员");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 新增采购单主表
|
||||
*/
|
||||
|
@ -170,4 +198,17 @@ public class PurchaseOrderController extends BaseController
|
|||
{
|
||||
return toAjax(purchaseOrderMainService.deletePurchaseOrderMainByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 详情页
|
||||
*/
|
||||
@GetMapping("/detail/{id}")
|
||||
public String detail(@PathVariable("id") Integer id, ModelMap mmap)
|
||||
{
|
||||
PurchaseOrderMain purchaseOrderMain = purchaseOrderMainService.selectPurchaseOrderMainById(id);
|
||||
mmap.put("purchaseOrder", purchaseOrderMain);
|
||||
return prefix + "/detail";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
// -----------------------------------------------------------------------
|
||||
// Eros Fratini - eros@recoding.it
|
||||
// jqprint 0.3
|
||||
//
|
||||
// - 19/06/2009 - some new implementations, added Opera support
|
||||
// - 11/05/2009 - first sketch
|
||||
//
|
||||
// Printing plug-in for jQuery, evolution of jPrintArea: http://plugins.jquery.com/project/jPrintArea
|
||||
// requires jQuery 1.3.x
|
||||
//
|
||||
// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
(function($) {
|
||||
var opt;
|
||||
|
||||
$.fn.jqprint = function (options) {
|
||||
opt = $.extend({}, $.fn.jqprint.defaults, options);
|
||||
|
||||
var $element = (this instanceof jQuery) ? this : $(this);
|
||||
|
||||
if (opt.operaSupport && $.browser.opera)
|
||||
{
|
||||
var tab = window.open("","jqPrint-preview");
|
||||
tab.document.open();
|
||||
|
||||
var doc = tab.document;
|
||||
}
|
||||
else
|
||||
{
|
||||
var $iframe = $("<iframe />");
|
||||
|
||||
if (!opt.debug) { $iframe.css({ position: "absolute", width: "0px", height: "0px", left: "-600px", top: "-600px" }); }
|
||||
|
||||
$iframe.appendTo("body");
|
||||
var doc = $iframe[0].contentWindow.document;
|
||||
}
|
||||
|
||||
if (opt.importCSS)
|
||||
{
|
||||
if ($("link[media=print]").length > 0)
|
||||
{
|
||||
$("link[media=print]").each( function() {
|
||||
doc.write("<link type='text/css' rel='stylesheet' href='" + $(this).attr("href") + "' media='print' />");
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
$("link").each( function() {
|
||||
doc.write("<link type='text/css' rel='stylesheet' href='" + $(this).attr("href") + "' />");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (opt.printContainer) { doc.write($element.outer()); }
|
||||
else { $element.each( function() { doc.write($(this).html()); }); }
|
||||
|
||||
doc.close();
|
||||
|
||||
(opt.operaSupport && $.browser.opera ? tab : $iframe[0].contentWindow).focus();
|
||||
setTimeout( function() { (opt.operaSupport && $.browser.opera ? tab : $iframe[0].contentWindow).print(); if (tab) { tab.close(); } }, 1000);
|
||||
}
|
||||
|
||||
$.fn.jqprint.defaults = {
|
||||
debug: false,
|
||||
importCSS: true,
|
||||
printContainer: true,
|
||||
operaSupport: true
|
||||
};
|
||||
|
||||
// Thanks to 9__, found at http://users.livejournal.com/9__/380664.html
|
||||
jQuery.fn.outer = function() {
|
||||
return $($('<div></div>').html(this.clone())).html();
|
||||
}
|
||||
})(jQuery);
|
|
@ -209,3 +209,7 @@
|
|||
<div th:fragment="bootstrap-table-print-js">
|
||||
<script th:src="@{/ajax/libs/bootstrap-table/extensions/print/bootstrap-table-print.min.js?v=20200729}"></script>
|
||||
</div>
|
||||
<!-- 打印插件 -->
|
||||
<div th:fragment="jquery.jqprint-0.3.js">
|
||||
<script th:src="@{/js/jquery.jqprint-0.3.js}"></script>
|
||||
</div>
|
||||
|
|
|
@ -13,16 +13,11 @@
|
|||
<div class="col-sm-4">
|
||||
<input name="orderNo" class="form-control" type="text" th:value="${orderNo}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">采购标题:</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="col-sm-4">
|
||||
<input name="title" class="form-control" type="text" required>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-3 control-label">总数量:</label>
|
||||
<div class="col-sm-8">
|
||||
|
@ -77,7 +72,6 @@
|
|||
<a class="btn btn-sm btn-info" onclick="importData()" shiro:hasPermission="system:purchaseOrder:import">
|
||||
<i class="fa fa-upload"></i> 导入
|
||||
</a>
|
||||
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
|
@ -89,7 +83,8 @@
|
|||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<script th:src="@{/js/jquery.tmpl.js}"></script>
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/purchaseOrder"
|
||||
var prefix = ctx + "system/purchaseOrder";
|
||||
|
||||
$("#form-purchaseOrder-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
@ -287,9 +282,9 @@
|
|||
<div class="col-sm-4">
|
||||
<input type="file" id="file" name="file"/>
|
||||
</div>
|
||||
<!-- <div class="col-sm-4">
|
||||
<a onclick="$.table.importTemplate()" class="btn btn-xs btn-danger"><i class="fa fa-file-excel-o"></i> 下载模板</a>
|
||||
</div>-->
|
||||
<div class="col-sm-4">
|
||||
<a href="/system/purchaseOrder/download" class="btn btn-xs btn-danger"><i class="fa fa-file-excel-o"></i> 下载模板</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<font color="red" class="pull-left mt10">
|
||||
|
|
|
@ -0,0 +1,179 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('人事审批')" />
|
||||
<th:block th:include="include :: jsonview-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
|
||||
<form class="form-horizontal m-t" id="signupForm">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-0 col-sm-10">
|
||||
<button type="button" class="btn btn-success btn-sm" onclick="printData()"><i class="fa fa-plus"> 打印</i></button>
|
||||
<!--<button type="button" class="btn btn-sm btn-primary" onclick="submitCheckHandler()"><i class="fa fa-check"></i>通 过</button>
|
||||
<button type="button" class="btn btn-sm btn-danger" onclick="submitHandler()"><i class="fa fa-remove"></i>驳 回</button> -->
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<!--<input class="form-control" type="hidden" name="taskId" th:value="*{taskId}"/>
|
||||
<input class="form-control" type="hidden" name="businessKey" th:value="${sysOaLeave.leaveNo}"/>-->
|
||||
<input name="id" th:value="${purchaseOrder.id}" type="hidden">
|
||||
<h2 class="form-header h4" align="center" >采购单信息</h2>
|
||||
<br/>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">单号:</label>
|
||||
<div class="col-sm-2">
|
||||
<div class="form-control-static" style="float:left">
|
||||
<span th:text="${purchaseOrder.orderNo}"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">采购标题:</label>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-control-static" style="float:left">
|
||||
<span th:text="${purchaseOrder.title}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">供应商:</label>
|
||||
<div class="col-sm-2">
|
||||
<div class="form-control-static" style="float:left">
|
||||
<span th:text="${purchaseOrder.supplierName}"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">订货日期:</label>
|
||||
<div class="col-sm-2">
|
||||
<div class="form-control-static" style="float:left">
|
||||
<span th:text="${#dates.format(purchaseOrder.orderTime, 'yyyy-MM-dd')}"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">交货日期:</label>
|
||||
<div class="col-sm-2">
|
||||
<div class="form-control-static" style="float:left">
|
||||
<span th:text="${#dates.format(purchaseOrder.deliveryDate, 'yyyy-MM-dd')}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">采购人:</label>
|
||||
<div class="col-sm-2">
|
||||
<div class="form-control-static" style="float:left">
|
||||
<span th:text="${purchaseOrder.belongUser}"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">总数量:</label>
|
||||
<div class="col-sm-2">
|
||||
<div class="form-control-static" style="float:left">
|
||||
<span th:text="${purchaseOrder.totalQuantity}"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">采购总金额:</label>
|
||||
<div class="col-sm-2">
|
||||
<div class="form-control-static" style="float:left">
|
||||
<span th:text="${purchaseOrder.totalPrice}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">备注:</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="form-control-static"><pre id="reason"></pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4 class="form-header h4">采购单明细</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<!-- <button type="button" class="btn btn-success btn-sm" onclick="addColumn()"><i class="fa fa-plus"> 增加</i></button>
|
||||
<button type="button" class="btn btn-warning btn-sm" onclick="sub.delColumn()"><i class="fa fa-minus"> 删除</i></button>-->
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: jsonview-js" />
|
||||
<script src="http://www.jq22.com/jquery/jquery-migrate-1.2.1.min.js"></script>
|
||||
<script th:src="@{/js/jquery.jqprint-0.3.js}"></script>
|
||||
<script th:inline="javascript">
|
||||
|
||||
function printData(){
|
||||
$("#signupForm").jqprint();
|
||||
}
|
||||
$(function() {
|
||||
var reason = [[${purchaseOrder.remark}]];
|
||||
console.log(reason);
|
||||
if ($.common.isNotEmpty(reason) && reason.length < 2000) {
|
||||
$("#reason").text(reason);
|
||||
} else {
|
||||
$("#reason").text(reason);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
data: [[${purchaseOrder.purchaseOrderItemList}]],
|
||||
pagination: false,
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
sidePagination: "client",
|
||||
columns: [
|
||||
{
|
||||
field: 'index',
|
||||
align: 'center',
|
||||
title: "序号",
|
||||
formatter: function (value, row, index) {
|
||||
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
|
||||
return columnIndex + $.table.serialNumber(index);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'goodsNo',
|
||||
align: 'center',
|
||||
title: '货物编号'
|
||||
},
|
||||
{
|
||||
field: 'goodsName',
|
||||
align: 'center',
|
||||
title: '名称'
|
||||
},
|
||||
{
|
||||
field: 'goodsSize',
|
||||
align: 'center',
|
||||
title: '规格'
|
||||
},
|
||||
{
|
||||
field: 'goodsQuantity',
|
||||
align: 'center',
|
||||
title: '数量'
|
||||
},
|
||||
{
|
||||
field: 'goodsPrice',
|
||||
align: 'center',
|
||||
title: '单价'
|
||||
},
|
||||
{
|
||||
field: 'totalPrice',
|
||||
align: 'center',
|
||||
title: '总价'
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
align: 'center',
|
||||
title: '备注'
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -83,6 +83,7 @@
|
|||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
detailUrl:prefix + "/detail/{id}",
|
||||
modalName: "采购单",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
|
@ -138,6 +139,7 @@
|
|||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-print"></i>详情</a> ');
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
|
|
|
@ -6,6 +6,7 @@ import com.alibaba.excel.support.ExcelTypeEnum;
|
|||
import com.alibaba.excel.write.builder.ExcelWriterBuilder;
|
||||
import com.alibaba.excel.write.builder.ExcelWriterSheetBuilder;
|
||||
import com.alibaba.excel.write.metadata.WriteSheet;
|
||||
import com.alibaba.excel.write.metadata.WriteWorkbook;
|
||||
import com.alibaba.excel.write.style.HorizontalCellStyleStrategy;
|
||||
import com.snow.common.annotation.Excel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
@ -18,6 +19,8 @@ import java.io.IOException;
|
|||
import java.io.OutputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
/**
|
||||
* @author qimingjin
|
||||
* @Title: easyExcel 实体类
|
||||
|
@ -25,9 +28,24 @@ import java.util.List;
|
|||
* @date 2020/12/31 14:06
|
||||
*/
|
||||
@Slf4j
|
||||
public class EasyExcelUtil {
|
||||
|
||||
private static OutputStream getOutputStream(HttpServletResponse response,
|
||||
public class EasyExcelUtil{
|
||||
/**
|
||||
* 写入Excel
|
||||
* @param fileName
|
||||
* @param response
|
||||
* @throws Exception
|
||||
*/
|
||||
public static void writeExcel(String fileName,String sheetName, Class classClass,List list, HttpServletResponse response ) throws Exception{
|
||||
WriteWorkbook writeWorkbook=new WriteWorkbook();
|
||||
writeWorkbook.setOutputStream(getOutputStream(response,fileName,ExcelTypeEnum.XLSX));
|
||||
ExcelWriter excelWriter = new ExcelWriter(writeWorkbook);
|
||||
WriteSheet writeSheet = EasyExcel.writerSheet(sheetName).build();
|
||||
writeSheet.setSheetNo(1);
|
||||
writeSheet.setClazz(classClass);
|
||||
excelWriter.write(list, writeSheet);
|
||||
excelWriter.finish();
|
||||
}
|
||||
public static OutputStream getOutputStream(HttpServletResponse response,
|
||||
String fileName,
|
||||
ExcelTypeEnum excelTypeEnum) throws IOException {
|
||||
try {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.snow.system.domain;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.snow.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
@ -16,28 +17,28 @@ import java.math.BigDecimal;
|
|||
public class PurchaseOrderImport {
|
||||
|
||||
/** 货物编号 */
|
||||
@ExcelProperty(index = 0)
|
||||
@ExcelProperty(index = 0,value = { "货物编号"})
|
||||
private String goodsNo;
|
||||
/** 名称 */
|
||||
@ExcelProperty(index = 1)
|
||||
@ExcelProperty(index = 1,value = { "名称"})
|
||||
private String goodsName;
|
||||
|
||||
/** 规格 */
|
||||
@ExcelProperty(index = 2)
|
||||
@ExcelProperty(index = 2,value = {"规格"})
|
||||
private String goodsSize;
|
||||
|
||||
/** 数量 */
|
||||
@ExcelProperty(index = 3)
|
||||
@ExcelProperty(index = 3,value = { "数量"})
|
||||
private BigDecimal goodsQuantity;
|
||||
|
||||
/** 单价 */
|
||||
@ExcelProperty(index = 4)
|
||||
@ExcelProperty(index = 4,value = { "单价"})
|
||||
private BigDecimal goodsPrice;
|
||||
/** 备注 */
|
||||
@ExcelProperty(index = 5)
|
||||
@ExcelProperty(index = 5,value = { "备注"})
|
||||
private String remark;
|
||||
/** 总价 */
|
||||
|
||||
@ExcelIgnore
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
|
||||
|
|
|
@ -83,5 +83,5 @@ public interface PurchaseOrderMainMapper
|
|||
* @param roleId 角色ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePurchaseOrderItemByPurchaseOrderNo(Integer id);
|
||||
public int deletePurchaseOrderItemByPurchaseOrderNo(String id);
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ public class PurchaseOrderMainServiceImpl implements IPurchaseOrderMainService
|
|||
public int updatePurchaseOrderMain(PurchaseOrderMain purchaseOrderMain)
|
||||
{
|
||||
purchaseOrderMain.setUpdateTime(DateUtils.getNowDate());
|
||||
purchaseOrderMainMapper.deletePurchaseOrderItemByPurchaseOrderNo(purchaseOrderMain.getId());
|
||||
purchaseOrderMainMapper.deletePurchaseOrderItemByPurchaseOrderNo(purchaseOrderMain.getOrderNo());
|
||||
insertPurchaseOrderItem(purchaseOrderMain);
|
||||
return purchaseOrderMainMapper.updatePurchaseOrderMain(purchaseOrderMain);
|
||||
}
|
||||
|
@ -102,7 +102,12 @@ public class PurchaseOrderMainServiceImpl implements IPurchaseOrderMainService
|
|||
@Override
|
||||
public int deletePurchaseOrderMainByIds(String ids)
|
||||
{
|
||||
purchaseOrderMainMapper.deletePurchaseOrderItemByPurchaseOrderNos(Convert.toStrArray(ids));
|
||||
List<String> idsList = Arrays.asList(Convert.toStrArray(ids));
|
||||
idsList.parallelStream().forEach(t->{
|
||||
PurchaseOrderMain purchaseOrderMain = purchaseOrderMainMapper.selectPurchaseOrderMainById(Integer.parseInt(t));
|
||||
purchaseOrderMainMapper.deletePurchaseOrderItemByPurchaseOrderNo(purchaseOrderMain.getOrderNo());
|
||||
|
||||
});
|
||||
return purchaseOrderMainMapper.deletePurchaseOrderMainByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
|
@ -115,7 +120,7 @@ public class PurchaseOrderMainServiceImpl implements IPurchaseOrderMainService
|
|||
@Override
|
||||
public int deletePurchaseOrderMainById(Integer id)
|
||||
{
|
||||
purchaseOrderMainMapper.deletePurchaseOrderItemByPurchaseOrderNo(id);
|
||||
// purchaseOrderMainMapper.deletePurchaseOrderItemByPurchaseOrderNo(id);
|
||||
return purchaseOrderMainMapper.deletePurchaseOrderMainById(id);
|
||||
}
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deletePurchaseOrderItemByPurchaseOrderNo" parameterType="Long">
|
||||
<delete id="deletePurchaseOrderItemByPurchaseOrderNo" parameterType="String">
|
||||
delete from purchase_order_item where purchase_order_no = #{purchaseOrderNo}
|
||||
</delete>
|
||||
|
||||
|
|
Loading…
Reference in New Issue