添加出库时开启序列号的商品强制附加使用序列号
This commit is contained in:
@@ -23,7 +23,8 @@
|
|||||||
var organUrl = ""; //组织数据接口地址
|
var organUrl = ""; //组织数据接口地址
|
||||||
var amountNum = ""; //单据编号开头字符
|
var amountNum = ""; //单据编号开头字符
|
||||||
var depotString = ""; //店铺id列表
|
var depotString = ""; //店铺id列表
|
||||||
var orgDefaultId = 0; //单位默认编号
|
/**默认编号有意义吗,不如空着吧*/
|
||||||
|
var orgDefaultId=''; //单位默认编号
|
||||||
var orgDefaultList; //存储查询出来的会员列表
|
var orgDefaultList; //存储查询出来的会员列表
|
||||||
var accountList; //账户列表
|
var accountList; //账户列表
|
||||||
var outItemList; //支出项目列表
|
var outItemList; //支出项目列表
|
||||||
@@ -682,7 +683,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
thisStock = (thisStock / loadRatio).toFixed(2);
|
thisStock = (thisStock / loadRatio).toFixed(2);
|
||||||
body.find("[field='Stock']").find(input).val(thisStock).attr("data-stock", res.rows[0].thisSum); //加载库存数据
|
body.find("[field='Stock']").find(input).val(thisStock).attr("data-stock", res.data.page[0].thisSum); //加载库存数据
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
body.find("[field='Stock']").find(input).val(0).attr("data-stock", 0); //加载库存数据
|
body.find("[field='Stock']").find(input).val(0).attr("data-stock", 0); //加载库存数据
|
||||||
@@ -757,14 +758,20 @@
|
|||||||
anotherDepotTextField = "depotName";
|
anotherDepotTextField = "depotName";
|
||||||
}
|
}
|
||||||
if(listSubType == "礼品充值"){
|
if(listSubType == "礼品充值"){
|
||||||
|
/**
|
||||||
|
* who added the .action
|
||||||
|
* */
|
||||||
isShowAnotherDepot = false; //礼品充值时候显示礼品卡
|
isShowAnotherDepot = false; //礼品充值时候显示礼品卡
|
||||||
anotherDepotHeadName = "礼品卡";
|
anotherDepotHeadName = "礼品卡";
|
||||||
anotherDepotUrl = "/depot/findGiftByType.action?type=1";
|
anotherDepotUrl = "/depot/findGiftByType?type=1";
|
||||||
anotherDepotTextField = "name";
|
anotherDepotTextField = "name";
|
||||||
}
|
}
|
||||||
if(listSubType == "礼品销售"){
|
if(listSubType == "礼品销售"){
|
||||||
|
/**
|
||||||
|
* who added the .action
|
||||||
|
* */
|
||||||
depotHeadName = "礼品卡";
|
depotHeadName = "礼品卡";
|
||||||
depotUrl = "/depot/findGiftByType.action?type=1";
|
depotUrl = "/depot/findGiftByType?type=1";
|
||||||
depotTextField = "name";
|
depotTextField = "name";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -1290,8 +1297,12 @@
|
|||||||
if (r) {
|
if (r) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:"post",
|
type:"post",
|
||||||
url: "/depotHead/" + depotHeadID + "/delete",
|
// url: "/depotHead/" + depotHeadID + "/delete",
|
||||||
|
url: "/depotHead/deleteDepotHeadAndDetail",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
|
data:{
|
||||||
|
id: depotHeadID
|
||||||
|
},
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
if(res && res.code == 200) {
|
if(res && res.code == 200) {
|
||||||
$("#searchBtn").click();
|
$("#searchBtn").click();
|
||||||
@@ -1382,7 +1393,8 @@
|
|||||||
//批量删除
|
//批量删除
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:"post",
|
type:"post",
|
||||||
url: "/depotHead/batchDelete",
|
// url: "/depotHead/batchDelete",
|
||||||
|
url: "/depotHead/batchDeleteDepotHeadAndDetail",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
async : false,
|
async : false,
|
||||||
data: ({
|
data: ({
|
||||||
@@ -1560,7 +1572,7 @@
|
|||||||
$("#addOrgan").off("click").on("click",function(){
|
$("#addOrgan").off("click").on("click",function(){
|
||||||
$('#supplierDlg').dialog('open').dialog('setTitle','<img src="/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加供应商信息');
|
$('#supplierDlg').dialog('open').dialog('setTitle','<img src="/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加供应商信息');
|
||||||
});
|
});
|
||||||
url = '/depotHead/add';
|
url = '/depotHead/addDepotHeadAndDetail';
|
||||||
|
|
||||||
//零售单据修改收款时,自动计算找零
|
//零售单据修改收款时,自动计算找零
|
||||||
if(listSubType == "零售" || listSubType == "零售退货") {
|
if(listSubType == "零售" || listSubType == "零售退货") {
|
||||||
@@ -1628,7 +1640,7 @@
|
|||||||
}
|
}
|
||||||
$("#Number").val(depotHeadInfo[2]).attr("data-defaultNumber",depotHeadInfo[2]);
|
$("#Number").val(depotHeadInfo[2]).attr("data-defaultNumber",depotHeadInfo[2]);
|
||||||
$("#OperTime").val(depotHeadInfo[4]);
|
$("#OperTime").val(depotHeadInfo[4]);
|
||||||
$('#OrganId').combobox('setValue', depotHeadInfo[5]);
|
$('#OrganId').combobox('setValue', depotHeadInfo[5]=='undefined'?'':depotHeadInfo[5]);
|
||||||
$("#HandsPersonId").val(depotHeadInfo[6]);
|
$("#HandsPersonId").val(depotHeadInfo[6]);
|
||||||
$("#AccountId").val(depotHeadInfo[7]);
|
$("#AccountId").val(depotHeadInfo[7]);
|
||||||
$("#ChangeAmount").val(depotHeadInfo[8]);
|
$("#ChangeAmount").val(depotHeadInfo[8]);
|
||||||
@@ -1715,7 +1727,7 @@
|
|||||||
|
|
||||||
initTableData_material("edit",TotalPrice); //商品列表
|
initTableData_material("edit",TotalPrice); //商品列表
|
||||||
reject(); //撤销下、刷新商品列表
|
reject(); //撤销下、刷新商品列表
|
||||||
url = '/depotHead/update?id=' + depotHeadInfo[0];
|
url = '/depotHead/updateDepotHeadAndDetail?id=' + depotHeadInfo[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
//查看信息
|
//查看信息
|
||||||
@@ -1899,6 +1911,18 @@
|
|||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
//保存信息
|
//保存信息
|
||||||
|
/**
|
||||||
|
* 2019-01-25
|
||||||
|
* 我对这个方法的实现结果存在严重怀疑,决定重构
|
||||||
|
* 有如下疑点:
|
||||||
|
* 1、保存完主表,返回结果后,再发起请求去操作子表,如何保证事务的一致性(业务数据一致性)
|
||||||
|
* 2、保存完主表后,再通过selectmax的方式去获取主表主键id完全就是看人品的不可靠的思路
|
||||||
|
* 修改计划:
|
||||||
|
* 2019-01-25修改零售出库相关操作
|
||||||
|
* 修改方式,重写url,将主从表操作合并
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* **/
|
||||||
$("#saveDepotHead").off("click").on("click",function(){
|
$("#saveDepotHead").off("click").on("click",function(){
|
||||||
if(!$('#depotHeadFM').form('validate')){
|
if(!$('#depotHeadFM').form('validate')){
|
||||||
return;
|
return;
|
||||||
@@ -1961,6 +1985,7 @@
|
|||||||
$.messager.alert('提示', '选择多账户时的找零金额不能大于0!', 'warning');
|
$.messager.alert('提示', '选择多账户时的找零金额不能大于0!', 'warning');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(listTitle === "销售出库列表"){
|
else if(listTitle === "销售出库列表"){
|
||||||
if(!$('#OrganId').combobox('getValue')){
|
if(!$('#OrganId').combobox('getValue')){
|
||||||
@@ -2052,38 +2077,49 @@
|
|||||||
if($("#AccountId").val() === "many"){ //多账户
|
if($("#AccountId").val() === "many"){ //多账户
|
||||||
getAccountID = null;
|
getAccountID = null;
|
||||||
}
|
}
|
||||||
|
var infoStr=JSON.stringify({
|
||||||
|
Type: listType,
|
||||||
|
SubType: listSubType,
|
||||||
|
ProjectId: ProjectId,
|
||||||
|
AllocationProjectId: AllocationProjectId,
|
||||||
|
DefaultNumber: $.trim($("#Number").attr("data-defaultNumber")),//初始编号
|
||||||
|
Number: $.trim($("#Number").val()),
|
||||||
|
OperTime: $("#OperTime").val(),
|
||||||
|
OrganId: OrganId,
|
||||||
|
HandsPersonId: $.trim($("#HandsPersonId").val()),
|
||||||
|
Salesman: SalesmanStr, //销售人员
|
||||||
|
AccountId: getAccountID,
|
||||||
|
ChangeAmount: ChangeAmount, //付款/收款
|
||||||
|
TotalPrice: TotalPrice, //合计
|
||||||
|
PayType: thisPayType, //现付/预付款
|
||||||
|
Remark: $.trim($("#Remark").val()),
|
||||||
|
AccountIdList: $("#AccountId").attr("data-accountarr"), //账户列表-多账户
|
||||||
|
AccountMoneyList: accountMoneyArr ? JSON.stringify(accountMoneyArr) : "", //账户金额列表-多账户
|
||||||
|
Discount: $.trim($("#Discount").val()),
|
||||||
|
DiscountMoney: $.trim($("#DiscountMoney").val()),
|
||||||
|
DiscountLastMoney: $.trim($("#DiscountLastMoney").val()),
|
||||||
|
OtherMoney: $.trim($("#OtherMoney").val()), //采购费用、销售费用
|
||||||
|
OtherMoneyList: $("#OtherMoney").attr("data-itemarr"), //支出项目列表-涉及费用
|
||||||
|
OtherMoneyItem: $("#OtherMoney").attr("data-itemmoneyarr"), //支出项目金额列表-涉及费用
|
||||||
|
AccountDay: $("#AccountDay").val() //结算天数
|
||||||
|
});
|
||||||
|
/**
|
||||||
|
* 零售出库,单独操作
|
||||||
|
* */
|
||||||
|
if(url.indexOf("/depotHead/addDepotHeadAndDetail")>=0){
|
||||||
|
addDepotHeadAndDetail(url,infoStr);
|
||||||
|
return;
|
||||||
|
}else if(url.indexOf("/depotHead/updateDepotHeadAndDetail")>=0){
|
||||||
|
updateDepotHeadAndDetail(url,infoStr,preTotalPrice);
|
||||||
|
return;
|
||||||
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:"post",
|
type:"post",
|
||||||
url: url,
|
url: url,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
async : false,
|
async : false,
|
||||||
data: ({
|
data: ({
|
||||||
info : JSON.stringify({
|
info:infoStr
|
||||||
Type: listType,
|
|
||||||
SubType: listSubType,
|
|
||||||
ProjectId: ProjectId,
|
|
||||||
AllocationProjectId: AllocationProjectId,
|
|
||||||
DefaultNumber: $.trim($("#Number").attr("data-defaultNumber")),//初始编号
|
|
||||||
Number: $.trim($("#Number").val()),
|
|
||||||
OperTime: $("#OperTime").val(),
|
|
||||||
OrganId: OrganId,
|
|
||||||
HandsPersonId: $.trim($("#HandsPersonId").val()),
|
|
||||||
Salesman: SalesmanStr, //销售人员
|
|
||||||
AccountId: getAccountID,
|
|
||||||
ChangeAmount: ChangeAmount, //付款/收款
|
|
||||||
TotalPrice: TotalPrice, //合计
|
|
||||||
PayType: thisPayType, //现付/预付款
|
|
||||||
Remark: $.trim($("#Remark").val()),
|
|
||||||
AccountIdList: $("#AccountId").attr("data-accountarr"), //账户列表-多账户
|
|
||||||
AccountMoneyList: accountMoneyArr ? JSON.stringify(accountMoneyArr) : "", //账户金额列表-多账户
|
|
||||||
Discount: $.trim($("#Discount").val()),
|
|
||||||
DiscountMoney: $.trim($("#DiscountMoney").val()),
|
|
||||||
DiscountLastMoney: $.trim($("#DiscountLastMoney").val()),
|
|
||||||
OtherMoney: $.trim($("#OtherMoney").val()), //采购费用、销售费用
|
|
||||||
OtherMoneyList: $("#OtherMoney").attr("data-itemarr"), //支出项目列表-涉及费用
|
|
||||||
OtherMoneyItem: $("#OtherMoney").attr("data-itemmoneyarr"), //支出项目金额列表-涉及费用
|
|
||||||
AccountDay: $("#AccountDay").val() //结算天数
|
|
||||||
})
|
|
||||||
}),
|
}),
|
||||||
success: function (tipInfo)
|
success: function (tipInfo)
|
||||||
{
|
{
|
||||||
@@ -2955,7 +2991,103 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增单据主表及单据子表
|
||||||
|
* */
|
||||||
|
function addDepotHeadAndDetail(url,infoStr){
|
||||||
|
var inserted = $("#materialData").datagrid('getChanges', "inserted");
|
||||||
|
var deleted = $("#materialData").datagrid('getChanges', "deleted");
|
||||||
|
var updated = $("#materialData").datagrid('getChanges', "updated");
|
||||||
|
$.ajax({
|
||||||
|
type:"post",
|
||||||
|
url: url,
|
||||||
|
dataType: "json",
|
||||||
|
async : false,
|
||||||
|
data: ({
|
||||||
|
info:infoStr,
|
||||||
|
inserted: JSON.stringify(inserted),
|
||||||
|
deleted: JSON.stringify(deleted),
|
||||||
|
updated: JSON.stringify(updated)
|
||||||
|
}),
|
||||||
|
success: function (tipInfo){
|
||||||
|
|
||||||
|
if(tipInfo){
|
||||||
|
if(tipInfo.code!=200){
|
||||||
|
$.messager.alert('提示', tipInfo.msg, 'error');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$.messager.alert('提示','保存成功!','info');
|
||||||
|
$('#depotHeadDlg').dialog('close');
|
||||||
|
var opts = $("#tableData").datagrid('options');
|
||||||
|
showDepotHeadDetails(opts.pageNumber,opts.pageSize);
|
||||||
|
|
||||||
|
}else {
|
||||||
|
$.messager.show({
|
||||||
|
title: '错误提示',
|
||||||
|
msg: '保存信息失败,请稍后重试!'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
//此处添加错误处理
|
||||||
|
error:function()
|
||||||
|
{
|
||||||
|
$.messager.alert('提示','保存信息异常,请稍后再试!','error');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 修改单据主表及单据子表
|
||||||
|
* */
|
||||||
|
function updateDepotHeadAndDetail(url,infoStr,preTotalPrice){
|
||||||
|
var inserted = $("#materialData").datagrid('getChanges', "inserted");
|
||||||
|
var deleted = $("#materialData").datagrid('getChanges', "deleted");
|
||||||
|
var updated = $("#materialData").datagrid('getChanges', "updated");
|
||||||
|
$.ajax({
|
||||||
|
type:"post",
|
||||||
|
url: url,
|
||||||
|
dataType: "json",
|
||||||
|
async : false,
|
||||||
|
data: ({
|
||||||
|
id:url.substring(url.lastIndexOf("?id=")+4,url.length),
|
||||||
|
info:infoStr,
|
||||||
|
inserted: JSON.stringify(inserted),
|
||||||
|
deleted: JSON.stringify(deleted),
|
||||||
|
updated: JSON.stringify(updated),
|
||||||
|
preTotalPrice:preTotalPrice
|
||||||
|
}),
|
||||||
|
success: function (tipInfo){
|
||||||
|
if(tipInfo){
|
||||||
|
if(tipInfo.code!=200){
|
||||||
|
$.messager.alert('提示', tipInfo.msg, 'error');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$.messager.alert('提示','保存成功!','info');
|
||||||
|
$('#depotHeadDlg').dialog('close');
|
||||||
|
var opts = $("#tableData").datagrid('options');
|
||||||
|
showDepotHeadDetails(opts.pageNumber,opts.pageSize);
|
||||||
|
if (endEditing()) {
|
||||||
|
$('#materialData').datagrid('acceptChanges');
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
$.messager.show({
|
||||||
|
title: '错误提示',
|
||||||
|
msg: '保存信息失败,请稍后重试!'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
//此处添加错误处理
|
||||||
|
error:function()
|
||||||
|
{
|
||||||
|
$.messager.alert('提示','保存信息异常,请稍后再试!','error');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -155,11 +155,11 @@
|
|||||||
{title: '商品名称', field: 'materialName', width: 100},
|
{title: '商品名称', field: 'materialName', width: 100},
|
||||||
{title: '序列号', field: 'serialNumber', width: 80},
|
{title: '序列号', field: 'serialNumber', width: 80},
|
||||||
{title: '已卖出', field: 'isSell', width: 150 , formatter: function (value) {
|
{title: '已卖出', field: 'isSell', width: 150 , formatter: function (value) {
|
||||||
return value ? "是" : "否";
|
return value=='1' ? "是" : "否";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{title: '已删除', field: 'deleteFlag', width: 60, formatter: function (value) {
|
{title: '已删除', field: 'deleteFlag', width: 60, formatter: function (value) {
|
||||||
return value ? "是" : "否";
|
return value=='1' ? "是" : "否";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{title: '创建时间', field: 'createTime', width: 140,formatter: formatDatebox},
|
{title: '创建时间', field: 'createTime', width: 140,formatter: formatDatebox},
|
||||||
|
|||||||
@@ -684,7 +684,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '序列号', field: 'enableSerialNumber', width: 70, align: "center", formatter: function (value) {
|
title: '序列号', field: 'enableSerialNumber', width: 70, align: "center", formatter: function (value) {
|
||||||
return value ? "启用" : "禁用";
|
return value=='1' ? "启用" : "禁用";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]],
|
]],
|
||||||
@@ -1363,7 +1363,7 @@
|
|||||||
// console.log("enableSerialNumber:"+(materialInfo[24]=='true'?'1':'0'));
|
// console.log("enableSerialNumber:"+(materialInfo[24]=='true'?'1':'0'));
|
||||||
// console.log("enableSerialNumber:"+materialInfo[24]);
|
// console.log("enableSerialNumber:"+materialInfo[24]);
|
||||||
// $("#enableSerialNumber").combobox('setValue',materialInfo[24]=='true'?'1':'0');
|
// $("#enableSerialNumber").combobox('setValue',materialInfo[24]=='true'?'1':'0');
|
||||||
$("#enableSerialNumber").val(materialInfo[24]=='true'?'1':'0');
|
$("#enableSerialNumber").val(materialInfo[24]=='1'?'1':'0');
|
||||||
// console.log($("#enableSerialNumber").val());
|
// console.log($("#enableSerialNumber").val());
|
||||||
|
|
||||||
var categoryName = ""; //类型名称
|
var categoryName = ""; //类型名称
|
||||||
|
|||||||
@@ -5219,5 +5219,25 @@ alter table jsh_material add enableSerialNumber bit(1) DEFAULT 0 COMMENT '是否
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
delete from `jsh_functions` where Name='序列号';
|
delete from `jsh_functions` where Name='序列号';
|
||||||
INSERT INTO `jsh_functions`(`Number`, `Name`, `PNumber`, `URL`, `State`, `Sort`, `Enabled`, `Type`, `PushBtn`) VALUES ('010104', '序列号', '0101', '../manage/serialNumber.html', b'0', '0246', b'1', '电脑版', '');
|
INSERT INTO `jsh_functions`(`Number`, `Name`, `PNumber`, `URL`, `State`, `Sort`, `Enabled`, `Type`, `PushBtn`) VALUES ('010104', '序列号', '0101', '../manage/serialNumber.html', b'0', '0246', b'1', '电脑版', '');
|
||||||
|
-- ----------------------------
|
||||||
|
-- 删除单据主表供应商id字段对应外键约束
|
||||||
|
-- ----------------------------
|
||||||
|
ALTER TABLE jsh_depothead DROP FOREIGN KEY jsh_depothead_ibfk_3;
|
||||||
|
-- ----------------------------
|
||||||
|
-- 序列号表添加单据主表id字段,用于跟踪序列号流向
|
||||||
|
-- ----------------------------
|
||||||
|
alter table jsh_serial_number add depothead_Id bigint(20) DEFAULT null COMMENT '单据主表id,用于跟踪序列号流向';
|
||||||
|
-- ----------------------------
|
||||||
|
-- 修改商品表enableSerialNumber字段类型为varchar(1)
|
||||||
|
-- ----------------------------
|
||||||
|
alter table jsh_material change enableSerialNumber enableSerialNumber varchar(1) DEFAULT '0' COMMENT '是否开启序列号,0否,1是';
|
||||||
|
-- ----------------------------
|
||||||
|
-- 修改序列号表is_Sell字段类型为varchar(1)
|
||||||
|
-- 修改序列号表delete_Flag字段类型为varchar(1)
|
||||||
|
-- ----------------------------
|
||||||
|
alter table jsh_serial_number change is_Sell is_Sell varchar(1) DEFAULT '0' COMMENT '是否卖出,0未卖出,1卖出';
|
||||||
|
alter table jsh_serial_number change delete_Flag delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
|
||||||
|
-- ----------------------------
|
||||||
|
-- 删除单据子表单据主表id字段对应外键约束
|
||||||
|
-- ----------------------------
|
||||||
|
ALTER TABLE jsh_depotitem DROP FOREIGN KEY jsh_depotitem_ibfk_1;
|
||||||
Binary file not shown.
@@ -21,18 +21,45 @@ public class BusinessConstants {
|
|||||||
* 默认的分页页数
|
* 默认的分页页数
|
||||||
*/
|
*/
|
||||||
public static final String DEFAULT_PAGINATION_PAGE_SIZE = "10";
|
public static final String DEFAULT_PAGINATION_PAGE_SIZE = "10";
|
||||||
/**
|
|
||||||
* 商品是否开启序列号标识enableSerialNumber 0否false,1是true
|
|
||||||
*
|
|
||||||
* */
|
|
||||||
public static final boolean MATERIAL_ENABLE_SERIAL_NUMBER = true;
|
|
||||||
public static final boolean MATERIAL_NOT_ENABLE_SERIAL_NUMBER = false;
|
|
||||||
/**
|
/**
|
||||||
* 单据主表出入库类型 type 入库 出库
|
* 单据主表出入库类型 type 入库 出库
|
||||||
* depothead
|
* depothead
|
||||||
* */
|
* */
|
||||||
public static final String DEPOTHEAD_TYPE_STORAGE = "入库";
|
public static final String DEPOTHEAD_TYPE_STORAGE = "入库";
|
||||||
public static final String DEPOTHEAD_TYPE_OUT = "出库";
|
public static final String DEPOTHEAD_TYPE_OUT = "出库";
|
||||||
|
/**
|
||||||
|
* 付款类型 payType //现付/预付款
|
||||||
|
* */
|
||||||
|
public static final String PAY_TYPE_PREPAID = "预付款";
|
||||||
|
public static final String PAY_TYPE_BY_CASH = "现付";
|
||||||
|
/**
|
||||||
|
* 删除标记 deleteFlag '0'未删除 '1'已删除
|
||||||
|
* */
|
||||||
|
public static final String DELETE_FLAG_DELETED = "1";
|
||||||
|
public static final String DELETE_FLAG_EXISTS = "0";
|
||||||
|
/**
|
||||||
|
* 是否卖出 isSell '0'未卖出 '1'已卖出
|
||||||
|
* */
|
||||||
|
public static final String IS_SELL_SELLED = "1";
|
||||||
|
public static final String IS_SELL_HOLD = "0";
|
||||||
|
/**
|
||||||
|
* 商品是否开启序列号标识enableSerialNumber '0'未启用 '1'启用
|
||||||
|
* */
|
||||||
|
public static final String ENABLE_SERIAL_NUMBER_ENABLED = "1";
|
||||||
|
public static final String ENABLE_SERIAL_NUMBER_NOT_ENABLED = "0";
|
||||||
|
/**
|
||||||
|
* 出入库分类
|
||||||
|
*采购、采购退货、其它、零售、销售、调拨、礼品充值
|
||||||
|
* */
|
||||||
|
public static final String SUB_TYPE_PURCHASE = "采购";
|
||||||
|
public static final String SUB_TYPE_PURCHASE_TETURNS = "采购退货";
|
||||||
|
public static final String SUB_TYPE_OTHER = "其它";
|
||||||
|
public static final String SUB_TYPE_RETAIL = "零售";
|
||||||
|
public static final String SUB_TYPE_SALES = "销售";
|
||||||
|
public static final String SUB_TYPE_TRANSFER = "调拨";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,9 @@ public class ExceptionConstants {
|
|||||||
/**序列号不能为为空*/
|
/**序列号不能为为空*/
|
||||||
public static final int SERIAL_NUMBERE_NOT_BE_EMPTY_CODE = 10500000;
|
public static final int SERIAL_NUMBERE_NOT_BE_EMPTY_CODE = 10500000;
|
||||||
public static final String SERIAL_NUMBERE_NOT_BE_EMPTY_MSG = "序列号不能为为空";
|
public static final String SERIAL_NUMBERE_NOT_BE_EMPTY_MSG = "序列号不能为为空";
|
||||||
|
/**商品%s下序列号不充足,请补充后重试*/
|
||||||
|
public static final int MATERIAL_SERIAL_NUMBERE_NOT_ENOUGH_CODE = 10500000;
|
||||||
|
public static final String MATERIAL_SERIAL_NUMBERE_NOT_ENOUGH_MSG = "商品:%s下序列号不充足,请补充后重试";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,152 +1,152 @@
|
|||||||
package com.jsh.erp.controller;
|
package com.jsh.erp.controller;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.jsh.erp.datasource.entities.Depot;
|
import com.jsh.erp.datasource.entities.Depot;
|
||||||
import com.jsh.erp.service.depot.DepotService;
|
import com.jsh.erp.service.depot.DepotService;
|
||||||
import com.jsh.erp.service.userBusiness.UserBusinessService;
|
import com.jsh.erp.service.userBusiness.UserBusinessService;
|
||||||
import com.jsh.erp.utils.BaseResponseInfo;
|
import com.jsh.erp.utils.BaseResponseInfo;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.dao.DataAccessException;
|
import org.springframework.dao.DataAccessException;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ji sheng hua 752*718*920
|
* @author ji sheng hua 752*718*920
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/depot")
|
@RequestMapping(value = "/depot")
|
||||||
public class DepotController {
|
public class DepotController {
|
||||||
private Logger logger = LoggerFactory.getLogger(DepotController.class);
|
private Logger logger = LoggerFactory.getLogger(DepotController.class);
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private DepotService depotService;
|
private DepotService depotService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private UserBusinessService userBusinessService;
|
private UserBusinessService userBusinessService;
|
||||||
|
|
||||||
@GetMapping(value = "/getAllList")
|
@GetMapping(value = "/getAllList")
|
||||||
public BaseResponseInfo getAllList(HttpServletRequest request) {
|
public BaseResponseInfo getAllList(HttpServletRequest request) {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
try {
|
try {
|
||||||
List<Depot> depotList = depotService.getAllList();
|
List<Depot> depotList = depotService.getAllList();
|
||||||
res.code = 200;
|
res.code = 200;
|
||||||
res.data = depotList;
|
res.data = depotList;
|
||||||
} catch(Exception e){
|
} catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
res.code = 500;
|
res.code = 500;
|
||||||
res.data = "获取数据失败";
|
res.data = "获取数据失败";
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户对应仓库显示
|
* 用户对应仓库显示
|
||||||
* @param type
|
* @param type
|
||||||
* @param keyId
|
* @param keyId
|
||||||
* @param request
|
* @param request
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/findUserDepot")
|
@PostMapping(value = "/findUserDepot")
|
||||||
public JSONArray findUserDepot(@RequestParam("UBType") String type, @RequestParam("UBKeyId") String keyId,
|
public JSONArray findUserDepot(@RequestParam("UBType") String type, @RequestParam("UBKeyId") String keyId,
|
||||||
HttpServletRequest request) {
|
HttpServletRequest request) {
|
||||||
JSONArray arr = new JSONArray();
|
JSONArray arr = new JSONArray();
|
||||||
try {
|
try {
|
||||||
List<Depot> dataList = depotService.findUserDepot();
|
List<Depot> dataList = depotService.findUserDepot();
|
||||||
//开始拼接json数据
|
//开始拼接json数据
|
||||||
JSONObject outer = new JSONObject();
|
JSONObject outer = new JSONObject();
|
||||||
outer.put("id", 1);
|
outer.put("id", 1);
|
||||||
outer.put("text", "仓库列表");
|
outer.put("text", "仓库列表");
|
||||||
outer.put("state", "open");
|
outer.put("state", "open");
|
||||||
//存放数据json数组
|
//存放数据json数组
|
||||||
JSONArray dataArray = new JSONArray();
|
JSONArray dataArray = new JSONArray();
|
||||||
if (null != dataList) {
|
if (null != dataList) {
|
||||||
for (Depot depot : dataList) {
|
for (Depot depot : dataList) {
|
||||||
JSONObject item = new JSONObject();
|
JSONObject item = new JSONObject();
|
||||||
item.put("id", depot.getId());
|
item.put("id", depot.getId());
|
||||||
item.put("text", depot.getName());
|
item.put("text", depot.getName());
|
||||||
//勾选判断1
|
//勾选判断1
|
||||||
Boolean flag = false;
|
Boolean flag = false;
|
||||||
try {
|
try {
|
||||||
flag = userBusinessService.checkIsUserBusinessExist(type, keyId, "[" + depot.getId().toString() + "]");
|
flag = userBusinessService.checkIsUserBusinessExist(type, keyId, "[" + depot.getId().toString() + "]");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error(">>>>>>>>>>>>>>>>>设置用户对应的仓库:类型" + type + " KeyId为: " + keyId + " 存在异常!");
|
logger.error(">>>>>>>>>>>>>>>>>设置用户对应的仓库:类型" + type + " KeyId为: " + keyId + " 存在异常!");
|
||||||
}
|
}
|
||||||
if (flag == true) {
|
if (flag == true) {
|
||||||
item.put("checked", true);
|
item.put("checked", true);
|
||||||
}
|
}
|
||||||
//结束
|
//结束
|
||||||
dataArray.add(item);
|
dataArray.add(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
outer.put("children", dataArray);
|
outer.put("children", dataArray);
|
||||||
arr.add(outer);
|
arr.add(outer);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(value = "/findDepotByUserId")
|
@RequestMapping(value = "/findDepotByUserId")
|
||||||
public JSONArray findDepotByUserId(@RequestParam("UBType") String type, @RequestParam("UBKeyId") String keyId,
|
public JSONArray findDepotByUserId(@RequestParam("UBType") String type, @RequestParam("UBKeyId") String keyId,
|
||||||
HttpServletRequest request) {
|
HttpServletRequest request) {
|
||||||
JSONArray arr = new JSONArray();
|
JSONArray arr = new JSONArray();
|
||||||
try {
|
try {
|
||||||
List<Depot> dataList = depotService.findUserDepot();
|
List<Depot> dataList = depotService.findUserDepot();
|
||||||
//开始拼接json数据
|
//开始拼接json数据
|
||||||
if (null != dataList) {
|
if (null != dataList) {
|
||||||
for (Depot depot : dataList) {
|
for (Depot depot : dataList) {
|
||||||
JSONObject item = new JSONObject();
|
JSONObject item = new JSONObject();
|
||||||
//勾选判断1
|
//勾选判断1
|
||||||
Boolean flag = false;
|
Boolean flag = false;
|
||||||
try {
|
try {
|
||||||
flag = userBusinessService.checkIsUserBusinessExist(type, keyId, "[" + depot.getId().toString() + "]");
|
flag = userBusinessService.checkIsUserBusinessExist(type, keyId, "[" + depot.getId().toString() + "]");
|
||||||
} catch (DataAccessException e) {
|
} catch (DataAccessException e) {
|
||||||
logger.error(">>>>>>>>>>>>>>>>>查询用户对应的仓库:类型" + type + " KeyId为: " + keyId + " 存在异常!");
|
logger.error(">>>>>>>>>>>>>>>>>查询用户对应的仓库:类型" + type + " KeyId为: " + keyId + " 存在异常!");
|
||||||
}
|
}
|
||||||
if (flag == true) {
|
if (flag == true) {
|
||||||
item.put("id", depot.getId());
|
item.put("id", depot.getId());
|
||||||
item.put("depotName", depot.getName());
|
item.put("depotName", depot.getName());
|
||||||
arr.add(item);
|
arr.add(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查找礼品卡-虚拟仓库
|
* 查找礼品卡-虚拟仓库
|
||||||
* @param type
|
* @param type
|
||||||
* @param request
|
* @param request
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/findGiftByType")
|
@RequestMapping(value = "/findGiftByType")
|
||||||
public JSONArray findGiftByType(@RequestParam("type") Integer type,
|
public JSONArray findGiftByType(@RequestParam("type") Integer type,
|
||||||
HttpServletRequest request) {
|
HttpServletRequest request) {
|
||||||
JSONArray arr = new JSONArray();
|
JSONArray arr = new JSONArray();
|
||||||
try {
|
try {
|
||||||
List<Depot> dataList = depotService.findGiftByType(type);
|
List<Depot> dataList = depotService.findGiftByType(type);
|
||||||
//存放数据json数组
|
//存放数据json数组
|
||||||
if (null != dataList) {
|
if (null != dataList) {
|
||||||
for (Depot depot : dataList) {
|
for (Depot depot : dataList) {
|
||||||
JSONObject item = new JSONObject();
|
JSONObject item = new JSONObject();
|
||||||
item.put("id", depot.getId());
|
item.put("id", depot.getId());
|
||||||
//仓库名称
|
//仓库名称
|
||||||
item.put("name", depot.getName());
|
item.put("name", depot.getName());
|
||||||
arr.add(item);
|
arr.add(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error(">>>>>>>>>查找仓库信息异常", e);
|
logger.error(">>>>>>>>>查找仓库信息异常", e);
|
||||||
}
|
}
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.jsh.erp.controller;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.jsh.erp.constants.ExceptionConstants;
|
||||||
import com.jsh.erp.datasource.entities.DepotHead;
|
import com.jsh.erp.datasource.entities.DepotHead;
|
||||||
import com.jsh.erp.datasource.vo.DepotHeadVo4InDetail;
|
import com.jsh.erp.datasource.vo.DepotHeadVo4InDetail;
|
||||||
import com.jsh.erp.datasource.vo.DepotHeadVo4InOutMCount;
|
import com.jsh.erp.datasource.vo.DepotHeadVo4InOutMCount;
|
||||||
@@ -464,5 +465,75 @@ public class DepotHeadController {
|
|||||||
}
|
}
|
||||||
return allMoney;
|
return allMoney;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* create by: cjl
|
||||||
|
* description:
|
||||||
|
* 新增单据主表及单据子表信息
|
||||||
|
* create time: 2019/1/25 14:36
|
||||||
|
* @Param: beanJson
|
||||||
|
* @Param: inserted
|
||||||
|
* @Param: deleted
|
||||||
|
* @Param: updated
|
||||||
|
* @return java.lang.String
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/addDepotHeadAndDetail")
|
||||||
|
public Object addDepotHeadAndDetail(@RequestParam("info") String beanJson,@RequestParam("inserted") String inserted,
|
||||||
|
@RequestParam("deleted") String deleted,
|
||||||
|
@RequestParam("updated") String updated) throws Exception{
|
||||||
|
JSONObject result = ExceptionConstants.standardSuccess();
|
||||||
|
depotHeadService.addDepotHeadAndDetail(beanJson,inserted,deleted,updated);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* create by: cjl
|
||||||
|
* description:
|
||||||
|
* 更新单据主表及单据子表信息
|
||||||
|
* create time: 2019/1/28 14:47
|
||||||
|
* @Param: id
|
||||||
|
* @Param: beanJson
|
||||||
|
* @Param: inserted
|
||||||
|
* @Param: deleted
|
||||||
|
* @Param: updated
|
||||||
|
* @Param: preTotalPrice
|
||||||
|
* @return java.lang.Object
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/updateDepotHeadAndDetail")
|
||||||
|
public Object updateDepotHeadAndDetail(@RequestParam("id") Long id,@RequestParam("info") String beanJson,@RequestParam("inserted") String inserted,
|
||||||
|
@RequestParam("deleted") String deleted,
|
||||||
|
@RequestParam("updated") String updated,@RequestParam("preTotalPrice") BigDecimal preTotalPrice) throws Exception{
|
||||||
|
|
||||||
|
JSONObject result = ExceptionConstants.standardSuccess();
|
||||||
|
depotHeadService.updateDepotHeadAndDetail(id,beanJson,inserted,deleted,updated,preTotalPrice);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* create by: cjl
|
||||||
|
* description:
|
||||||
|
* 删除单据主表及子表信息
|
||||||
|
* create time: 2019/1/28 17:29
|
||||||
|
* @Param: id
|
||||||
|
* @return java.lang.Object
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/deleteDepotHeadAndDetail")
|
||||||
|
public Object deleteDepotHeadAndDetail(@RequestParam("id") Long id) throws Exception{
|
||||||
|
|
||||||
|
JSONObject result = ExceptionConstants.standardSuccess();
|
||||||
|
depotHeadService.deleteDepotHeadAndDetail(id);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* create by: cjl
|
||||||
|
* description:
|
||||||
|
* 删除单据主表及子表信息
|
||||||
|
* create time: 2019/1/28 17:29
|
||||||
|
* @Param: id
|
||||||
|
* @return java.lang.Object
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/batchDeleteDepotHeadAndDetail")
|
||||||
|
public Object batchDeleteDepotHeadAndDetail(@RequestParam("ids") String ids) throws Exception{
|
||||||
|
|
||||||
|
JSONObject result = ExceptionConstants.standardSuccess();
|
||||||
|
depotHeadService.batchDeleteDepotHeadAndDetail(ids);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -262,7 +262,7 @@ public class DepotItemController {
|
|||||||
@RequestParam("deleted") String deleted,
|
@RequestParam("deleted") String deleted,
|
||||||
@RequestParam("updated") String updated,
|
@RequestParam("updated") String updated,
|
||||||
@RequestParam("headerId") Long headerId,
|
@RequestParam("headerId") Long headerId,
|
||||||
HttpServletRequest request) {
|
HttpServletRequest request) throws Exception{
|
||||||
Map<String, Object> objectMap = new HashMap<String, Object>();
|
Map<String, Object> objectMap = new HashMap<String, Object>();
|
||||||
try {
|
try {
|
||||||
depotItemService.saveDetials(inserted,deleted,updated,headerId);
|
depotItemService.saveDetials(inserted,deleted,updated,headerId);
|
||||||
|
|||||||
@@ -176,7 +176,12 @@ public class SupplierController {
|
|||||||
item.put("AdvanceIn", supplier.getAdvancein());
|
item.put("AdvanceIn", supplier.getAdvancein());
|
||||||
item.put("BeginNeedGet", supplier.getBeginneedget());
|
item.put("BeginNeedGet", supplier.getBeginneedget());
|
||||||
item.put("BeginNeedPay", supplier.getBeginneedpay());
|
item.put("BeginNeedPay", supplier.getBeginneedpay());
|
||||||
item.put("isystem", supplier.getIsystem() == (short) 0 ? "是" : "否");
|
/**
|
||||||
|
* 2018-01-28这里会有空指针异常
|
||||||
|
* */
|
||||||
|
if(supplier.getIsystem()!=null){
|
||||||
|
item.put("isystem", supplier.getIsystem() == (short) 0 ? "是" : "否");
|
||||||
|
}
|
||||||
item.put("description", supplier.getDescription());
|
item.put("description", supplier.getDescription());
|
||||||
item.put("fax", supplier.getFax());
|
item.put("fax", supplier.getFax());
|
||||||
item.put("telephone", supplier.getTelephone());
|
item.put("telephone", supplier.getTelephone());
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ public class Material {
|
|||||||
* 2019-01-21新增字段enableSerialNumber
|
* 2019-01-21新增字段enableSerialNumber
|
||||||
*是否开启序列号
|
*是否开启序列号
|
||||||
* */
|
* */
|
||||||
private Boolean enableSerialNumber;
|
private String enableSerialNumber;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method was generated by MyBatis Generator.
|
* This method was generated by MyBatis Generator.
|
||||||
@@ -744,11 +744,11 @@ public class Material {
|
|||||||
this.otherfield3 = otherfield3 == null ? null : otherfield3.trim();
|
this.otherfield3 = otherfield3 == null ? null : otherfield3.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean getEnableSerialNumber() {
|
public String getEnableSerialNumber() {
|
||||||
return enableSerialNumber;
|
return enableSerialNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEnableSerialNumber(Boolean enableSerialNumber) {
|
public void setEnableSerialNumber(String enableSerialNumber) {
|
||||||
this.enableSerialNumber = enableSerialNumber;
|
this.enableSerialNumber = enableSerialNumber;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1704,6 +1704,72 @@ public class MaterialExample {
|
|||||||
addCriterion("OtherField3 not between", value1, value2, "otherfield3");
|
addCriterion("OtherField3 not between", value1, value2, "otherfield3");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
public Criteria andEnableSerialNumberIsNull() {
|
||||||
|
addCriterion("enableSerialNumber is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnableSerialNumberIsNotNull() {
|
||||||
|
addCriterion("enableSerialNumber is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnableSerialNumberEqualTo(String value) {
|
||||||
|
addCriterion("enableSerialNumber =", value, "enableSerialNumber");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnableSerialNumberNotEqualTo(String value) {
|
||||||
|
addCriterion("enableSerialNumber <>", value, "enableSerialNumber");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnableSerialNumberGreaterThan(String value) {
|
||||||
|
addCriterion("enableSerialNumber >", value, "enableSerialNumber");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnableSerialNumberGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("enableSerialNumber >=", value, "enableSerialNumber");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnableSerialNumberLessThan(String value) {
|
||||||
|
addCriterion("enableSerialNumber <", value, "enableSerialNumber");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnableSerialNumberLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("enableSerialNumber <=", value, "enableSerialNumber");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
public Criteria andEnableSerialNumberLike(String value) {
|
||||||
|
addCriterion("enableSerialNumber like", value, "enableSerialNumber");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
public Criteria andEnableSerialNumberNotLike(String value) {
|
||||||
|
addCriterion("enableSerialNumber not like", value, "enableSerialNumber");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
public Criteria andEnableSerialNumberIn(List<String> values) {
|
||||||
|
addCriterion("enableSerialNumber in", values, "enableSerialNumber");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnableSerialNumberNotIn(List<String> values) {
|
||||||
|
addCriterion("enableSerialNumber not in", values, "enableSerialNumber");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnableSerialNumberBetween(String value1, String value2) {
|
||||||
|
addCriterion("enableSerialNumber between", value1, value2, "enableSerialNumber");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnableSerialNumberNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("enableSerialNumber not between", value1, value2, "enableSerialNumber");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public class MaterialVo4Unit {
|
|||||||
* 2019-01-21新增字段enableSerialNumber
|
* 2019-01-21新增字段enableSerialNumber
|
||||||
*是否开启序列号
|
*是否开启序列号
|
||||||
* */
|
* */
|
||||||
private Boolean enableSerialNumber;
|
private String enableSerialNumber;
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
@@ -269,11 +269,11 @@ public class MaterialVo4Unit {
|
|||||||
this.materialOther = materialOther;
|
this.materialOther = materialOther;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean getEnableSerialNumber() {
|
public String getEnableSerialNumber() {
|
||||||
return enableSerialNumber;
|
return enableSerialNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEnableSerialNumber(Boolean enableSerialNumber) {
|
public void setEnableSerialNumber(String enableSerialNumber) {
|
||||||
this.enableSerialNumber = enableSerialNumber;
|
this.enableSerialNumber = enableSerialNumber;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -33,7 +33,7 @@ public class SerialNumber {
|
|||||||
*
|
*
|
||||||
* @mbggenerated
|
* @mbggenerated
|
||||||
*/
|
*/
|
||||||
private Boolean isSell;
|
private String isSell;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This field was generated by MyBatis Generator.
|
* This field was generated by MyBatis Generator.
|
||||||
@@ -49,7 +49,7 @@ public class SerialNumber {
|
|||||||
*
|
*
|
||||||
* @mbggenerated
|
* @mbggenerated
|
||||||
*/
|
*/
|
||||||
private Boolean deleteFlag;
|
private String deleteFlag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This field was generated by MyBatis Generator.
|
* This field was generated by MyBatis Generator.
|
||||||
@@ -82,6 +82,10 @@ public class SerialNumber {
|
|||||||
* @mbggenerated
|
* @mbggenerated
|
||||||
*/
|
*/
|
||||||
private Long updater;
|
private Long updater;
|
||||||
|
/**
|
||||||
|
* 单据主表id,用于跟踪序列号流向
|
||||||
|
* */
|
||||||
|
private Long depotheadId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method was generated by MyBatis Generator.
|
* This method was generated by MyBatis Generator.
|
||||||
@@ -163,7 +167,7 @@ public class SerialNumber {
|
|||||||
*
|
*
|
||||||
* @mbggenerated
|
* @mbggenerated
|
||||||
*/
|
*/
|
||||||
public Boolean getIsSell() {
|
public String getIsSell() {
|
||||||
return isSell;
|
return isSell;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -175,7 +179,7 @@ public class SerialNumber {
|
|||||||
*
|
*
|
||||||
* @mbggenerated
|
* @mbggenerated
|
||||||
*/
|
*/
|
||||||
public void setIsSell(Boolean isSell) {
|
public void setIsSell(String isSell) {
|
||||||
this.isSell = isSell;
|
this.isSell = isSell;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -211,7 +215,7 @@ public class SerialNumber {
|
|||||||
*
|
*
|
||||||
* @mbggenerated
|
* @mbggenerated
|
||||||
*/
|
*/
|
||||||
public Boolean getDeleteFlag() {
|
public String getDeleteFlag() {
|
||||||
return deleteFlag;
|
return deleteFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -223,7 +227,7 @@ public class SerialNumber {
|
|||||||
*
|
*
|
||||||
* @mbggenerated
|
* @mbggenerated
|
||||||
*/
|
*/
|
||||||
public void setDeleteFlag(Boolean deleteFlag) {
|
public void setDeleteFlag(String deleteFlag) {
|
||||||
this.deleteFlag = deleteFlag;
|
this.deleteFlag = deleteFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -322,4 +326,13 @@ public class SerialNumber {
|
|||||||
public void setUpdater(Long updater) {
|
public void setUpdater(Long updater) {
|
||||||
this.updater = updater;
|
this.updater = updater;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Long getDepotheadId() {
|
||||||
|
return depotheadId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDepotheadId(Long depotheadId) {
|
||||||
|
this.depotheadId = depotheadId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -395,52 +395,61 @@ public class SerialNumberExample {
|
|||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIsSellEqualTo(Boolean value) {
|
public Criteria andIsSellEqualTo(String value) {
|
||||||
addCriterion("is_Sell =", value, "isSell");
|
addCriterion("is_Sell =", value, "isSell");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIsSellNotEqualTo(Boolean value) {
|
public Criteria andIsSellNotEqualTo(String value) {
|
||||||
addCriterion("is_Sell <>", value, "isSell");
|
addCriterion("is_Sell <>", value, "isSell");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIsSellGreaterThan(Boolean value) {
|
public Criteria andIsSellGreaterThan(String value) {
|
||||||
addCriterion("is_Sell >", value, "isSell");
|
addCriterion("is_Sell >", value, "isSell");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIsSellGreaterThanOrEqualTo(Boolean value) {
|
public Criteria andIsSellGreaterThanOrEqualTo(String value) {
|
||||||
addCriterion("is_Sell >=", value, "isSell");
|
addCriterion("is_Sell >=", value, "isSell");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIsSellLessThan(Boolean value) {
|
public Criteria andIsSellLessThan(String value) {
|
||||||
addCriterion("is_Sell <", value, "isSell");
|
addCriterion("is_Sell <", value, "isSell");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIsSellLessThanOrEqualTo(Boolean value) {
|
public Criteria andIsSellLessThanOrEqualTo(String value) {
|
||||||
addCriterion("is_Sell <=", value, "isSell");
|
addCriterion("is_Sell <=", value, "isSell");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIsSellIn(List<Boolean> values) {
|
public Criteria andIsSellLike(String value) {
|
||||||
|
addCriterion("isSell like", value, "isSell");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
public Criteria andIsSellNotLike(String value) {
|
||||||
|
addCriterion("isSell not like", value, "isSell");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIsSellIn(List<String> values) {
|
||||||
addCriterion("is_Sell in", values, "isSell");
|
addCriterion("is_Sell in", values, "isSell");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIsSellNotIn(List<Boolean> values) {
|
public Criteria andIsSellNotIn(List<String> values) {
|
||||||
addCriterion("is_Sell not in", values, "isSell");
|
addCriterion("is_Sell not in", values, "isSell");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIsSellBetween(Boolean value1, Boolean value2) {
|
public Criteria andIsSellBetween(String value1, String value2) {
|
||||||
addCriterion("is_Sell between", value1, value2, "isSell");
|
addCriterion("is_Sell between", value1, value2, "isSell");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIsSellNotBetween(Boolean value1, Boolean value2) {
|
public Criteria andIsSellNotBetween(String value1, String value2) {
|
||||||
addCriterion("is_Sell not between", value1, value2, "isSell");
|
addCriterion("is_Sell not between", value1, value2, "isSell");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
@@ -525,52 +534,59 @@ public class SerialNumberExample {
|
|||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andDeleteFlagEqualTo(Boolean value) {
|
public Criteria andDeleteFlagEqualTo(String value) {
|
||||||
addCriterion("delete_Flag =", value, "deleteFlag");
|
addCriterion("delete_Flag =", value, "deleteFlag");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andDeleteFlagNotEqualTo(Boolean value) {
|
public Criteria andDeleteFlagNotEqualTo(String value) {
|
||||||
addCriterion("delete_Flag <>", value, "deleteFlag");
|
addCriterion("delete_Flag <>", value, "deleteFlag");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andDeleteFlagGreaterThan(Boolean value) {
|
public Criteria andDeleteFlagGreaterThan(String value) {
|
||||||
addCriterion("delete_Flag >", value, "deleteFlag");
|
addCriterion("delete_Flag >", value, "deleteFlag");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andDeleteFlagGreaterThanOrEqualTo(Boolean value) {
|
public Criteria andDeleteFlagGreaterThanOrEqualTo(String value) {
|
||||||
addCriterion("delete_Flag >=", value, "deleteFlag");
|
addCriterion("delete_Flag >=", value, "deleteFlag");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andDeleteFlagLessThan(Boolean value) {
|
public Criteria andDeleteFlagLessThan(String value) {
|
||||||
addCriterion("delete_Flag <", value, "deleteFlag");
|
addCriterion("delete_Flag <", value, "deleteFlag");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andDeleteFlagLessThanOrEqualTo(Boolean value) {
|
public Criteria andDeleteFlagLessThanOrEqualTo(String value) {
|
||||||
addCriterion("delete_Flag <=", value, "deleteFlag");
|
addCriterion("delete_Flag <=", value, "deleteFlag");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
public Criteria andDeleteFlagLike(String value) {
|
||||||
public Criteria andDeleteFlagIn(List<Boolean> values) {
|
addCriterion("deleteFlag like", value, "deleteFlag");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
public Criteria andDeleteFlagNotLike(String value) {
|
||||||
|
addCriterion("deleteFlag not like", value, "deleteFlag");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
public Criteria andDeleteFlagIn(List<String> values) {
|
||||||
addCriterion("delete_Flag in", values, "deleteFlag");
|
addCriterion("delete_Flag in", values, "deleteFlag");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andDeleteFlagNotIn(List<Boolean> values) {
|
public Criteria andDeleteFlagNotIn(List<String> values) {
|
||||||
addCriterion("delete_Flag not in", values, "deleteFlag");
|
addCriterion("delete_Flag not in", values, "deleteFlag");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andDeleteFlagBetween(Boolean value1, Boolean value2) {
|
public Criteria andDeleteFlagBetween(String value1, String value2) {
|
||||||
addCriterion("delete_Flag between", value1, value2, "deleteFlag");
|
addCriterion("delete_Flag between", value1, value2, "deleteFlag");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andDeleteFlagNotBetween(Boolean value1, Boolean value2) {
|
public Criteria andDeleteFlagNotBetween(String value1, String value2) {
|
||||||
addCriterion("delete_Flag not between", value1, value2, "deleteFlag");
|
addCriterion("delete_Flag not between", value1, value2, "deleteFlag");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
@@ -814,6 +830,68 @@ public class SerialNumberExample {
|
|||||||
addCriterion("updater not between", value1, value2, "updater");
|
addCriterion("updater not between", value1, value2, "updater");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
public Criteria andDepotheadIdIsNull() {
|
||||||
|
addCriterion("depotheadId is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDepotheadIdIsNotNull() {
|
||||||
|
addCriterion("depotheadId is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDepotheadIdEqualTo(Long value) {
|
||||||
|
addCriterion("depotheadId =", value, "depotheadId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDepotheadIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("depotheadId <>", value, "depotheadId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDepotheadIdGreaterThan(Long value) {
|
||||||
|
addCriterion("depotheadId >", value, "depotheadId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDepotheadIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("depotheadId >=", value, "depotheadId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDepotheadIdLessThan(Long value) {
|
||||||
|
addCriterion("depotheadId <", value, "depotheadId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDepotheadIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("depotheadId <=", value, "depotheadId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDepotheadIdIn(List<Long> values) {
|
||||||
|
addCriterion("depotheadId in", values, "depotheadId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDepotheadIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("depotheadId not in", values, "depotheadId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDepotheadIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("depotheadId between", value1, value2, "depotheadId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDepotheadIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("depotheadId not between", value1, value2, "depotheadId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -101,87 +101,6 @@ public interface DepotHeadMapper {
|
|||||||
*/
|
*/
|
||||||
int updateByPrimaryKey(DepotHead record);
|
int updateByPrimaryKey(DepotHead record);
|
||||||
|
|
||||||
List<DepotHeadVo4List> selectByConditionDepotHead(
|
|
||||||
@Param("type") String type,
|
|
||||||
@Param("subType") String subType,
|
|
||||||
@Param("number") String number,
|
|
||||||
@Param("beginTime") String beginTime,
|
|
||||||
@Param("endTime") String endTime,
|
|
||||||
@Param("dhIds") String dhIds,
|
|
||||||
@Param("offset") Integer offset,
|
|
||||||
@Param("rows") Integer rows);
|
|
||||||
|
|
||||||
int countsByDepotHead(
|
|
||||||
@Param("type") String type,
|
|
||||||
@Param("subType") String subType,
|
|
||||||
@Param("number") String number,
|
|
||||||
@Param("beginTime") String beginTime,
|
|
||||||
@Param("endTime") String endTime,
|
|
||||||
@Param("dhIds") String dhIds);
|
|
||||||
|
|
||||||
Long getMaxId();
|
|
||||||
|
|
||||||
String findMaterialsListByHeaderId(
|
|
||||||
@Param("id") Long id);
|
|
||||||
|
|
||||||
List<DepotHeadVo4InDetail> findByAll(
|
|
||||||
@Param("beginTime") String beginTime,
|
|
||||||
@Param("endTime") String endTime,
|
|
||||||
@Param("type") String type,
|
|
||||||
@Param("pid") Integer pid,
|
|
||||||
@Param("dids") String dids,
|
|
||||||
@Param("oId") Integer oId,
|
|
||||||
@Param("offset") Integer offset,
|
|
||||||
@Param("rows") Integer rows);
|
|
||||||
|
|
||||||
int findByAllCount(
|
|
||||||
@Param("beginTime") String beginTime,
|
|
||||||
@Param("endTime") String endTime,
|
|
||||||
@Param("type") String type,
|
|
||||||
@Param("pid") Integer pid,
|
|
||||||
@Param("dids") String dids,
|
|
||||||
@Param("oId") Integer oId);
|
|
||||||
|
|
||||||
List<DepotHeadVo4InOutMCount> findInOutMaterialCount(
|
|
||||||
@Param("beginTime") String beginTime,
|
|
||||||
@Param("endTime") String endTime,
|
|
||||||
@Param("type") String type,
|
|
||||||
@Param("pid") Integer pid,
|
|
||||||
@Param("dids") String dids,
|
|
||||||
@Param("oId") Integer oId,
|
|
||||||
@Param("offset") Integer offset,
|
|
||||||
@Param("rows") Integer rows);
|
|
||||||
|
|
||||||
int findInOutMaterialCountTotal(
|
|
||||||
@Param("beginTime") String beginTime,
|
|
||||||
@Param("endTime") String endTime,
|
|
||||||
@Param("type") String type,
|
|
||||||
@Param("pid") Integer pid,
|
|
||||||
@Param("dids") String dids,
|
|
||||||
@Param("oId") Integer oId);
|
|
||||||
|
|
||||||
List<DepotHeadVo4StatementAccount> findStatementAccount(
|
|
||||||
@Param("beginTime") String beginTime,
|
|
||||||
@Param("endTime") String endTime,
|
|
||||||
@Param("organId") Integer organId,
|
|
||||||
@Param("supType") String supType,
|
|
||||||
@Param("offset") Integer offset,
|
|
||||||
@Param("rows") Integer rows);
|
|
||||||
|
|
||||||
int findStatementAccountCount(
|
|
||||||
@Param("beginTime") String beginTime,
|
|
||||||
@Param("endTime") String endTime,
|
|
||||||
@Param("organId") Integer organId,
|
|
||||||
@Param("supType") String supType);
|
|
||||||
|
|
||||||
BigDecimal findAllMoney(
|
|
||||||
@Param("supplierId") Integer supplierId,
|
|
||||||
@Param("type") String type,
|
|
||||||
@Param("subType") String subType,
|
|
||||||
@Param("modeName") String modeName,
|
|
||||||
@Param("endTime") String endTime);
|
|
||||||
|
|
||||||
List<DepotHeadVo4List> getDetailByNumber(
|
|
||||||
@Param("number") String number);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,110 @@
|
|||||||
|
package com.jsh.erp.datasource.mappers;
|
||||||
|
|
||||||
|
import com.jsh.erp.datasource.entities.DepotHead;
|
||||||
|
import com.jsh.erp.datasource.vo.DepotHeadVo4InDetail;
|
||||||
|
import com.jsh.erp.datasource.vo.DepotHeadVo4InOutMCount;
|
||||||
|
import com.jsh.erp.datasource.vo.DepotHeadVo4List;
|
||||||
|
import com.jsh.erp.datasource.vo.DepotHeadVo4StatementAccount;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description
|
||||||
|
*
|
||||||
|
* @Author: cjl
|
||||||
|
* @Date: 2019/1/25 14:50
|
||||||
|
*/
|
||||||
|
public interface DepotHeadMapperEx {
|
||||||
|
List<DepotHeadVo4List> selectByConditionDepotHead(
|
||||||
|
@Param("type") String type,
|
||||||
|
@Param("subType") String subType,
|
||||||
|
@Param("number") String number,
|
||||||
|
@Param("beginTime") String beginTime,
|
||||||
|
@Param("endTime") String endTime,
|
||||||
|
@Param("dhIds") String dhIds,
|
||||||
|
@Param("offset") Integer offset,
|
||||||
|
@Param("rows") Integer rows);
|
||||||
|
|
||||||
|
int countsByDepotHead(
|
||||||
|
@Param("type") String type,
|
||||||
|
@Param("subType") String subType,
|
||||||
|
@Param("number") String number,
|
||||||
|
@Param("beginTime") String beginTime,
|
||||||
|
@Param("endTime") String endTime,
|
||||||
|
@Param("dhIds") String dhIds);
|
||||||
|
|
||||||
|
Long getMaxId();
|
||||||
|
|
||||||
|
String findMaterialsListByHeaderId(
|
||||||
|
@Param("id") Long id);
|
||||||
|
|
||||||
|
List<DepotHeadVo4InDetail> findByAll(
|
||||||
|
@Param("beginTime") String beginTime,
|
||||||
|
@Param("endTime") String endTime,
|
||||||
|
@Param("type") String type,
|
||||||
|
@Param("pid") Integer pid,
|
||||||
|
@Param("dids") String dids,
|
||||||
|
@Param("oId") Integer oId,
|
||||||
|
@Param("offset") Integer offset,
|
||||||
|
@Param("rows") Integer rows);
|
||||||
|
|
||||||
|
int findByAllCount(
|
||||||
|
@Param("beginTime") String beginTime,
|
||||||
|
@Param("endTime") String endTime,
|
||||||
|
@Param("type") String type,
|
||||||
|
@Param("pid") Integer pid,
|
||||||
|
@Param("dids") String dids,
|
||||||
|
@Param("oId") Integer oId);
|
||||||
|
|
||||||
|
List<DepotHeadVo4InOutMCount> findInOutMaterialCount(
|
||||||
|
@Param("beginTime") String beginTime,
|
||||||
|
@Param("endTime") String endTime,
|
||||||
|
@Param("type") String type,
|
||||||
|
@Param("pid") Integer pid,
|
||||||
|
@Param("dids") String dids,
|
||||||
|
@Param("oId") Integer oId,
|
||||||
|
@Param("offset") Integer offset,
|
||||||
|
@Param("rows") Integer rows);
|
||||||
|
|
||||||
|
int findInOutMaterialCountTotal(
|
||||||
|
@Param("beginTime") String beginTime,
|
||||||
|
@Param("endTime") String endTime,
|
||||||
|
@Param("type") String type,
|
||||||
|
@Param("pid") Integer pid,
|
||||||
|
@Param("dids") String dids,
|
||||||
|
@Param("oId") Integer oId);
|
||||||
|
|
||||||
|
List<DepotHeadVo4StatementAccount> findStatementAccount(
|
||||||
|
@Param("beginTime") String beginTime,
|
||||||
|
@Param("endTime") String endTime,
|
||||||
|
@Param("organId") Integer organId,
|
||||||
|
@Param("supType") String supType,
|
||||||
|
@Param("offset") Integer offset,
|
||||||
|
@Param("rows") Integer rows);
|
||||||
|
|
||||||
|
int findStatementAccountCount(
|
||||||
|
@Param("beginTime") String beginTime,
|
||||||
|
@Param("endTime") String endTime,
|
||||||
|
@Param("organId") Integer organId,
|
||||||
|
@Param("supType") String supType);
|
||||||
|
|
||||||
|
BigDecimal findAllMoney(
|
||||||
|
@Param("supplierId") Integer supplierId,
|
||||||
|
@Param("type") String type,
|
||||||
|
@Param("subType") String subType,
|
||||||
|
@Param("modeName") String modeName,
|
||||||
|
@Param("endTime") String endTime);
|
||||||
|
|
||||||
|
List<DepotHeadVo4List> getDetailByNumber(
|
||||||
|
@Param("number") String number);
|
||||||
|
/**
|
||||||
|
* 新增单据主表信息,并反显单据主表id
|
||||||
|
* */
|
||||||
|
int adddepotHead(DepotHead depotHead);
|
||||||
|
/**
|
||||||
|
* 更新单据主表信息
|
||||||
|
* */
|
||||||
|
void updatedepotHead(DepotHead depotHead);
|
||||||
|
}
|
||||||
@@ -96,123 +96,6 @@ public interface DepotItemMapper {
|
|||||||
*/
|
*/
|
||||||
int updateByPrimaryKey(DepotItem record);
|
int updateByPrimaryKey(DepotItem record);
|
||||||
|
|
||||||
List<DepotItem> selectByConditionDepotItem(
|
|
||||||
@Param("name") String name,
|
|
||||||
@Param("type") Integer type,
|
|
||||||
@Param("remark") String remark,
|
|
||||||
@Param("offset") Integer offset,
|
|
||||||
@Param("rows") Integer rows);
|
|
||||||
|
|
||||||
int countsByDepotItem(
|
|
||||||
@Param("name") String name,
|
|
||||||
@Param("type") Integer type,
|
|
||||||
@Param("remark") String remark);
|
|
||||||
|
|
||||||
List<DepotItemVo4HeaderId> getHeaderIdByMaterial(
|
|
||||||
@Param("materialParam") String materialParam,
|
|
||||||
@Param("depotIds") String depotIds);
|
|
||||||
|
|
||||||
List<DepotItemVo4DetailByTypeAndMId> findDetailByTypeAndMaterialIdList(
|
|
||||||
@Param("mId") Long mId,
|
|
||||||
@Param("offset") Integer offset,
|
|
||||||
@Param("rows") Integer rows);
|
|
||||||
|
|
||||||
int findDetailByTypeAndMaterialIdCounts(
|
|
||||||
@Param("mId") Long mId);
|
|
||||||
|
|
||||||
List<DepotItemVo4Material> findStockNumByMaterialIdList(
|
|
||||||
@Param("mId") Long mId,
|
|
||||||
@Param("monthTime") String monthTime,
|
|
||||||
@Param("offset") Integer offset,
|
|
||||||
@Param("rows") Integer rows);
|
|
||||||
|
|
||||||
int findStockNumByMaterialIdCounts(
|
|
||||||
@Param("mId") Long mId,
|
|
||||||
@Param("monthTime") String monthTime);
|
|
||||||
|
|
||||||
int findByTypeAndMaterialIdIn(
|
|
||||||
@Param("mId") Long mId);
|
|
||||||
|
|
||||||
int findByTypeAndMaterialIdOut(
|
|
||||||
@Param("mId") Long mId);
|
|
||||||
|
|
||||||
List<DepotItemVo4WithInfoEx> getDetailList(
|
|
||||||
@Param("headerId") Long headerId);
|
|
||||||
|
|
||||||
List<DepotItemVo4WithInfoEx> findByAll(
|
|
||||||
@Param("headIds") String headIds,
|
|
||||||
@Param("materialIds") String materialIds,
|
|
||||||
@Param("offset") Integer offset,
|
|
||||||
@Param("rows") Integer rows);
|
|
||||||
|
|
||||||
int findByAllCount(
|
|
||||||
@Param("headIds") String headIds,
|
|
||||||
@Param("materialIds") String materialIds);
|
|
||||||
|
|
||||||
BigDecimal findByTypeInIsPrev(
|
|
||||||
@Param("ProjectId") Integer ProjectId,
|
|
||||||
@Param("MId") Long MId,
|
|
||||||
@Param("MonthTime") String MonthTime);
|
|
||||||
|
|
||||||
BigDecimal findByTypeInIsNotPrev(
|
|
||||||
@Param("ProjectId") Integer ProjectId,
|
|
||||||
@Param("MId") Long MId,
|
|
||||||
@Param("MonthTime") String MonthTime);
|
|
||||||
|
|
||||||
BigDecimal findByTypeOutIsPrev(
|
|
||||||
@Param("ProjectId") Integer ProjectId,
|
|
||||||
@Param("MId") Long MId,
|
|
||||||
@Param("MonthTime") String MonthTime);
|
|
||||||
|
|
||||||
BigDecimal findByTypeOutIsNotPrev(
|
|
||||||
@Param("ProjectId") Integer ProjectId,
|
|
||||||
@Param("MId") Long MId,
|
|
||||||
@Param("MonthTime") String MonthTime);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BigDecimal findPriceByTypeInIsPrev(
|
|
||||||
@Param("ProjectId") Integer ProjectId,
|
|
||||||
@Param("MId") Long MId,
|
|
||||||
@Param("MonthTime") String MonthTime);
|
|
||||||
|
|
||||||
BigDecimal findPriceByTypeInIsNotPrev(
|
|
||||||
@Param("ProjectId") Integer ProjectId,
|
|
||||||
@Param("MId") Long MId,
|
|
||||||
@Param("MonthTime") String MonthTime);
|
|
||||||
|
|
||||||
BigDecimal findPriceByTypeOutIsPrev(
|
|
||||||
@Param("ProjectId") Integer ProjectId,
|
|
||||||
@Param("MId") Long MId,
|
|
||||||
@Param("MonthTime") String MonthTime);
|
|
||||||
|
|
||||||
BigDecimal findPriceByTypeOutIsNotPrev(
|
|
||||||
@Param("ProjectId") Integer ProjectId,
|
|
||||||
@Param("MId") Long MId,
|
|
||||||
@Param("MonthTime") String MonthTime);
|
|
||||||
|
|
||||||
BigDecimal buyOrSaleNumber(
|
|
||||||
@Param("type") String type,
|
|
||||||
@Param("subType") String subType,
|
|
||||||
@Param("MId") Long MId,
|
|
||||||
@Param("MonthTime") String MonthTime,
|
|
||||||
@Param("sumType") String sumType);
|
|
||||||
|
|
||||||
BigDecimal buyOrSalePrice(
|
|
||||||
@Param("type") String type,
|
|
||||||
@Param("subType") String subType,
|
|
||||||
@Param("MId") Long MId,
|
|
||||||
@Param("MonthTime") String MonthTime,
|
|
||||||
@Param("sumType") String sumType);
|
|
||||||
|
|
||||||
BigDecimal findGiftByTypeIn(
|
|
||||||
@Param("subType") String subType,
|
|
||||||
@Param("ProjectId") Integer ProjectId,
|
|
||||||
@Param("MId") Long MId);
|
|
||||||
|
|
||||||
BigDecimal findGiftByTypeOut(
|
|
||||||
@Param("subType") String subType,
|
|
||||||
@Param("ProjectId") Integer ProjectId,
|
|
||||||
@Param("MId") Long MId);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,148 @@
|
|||||||
|
package com.jsh.erp.datasource.mappers;
|
||||||
|
|
||||||
|
import com.jsh.erp.datasource.entities.*;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description
|
||||||
|
*
|
||||||
|
* @Author: cjl
|
||||||
|
* @Date: 2019/1/24 16:59
|
||||||
|
*/
|
||||||
|
public interface DepotItemMapperEx {
|
||||||
|
List<DepotItem> selectByConditionDepotItem(
|
||||||
|
@Param("name") String name,
|
||||||
|
@Param("type") Integer type,
|
||||||
|
@Param("remark") String remark,
|
||||||
|
@Param("offset") Integer offset,
|
||||||
|
@Param("rows") Integer rows);
|
||||||
|
|
||||||
|
int countsByDepotItem(
|
||||||
|
@Param("name") String name,
|
||||||
|
@Param("type") Integer type,
|
||||||
|
@Param("remark") String remark);
|
||||||
|
|
||||||
|
List<DepotItemVo4HeaderId> getHeaderIdByMaterial(
|
||||||
|
@Param("materialParam") String materialParam,
|
||||||
|
@Param("depotIds") String depotIds);
|
||||||
|
|
||||||
|
List<DepotItemVo4DetailByTypeAndMId> findDetailByTypeAndMaterialIdList(
|
||||||
|
@Param("mId") Long mId,
|
||||||
|
@Param("offset") Integer offset,
|
||||||
|
@Param("rows") Integer rows);
|
||||||
|
|
||||||
|
int findDetailByTypeAndMaterialIdCounts(
|
||||||
|
@Param("mId") Long mId);
|
||||||
|
|
||||||
|
List<DepotItemVo4Material> findStockNumByMaterialIdList(
|
||||||
|
@Param("mId") Long mId,
|
||||||
|
@Param("monthTime") String monthTime,
|
||||||
|
@Param("offset") Integer offset,
|
||||||
|
@Param("rows") Integer rows);
|
||||||
|
|
||||||
|
int findStockNumByMaterialIdCounts(
|
||||||
|
@Param("mId") Long mId,
|
||||||
|
@Param("monthTime") String monthTime);
|
||||||
|
|
||||||
|
int findByTypeAndMaterialIdIn(
|
||||||
|
@Param("mId") Long mId);
|
||||||
|
|
||||||
|
int findByTypeAndMaterialIdOut(
|
||||||
|
@Param("mId") Long mId);
|
||||||
|
|
||||||
|
List<DepotItemVo4WithInfoEx> getDetailList(
|
||||||
|
@Param("headerId") Long headerId);
|
||||||
|
|
||||||
|
List<DepotItemVo4WithInfoEx> findByAll(
|
||||||
|
@Param("headIds") String headIds,
|
||||||
|
@Param("materialIds") String materialIds,
|
||||||
|
@Param("offset") Integer offset,
|
||||||
|
@Param("rows") Integer rows);
|
||||||
|
|
||||||
|
int findByAllCount(
|
||||||
|
@Param("headIds") String headIds,
|
||||||
|
@Param("materialIds") String materialIds);
|
||||||
|
|
||||||
|
BigDecimal findByTypeInIsPrev(
|
||||||
|
@Param("ProjectId") Integer ProjectId,
|
||||||
|
@Param("MId") Long MId,
|
||||||
|
@Param("MonthTime") String MonthTime);
|
||||||
|
|
||||||
|
BigDecimal findByTypeInIsNotPrev(
|
||||||
|
@Param("ProjectId") Integer ProjectId,
|
||||||
|
@Param("MId") Long MId,
|
||||||
|
@Param("MonthTime") String MonthTime);
|
||||||
|
|
||||||
|
BigDecimal findByTypeOutIsPrev(
|
||||||
|
@Param("ProjectId") Integer ProjectId,
|
||||||
|
@Param("MId") Long MId,
|
||||||
|
@Param("MonthTime") String MonthTime);
|
||||||
|
|
||||||
|
BigDecimal findByTypeOutIsNotPrev(
|
||||||
|
@Param("ProjectId") Integer ProjectId,
|
||||||
|
@Param("MId") Long MId,
|
||||||
|
@Param("MonthTime") String MonthTime);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
BigDecimal findPriceByTypeInIsPrev(
|
||||||
|
@Param("ProjectId") Integer ProjectId,
|
||||||
|
@Param("MId") Long MId,
|
||||||
|
@Param("MonthTime") String MonthTime);
|
||||||
|
|
||||||
|
BigDecimal findPriceByTypeInIsNotPrev(
|
||||||
|
@Param("ProjectId") Integer ProjectId,
|
||||||
|
@Param("MId") Long MId,
|
||||||
|
@Param("MonthTime") String MonthTime);
|
||||||
|
|
||||||
|
BigDecimal findPriceByTypeOutIsPrev(
|
||||||
|
@Param("ProjectId") Integer ProjectId,
|
||||||
|
@Param("MId") Long MId,
|
||||||
|
@Param("MonthTime") String MonthTime);
|
||||||
|
|
||||||
|
BigDecimal findPriceByTypeOutIsNotPrev(
|
||||||
|
@Param("ProjectId") Integer ProjectId,
|
||||||
|
@Param("MId") Long MId,
|
||||||
|
@Param("MonthTime") String MonthTime);
|
||||||
|
|
||||||
|
BigDecimal buyOrSaleNumber(
|
||||||
|
@Param("type") String type,
|
||||||
|
@Param("subType") String subType,
|
||||||
|
@Param("MId") Long MId,
|
||||||
|
@Param("MonthTime") String MonthTime,
|
||||||
|
@Param("sumType") String sumType);
|
||||||
|
|
||||||
|
BigDecimal buyOrSalePrice(
|
||||||
|
@Param("type") String type,
|
||||||
|
@Param("subType") String subType,
|
||||||
|
@Param("MId") Long MId,
|
||||||
|
@Param("MonthTime") String MonthTime,
|
||||||
|
@Param("sumType") String sumType);
|
||||||
|
|
||||||
|
BigDecimal findGiftByTypeIn(
|
||||||
|
@Param("subType") String subType,
|
||||||
|
@Param("ProjectId") Integer ProjectId,
|
||||||
|
@Param("MId") Long MId);
|
||||||
|
|
||||||
|
BigDecimal findGiftByTypeOut(
|
||||||
|
@Param("subType") String subType,
|
||||||
|
@Param("ProjectId") Integer ProjectId,
|
||||||
|
@Param("MId") Long MId);
|
||||||
|
/**
|
||||||
|
* create by: cjl
|
||||||
|
* description:
|
||||||
|
* 通过单据主表id查询所有单据子表数据
|
||||||
|
* create time: 2019/1/24 16:56
|
||||||
|
* @Param: depotheadId
|
||||||
|
* @return java.util.List<com.jsh.erp.datasource.entities.DepotItem>
|
||||||
|
*/
|
||||||
|
List<DepotItem> findDepotItemListBydepotheadId(@Param("depotheadId")Long depotheadId,
|
||||||
|
@Param("enableSerialNumber")String enableSerialNumber);
|
||||||
|
/**
|
||||||
|
* 根据单据主表id删除单据子表数据
|
||||||
|
* */
|
||||||
|
int deleteDepotItemByDepotHeadIds(@Param("depotheadIds")Long []depotHeadIds);
|
||||||
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.jsh.erp.datasource.mappers;
|
package com.jsh.erp.datasource.mappers;
|
||||||
|
|
||||||
import com.jsh.erp.datasource.entities.SerialNumber;
|
|
||||||
import com.jsh.erp.datasource.entities.SerialNumberEx;
|
import com.jsh.erp.datasource.entities.SerialNumberEx;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -42,4 +42,19 @@ public interface SerialNumberMapperEx {
|
|||||||
* 未删除为卖出的视为有效
|
* 未删除为卖出的视为有效
|
||||||
* */
|
* */
|
||||||
int findSerialNumberByMaterialId(@Param("materialId") Long materialId);
|
int findSerialNumberByMaterialId(@Param("materialId") Long materialId);
|
||||||
|
/**
|
||||||
|
* 查询符合条件的序列号数量
|
||||||
|
* */
|
||||||
|
int countSerialNumberByMaterialIdAndDepotheadId(@Param("materialId")Long materialId, @Param("depotheadId")Long depotheadId, @Param("isSell")String isSell);
|
||||||
|
/**
|
||||||
|
* 卖出: update jsh_serial_number set is_Sell='1' ,depothead_Id='depotheadId' where 1=1 and material_Id='materialId'
|
||||||
|
* and is_Sell !='1' and delete_Flag !='1' {limit 0,count}
|
||||||
|
* */
|
||||||
|
int sellSerialNumber(@Param("materialId")Long materialId, @Param("depotheadId")Long depotheadId,@Param("count")Integer count, @Param("updateTime") Date updateTime,@Param("updater") Long updater);
|
||||||
|
/**
|
||||||
|
* 赎回:update jsh_serial_number set is_Sell='0' where 1=1 and material_Id='materialId'
|
||||||
|
* and depothead_Id='depotheadId' and is_Sell !='0' and delete_Flag !='1' {limit 0,count}
|
||||||
|
* */
|
||||||
|
int cancelSerialNumber(@Param("materialId")Long materialId, @Param("depotheadId")Long depotheadId, @Param("count")Integer count, @Param("updateTime") Date updateTime,@Param("updater") Long updater);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,14 +2,22 @@ package com.jsh.erp.service.depotHead;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.jsh.erp.constants.BusinessConstants;
|
||||||
import com.jsh.erp.datasource.entities.DepotHead;
|
import com.jsh.erp.datasource.entities.DepotHead;
|
||||||
import com.jsh.erp.datasource.entities.DepotHeadExample;
|
import com.jsh.erp.datasource.entities.DepotHeadExample;
|
||||||
|
import com.jsh.erp.datasource.entities.DepotItem;
|
||||||
import com.jsh.erp.datasource.entities.User;
|
import com.jsh.erp.datasource.entities.User;
|
||||||
import com.jsh.erp.datasource.mappers.DepotHeadMapper;
|
import com.jsh.erp.datasource.mappers.DepotHeadMapper;
|
||||||
|
import com.jsh.erp.datasource.mappers.DepotHeadMapperEx;
|
||||||
|
import com.jsh.erp.datasource.mappers.DepotItemMapperEx;
|
||||||
import com.jsh.erp.datasource.vo.DepotHeadVo4InDetail;
|
import com.jsh.erp.datasource.vo.DepotHeadVo4InDetail;
|
||||||
import com.jsh.erp.datasource.vo.DepotHeadVo4InOutMCount;
|
import com.jsh.erp.datasource.vo.DepotHeadVo4InOutMCount;
|
||||||
import com.jsh.erp.datasource.vo.DepotHeadVo4List;
|
import com.jsh.erp.datasource.vo.DepotHeadVo4List;
|
||||||
import com.jsh.erp.datasource.vo.DepotHeadVo4StatementAccount;
|
import com.jsh.erp.datasource.vo.DepotHeadVo4StatementAccount;
|
||||||
|
import com.jsh.erp.service.depotItem.DepotItemService;
|
||||||
|
import com.jsh.erp.service.serialNumber.SerialNumberService;
|
||||||
|
import com.jsh.erp.service.supplier.SupplierService;
|
||||||
|
import com.jsh.erp.service.user.UserService;
|
||||||
import com.jsh.erp.utils.StringUtil;
|
import com.jsh.erp.utils.StringUtil;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@@ -33,6 +41,19 @@ public class DepotHeadService {
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private DepotHeadMapper depotHeadMapper;
|
private DepotHeadMapper depotHeadMapper;
|
||||||
|
@Resource
|
||||||
|
private DepotHeadMapperEx depotHeadMapperEx;
|
||||||
|
@Resource
|
||||||
|
private UserService userService;
|
||||||
|
@Resource
|
||||||
|
DepotItemService depotItemService;
|
||||||
|
@Resource
|
||||||
|
private SupplierService supplierService;
|
||||||
|
@Resource
|
||||||
|
private SerialNumberService serialNumberService;
|
||||||
|
@Resource
|
||||||
|
DepotItemMapperEx depotItemMapperEx;
|
||||||
|
|
||||||
|
|
||||||
public DepotHead getDepotHead(long id) {
|
public DepotHead getDepotHead(long id) {
|
||||||
return depotHeadMapper.selectByPrimaryKey(id);
|
return depotHeadMapper.selectByPrimaryKey(id);
|
||||||
@@ -45,7 +66,7 @@ public class DepotHeadService {
|
|||||||
|
|
||||||
public List<DepotHeadVo4List> select(String type, String subType, String number, String beginTime, String endTime, String dhIds, int offset, int rows) {
|
public List<DepotHeadVo4List> select(String type, String subType, String number, String beginTime, String endTime, String dhIds, int offset, int rows) {
|
||||||
List<DepotHeadVo4List> resList = new ArrayList<DepotHeadVo4List>();
|
List<DepotHeadVo4List> resList = new ArrayList<DepotHeadVo4List>();
|
||||||
List<DepotHeadVo4List> list = depotHeadMapper.selectByConditionDepotHead(type, subType, number, beginTime, endTime, dhIds, offset, rows);
|
List<DepotHeadVo4List> list = depotHeadMapperEx.selectByConditionDepotHead(type, subType, number, beginTime, endTime, dhIds, offset, rows);
|
||||||
if (null != list) {
|
if (null != list) {
|
||||||
for (DepotHeadVo4List dh : list) {
|
for (DepotHeadVo4List dh : list) {
|
||||||
if(dh.getOthermoneylist() != null) {
|
if(dh.getOthermoneylist() != null) {
|
||||||
@@ -73,7 +94,7 @@ public class DepotHeadService {
|
|||||||
|
|
||||||
|
|
||||||
public int countDepotHead(String type, String subType, String number, String beginTime, String endTime, String dhIds) {
|
public int countDepotHead(String type, String subType, String number, String beginTime, String endTime, String dhIds) {
|
||||||
return depotHeadMapper.countsByDepotHead(type, subType, number, beginTime, endTime, dhIds);
|
return depotHeadMapperEx.countsByDepotHead(type, subType, number, beginTime, endTime, dhIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||||
@@ -169,11 +190,11 @@ public class DepotHeadService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Long getMaxId() {
|
public Long getMaxId() {
|
||||||
return depotHeadMapper.getMaxId();
|
return depotHeadMapperEx.getMaxId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String findMaterialsListByHeaderId(Long id) {
|
public String findMaterialsListByHeaderId(Long id) {
|
||||||
String allReturn = depotHeadMapper.findMaterialsListByHeaderId(id);
|
String allReturn = depotHeadMapperEx.findMaterialsListByHeaderId(id);
|
||||||
return allReturn;
|
return allReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,27 +215,27 @@ public class DepotHeadService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<DepotHeadVo4InDetail> findByAll(String beginTime, String endTime, String type, Integer pid, String dids, Integer oId, Integer offset, Integer rows) {
|
public List<DepotHeadVo4InDetail> findByAll(String beginTime, String endTime, String type, Integer pid, String dids, Integer oId, Integer offset, Integer rows) {
|
||||||
return depotHeadMapper.findByAll(beginTime, endTime, type, pid, dids, oId, offset, rows);
|
return depotHeadMapperEx.findByAll(beginTime, endTime, type, pid, dids, oId, offset, rows);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int findByAllCount(String beginTime, String endTime, String type, Integer pid, String dids, Integer oId) {
|
public int findByAllCount(String beginTime, String endTime, String type, Integer pid, String dids, Integer oId) {
|
||||||
return depotHeadMapper.findByAllCount(beginTime, endTime, type, pid, dids, oId);
|
return depotHeadMapperEx.findByAllCount(beginTime, endTime, type, pid, dids, oId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<DepotHeadVo4InOutMCount> findInOutMaterialCount(String beginTime, String endTime, String type, Integer pid, String dids, Integer oId, Integer offset, Integer rows) {
|
public List<DepotHeadVo4InOutMCount> findInOutMaterialCount(String beginTime, String endTime, String type, Integer pid, String dids, Integer oId, Integer offset, Integer rows) {
|
||||||
return depotHeadMapper.findInOutMaterialCount(beginTime, endTime, type, pid, dids, oId, offset, rows);
|
return depotHeadMapperEx.findInOutMaterialCount(beginTime, endTime, type, pid, dids, oId, offset, rows);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int findInOutMaterialCountTotal(String beginTime, String endTime, String type, Integer pid, String dids, Integer oId) {
|
public int findInOutMaterialCountTotal(String beginTime, String endTime, String type, Integer pid, String dids, Integer oId) {
|
||||||
return depotHeadMapper.findInOutMaterialCountTotal(beginTime, endTime, type, pid, dids, oId);
|
return depotHeadMapperEx.findInOutMaterialCountTotal(beginTime, endTime, type, pid, dids, oId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<DepotHeadVo4StatementAccount> findStatementAccount(String beginTime, String endTime, Integer organId, String supType, Integer offset, Integer rows) {
|
public List<DepotHeadVo4StatementAccount> findStatementAccount(String beginTime, String endTime, Integer organId, String supType, Integer offset, Integer rows) {
|
||||||
return depotHeadMapper.findStatementAccount(beginTime, endTime, organId, supType, offset, rows);
|
return depotHeadMapperEx.findStatementAccount(beginTime, endTime, organId, supType, offset, rows);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int findStatementAccountCount(String beginTime, String endTime, Integer organId, String supType) {
|
public int findStatementAccountCount(String beginTime, String endTime, Integer organId, String supType) {
|
||||||
return depotHeadMapper.findStatementAccountCount(beginTime, endTime, organId, supType);
|
return depotHeadMapperEx.findStatementAccountCount(beginTime, endTime, organId, supType);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal findAllMoney(Integer supplierId, String type, String subType, String mode, String endTime) {
|
public BigDecimal findAllMoney(Integer supplierId, String type, String subType, String mode, String endTime) {
|
||||||
@@ -224,12 +245,12 @@ public class DepotHeadService {
|
|||||||
} else if (mode.equals("合计")) {
|
} else if (mode.equals("合计")) {
|
||||||
modeName = "DiscountLastMoney";
|
modeName = "DiscountLastMoney";
|
||||||
}
|
}
|
||||||
return depotHeadMapper.findAllMoney(supplierId, type, subType, modeName, endTime);
|
return depotHeadMapperEx.findAllMoney(supplierId, type, subType, modeName, endTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<DepotHeadVo4List> getDetailByNumber(String number) {
|
public List<DepotHeadVo4List> getDetailByNumber(String number) {
|
||||||
List<DepotHeadVo4List> resList = new ArrayList<DepotHeadVo4List>();
|
List<DepotHeadVo4List> resList = new ArrayList<DepotHeadVo4List>();
|
||||||
List<DepotHeadVo4List> list = depotHeadMapper.getDetailByNumber(number);
|
List<DepotHeadVo4List> list = depotHeadMapperEx.getDetailByNumber(number);
|
||||||
if (null != list) {
|
if (null != list) {
|
||||||
for (DepotHeadVo4List dh : list) {
|
for (DepotHeadVo4List dh : list) {
|
||||||
if(dh.getOthermoneylist() != null) {
|
if(dh.getOthermoneylist() != null) {
|
||||||
@@ -254,4 +275,115 @@ public class DepotHeadService {
|
|||||||
return resList;
|
return resList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* create by: cjl
|
||||||
|
* description:
|
||||||
|
* 新增单据主表及单据子表信息
|
||||||
|
* create time: 2019/1/25 14:36
|
||||||
|
* @Param: beanJson
|
||||||
|
* @Param: inserted
|
||||||
|
* @Param: deleted
|
||||||
|
* @Param: updated
|
||||||
|
* @return java.lang.String
|
||||||
|
*/
|
||||||
|
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||||
|
public void addDepotHeadAndDetail(String beanJson, String inserted, String deleted, String updated) throws Exception {
|
||||||
|
/**处理单据主表数据*/
|
||||||
|
DepotHead depotHead = JSONObject.parseObject(beanJson, DepotHead.class);
|
||||||
|
//判断用户是否已经登录过,登录过不再处理
|
||||||
|
User userInfo=userService.getCurrentUser();
|
||||||
|
depotHead.setOperpersonname(userInfo==null?null:userInfo.getUsername());
|
||||||
|
depotHead.setCreatetime(new Timestamp(System.currentTimeMillis()));
|
||||||
|
depotHead.setStatus(false);
|
||||||
|
depotHeadMapperEx.adddepotHead(depotHead);
|
||||||
|
|
||||||
|
/**入库和出库处理预付款信息*/
|
||||||
|
if(BusinessConstants.PAY_TYPE_PREPAID.equals(depotHead.getPaytype())){
|
||||||
|
if(depotHead.getOrganid()!=null) {
|
||||||
|
supplierService.updateAdvanceIn(depotHead.getOrganid(), BigDecimal.ZERO.subtract(depotHead.getTotalprice()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**入库和出库处理单据子表信息*/
|
||||||
|
depotItemService.saveDetials(inserted,deleted,updated,depotHead.getId());
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* create by: cjl
|
||||||
|
* description:
|
||||||
|
* 更新单据主表及单据子表信息
|
||||||
|
* create time: 2019/1/28 14:47
|
||||||
|
* @Param: id
|
||||||
|
* @Param: beanJson
|
||||||
|
* @Param: inserted
|
||||||
|
* @Param: deleted
|
||||||
|
* @Param: updated
|
||||||
|
* @Param: preTotalPrice
|
||||||
|
* @return java.lang.Object
|
||||||
|
*/
|
||||||
|
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||||
|
public void updateDepotHeadAndDetail(Long id, String beanJson, String inserted, String deleted, String updated, BigDecimal preTotalPrice)throws Exception {
|
||||||
|
/**更新单据主表信息*/
|
||||||
|
DepotHead depotHead = JSONObject.parseObject(beanJson, DepotHead.class);
|
||||||
|
//判断用户是否已经登录过,登录过不再处理
|
||||||
|
depotHead.setId(id);
|
||||||
|
User userInfo=userService.getCurrentUser();
|
||||||
|
depotHead.setOperpersonname(userInfo==null?null:userInfo.getUsername());
|
||||||
|
depotHead.setOpertime(new Timestamp(System.currentTimeMillis()));
|
||||||
|
depotHeadMapperEx.updatedepotHead(depotHead);
|
||||||
|
/**入库和出库处理预付款信息*/
|
||||||
|
if(BusinessConstants.PAY_TYPE_PREPAID.equals(depotHead.getPaytype())){
|
||||||
|
if(depotHead.getOrganid()!=null){
|
||||||
|
supplierService.updateAdvanceIn(depotHead.getOrganid(), BigDecimal.ZERO.subtract(depotHead.getTotalprice().subtract(preTotalPrice)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**入库和出库处理单据子表信息*/
|
||||||
|
depotItemService.saveDetials(inserted,deleted,updated,depotHead.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* create by: cjl
|
||||||
|
* description:
|
||||||
|
* 删除单据主表及子表信息
|
||||||
|
* create time: 2019/1/28 17:29
|
||||||
|
* @Param: id
|
||||||
|
* @return java.lang.Object
|
||||||
|
*/
|
||||||
|
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||||
|
public void deleteDepotHeadAndDetail(Long id) throws Exception {
|
||||||
|
//查询单据主表信息
|
||||||
|
DepotHead depotHead =getDepotHead(id);
|
||||||
|
User userInfo=userService.getCurrentUser();
|
||||||
|
//删除出库数据回收序列号
|
||||||
|
if(BusinessConstants.DEPOTHEAD_TYPE_OUT.equals(depotHead.getType())
|
||||||
|
&&!BusinessConstants.SUB_TYPE_TRANSFER.equals(depotHead.getSubtype())){
|
||||||
|
//查询单据子表列表
|
||||||
|
List<DepotItem> depotItemList = depotItemMapperEx.findDepotItemListBydepotheadId(id,BusinessConstants.ENABLE_SERIAL_NUMBER_ENABLED);
|
||||||
|
/**回收序列号*/
|
||||||
|
if(depotItemList!=null&&depotItemList.size()>0){
|
||||||
|
for(DepotItem depotItem:depotItemList){
|
||||||
|
serialNumberService.cancelSerialNumber(depotItem.getMaterialid(), depotItem.getHeaderid(),depotItem.getOpernumber().intValue(),userInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**删除单据子表数据*/
|
||||||
|
depotItemMapperEx.deleteDepotItemByDepotHeadIds(new Long []{id});
|
||||||
|
/**删除单据主表信息*/
|
||||||
|
deleteDepotHead(id);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* create by: cjl
|
||||||
|
* description:
|
||||||
|
* 批量删除单据主表及子表信息
|
||||||
|
* create time: 2019/1/28 17:29
|
||||||
|
* @Param: id
|
||||||
|
* @return java.lang.Object
|
||||||
|
*/
|
||||||
|
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||||
|
public void batchDeleteDepotHeadAndDetail(String ids) throws Exception{
|
||||||
|
if(StringUtil.isNotEmpty(ids)){
|
||||||
|
String [] headIds=ids.split(",");
|
||||||
|
for(int i=0;i<headIds.length;i++){
|
||||||
|
deleteDepotHeadAndDetail(new Long(headIds[i]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,15 @@ package com.jsh.erp.service.depotItem;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.jsh.erp.constants.BusinessConstants;
|
||||||
import com.jsh.erp.datasource.entities.*;
|
import com.jsh.erp.datasource.entities.*;
|
||||||
|
import com.jsh.erp.datasource.mappers.DepotHeadMapper;
|
||||||
import com.jsh.erp.datasource.mappers.DepotItemMapper;
|
import com.jsh.erp.datasource.mappers.DepotItemMapper;
|
||||||
|
import com.jsh.erp.datasource.mappers.DepotItemMapperEx;
|
||||||
|
import com.jsh.erp.datasource.mappers.SerialNumberMapperEx;
|
||||||
import com.jsh.erp.service.material.MaterialService;
|
import com.jsh.erp.service.material.MaterialService;
|
||||||
|
import com.jsh.erp.service.serialNumber.SerialNumberService;
|
||||||
|
import com.jsh.erp.service.user.UserService;
|
||||||
import com.jsh.erp.utils.ErpInfo;
|
import com.jsh.erp.utils.ErpInfo;
|
||||||
import com.jsh.erp.utils.QueryUtils;
|
import com.jsh.erp.utils.QueryUtils;
|
||||||
import com.jsh.erp.utils.StringUtil;
|
import com.jsh.erp.utils.StringUtil;
|
||||||
@@ -17,6 +23,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -34,7 +41,17 @@ public class DepotItemService {
|
|||||||
@Resource
|
@Resource
|
||||||
private DepotItemMapper depotItemMapper;
|
private DepotItemMapper depotItemMapper;
|
||||||
@Resource
|
@Resource
|
||||||
|
private DepotItemMapperEx depotItemMapperEx;
|
||||||
|
@Resource
|
||||||
private MaterialService materialService;
|
private MaterialService materialService;
|
||||||
|
@Resource
|
||||||
|
SerialNumberMapperEx serialNumberMapperEx;
|
||||||
|
@Resource
|
||||||
|
private DepotHeadMapper depotHeadMapper;
|
||||||
|
@Resource
|
||||||
|
SerialNumberService serialNumberService;
|
||||||
|
@Resource
|
||||||
|
private UserService userService;
|
||||||
|
|
||||||
public DepotItem getDepotItem(long id) {
|
public DepotItem getDepotItem(long id) {
|
||||||
return depotItemMapper.selectByPrimaryKey(id);
|
return depotItemMapper.selectByPrimaryKey(id);
|
||||||
@@ -46,11 +63,11 @@ public class DepotItemService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<DepotItem> select(String name, Integer type, String remark, int offset, int rows) {
|
public List<DepotItem> select(String name, Integer type, String remark, int offset, int rows) {
|
||||||
return depotItemMapper.selectByConditionDepotItem(name, type, remark, offset, rows);
|
return depotItemMapperEx.selectByConditionDepotItem(name, type, remark, offset, rows);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int countDepotItem(String name, Integer type, String remark) {
|
public int countDepotItem(String name, Integer type, String remark) {
|
||||||
return depotItemMapper.countsByDepotItem(name, type, remark);
|
return depotItemMapperEx.countsByDepotItem(name, type, remark);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||||
@@ -87,7 +104,7 @@ public class DepotItemService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<DepotItemVo4HeaderId> getHeaderIdByMaterial(String materialParam, String depotIds) {
|
public List<DepotItemVo4HeaderId> getHeaderIdByMaterial(String materialParam, String depotIds) {
|
||||||
return depotItemMapper.getHeaderIdByMaterial(materialParam, depotIds);
|
return depotItemMapperEx.getHeaderIdByMaterial(materialParam, depotIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<DepotItemVo4DetailByTypeAndMId> findDetailByTypeAndMaterialIdList(Map<String, String> map) {
|
public List<DepotItemVo4DetailByTypeAndMId> findDetailByTypeAndMaterialIdList(Map<String, String> map) {
|
||||||
@@ -96,7 +113,7 @@ public class DepotItemService {
|
|||||||
if(!StringUtil.isEmpty(mIdStr)) {
|
if(!StringUtil.isEmpty(mIdStr)) {
|
||||||
mId = Long.parseLong(mIdStr);
|
mId = Long.parseLong(mIdStr);
|
||||||
}
|
}
|
||||||
return depotItemMapper.findDetailByTypeAndMaterialIdList(mId, QueryUtils.offset(map), QueryUtils.rows(map));
|
return depotItemMapperEx.findDetailByTypeAndMaterialIdList(mId, QueryUtils.offset(map), QueryUtils.rows(map));
|
||||||
}
|
}
|
||||||
|
|
||||||
public int findDetailByTypeAndMaterialIdCounts(Map<String, String> map) {
|
public int findDetailByTypeAndMaterialIdCounts(Map<String, String> map) {
|
||||||
@@ -105,7 +122,7 @@ public class DepotItemService {
|
|||||||
if(!StringUtil.isEmpty(mIdStr)) {
|
if(!StringUtil.isEmpty(mIdStr)) {
|
||||||
mId = Long.parseLong(mIdStr);
|
mId = Long.parseLong(mIdStr);
|
||||||
}
|
}
|
||||||
return depotItemMapper.findDetailByTypeAndMaterialIdCounts(mId);
|
return depotItemMapperEx.findDetailByTypeAndMaterialIdCounts(mId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<DepotItemVo4Material> findStockNumByMaterialIdList(Map<String, String> map) {
|
public List<DepotItemVo4Material> findStockNumByMaterialIdList(Map<String, String> map) {
|
||||||
@@ -115,7 +132,7 @@ public class DepotItemService {
|
|||||||
mId = Long.parseLong(mIdStr);
|
mId = Long.parseLong(mIdStr);
|
||||||
}
|
}
|
||||||
String monthTime = map.get("monthTime");
|
String monthTime = map.get("monthTime");
|
||||||
return depotItemMapper.findStockNumByMaterialIdList(mId, monthTime, QueryUtils.offset(map), QueryUtils.rows(map));
|
return depotItemMapperEx.findStockNumByMaterialIdList(mId, monthTime, QueryUtils.offset(map), QueryUtils.rows(map));
|
||||||
}
|
}
|
||||||
|
|
||||||
public int findStockNumByMaterialIdCounts(Map<String, String> map) {
|
public int findStockNumByMaterialIdCounts(Map<String, String> map) {
|
||||||
@@ -125,7 +142,7 @@ public class DepotItemService {
|
|||||||
mId = Long.parseLong(mIdStr);
|
mId = Long.parseLong(mIdStr);
|
||||||
}
|
}
|
||||||
String monthTime = map.get("monthTime");
|
String monthTime = map.get("monthTime");
|
||||||
return depotItemMapper.findStockNumByMaterialIdCounts(mId, monthTime);
|
return depotItemMapperEx.findStockNumByMaterialIdCounts(mId, monthTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||||
@@ -140,36 +157,36 @@ public class DepotItemService {
|
|||||||
|
|
||||||
public int findByTypeAndMaterialId(String type, Long mId) {
|
public int findByTypeAndMaterialId(String type, Long mId) {
|
||||||
if(type.equals(TYPE)) {
|
if(type.equals(TYPE)) {
|
||||||
return depotItemMapper.findByTypeAndMaterialIdIn(mId);
|
return depotItemMapperEx.findByTypeAndMaterialIdIn(mId);
|
||||||
} else {
|
} else {
|
||||||
return depotItemMapper.findByTypeAndMaterialIdOut(mId);
|
return depotItemMapperEx.findByTypeAndMaterialIdOut(mId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<DepotItemVo4WithInfoEx> getDetailList(Long headerId) {
|
public List<DepotItemVo4WithInfoEx> getDetailList(Long headerId) {
|
||||||
return depotItemMapper.getDetailList(headerId);
|
return depotItemMapperEx.getDetailList(headerId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<DepotItemVo4WithInfoEx> findByAll(String headIds, String materialIds, Integer offset, Integer rows) {
|
public List<DepotItemVo4WithInfoEx> findByAll(String headIds, String materialIds, Integer offset, Integer rows) {
|
||||||
return depotItemMapper.findByAll(headIds, materialIds, offset, rows);
|
return depotItemMapperEx.findByAll(headIds, materialIds, offset, rows);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int findByAllCount(String headIds, String materialIds) {
|
public int findByAllCount(String headIds, String materialIds) {
|
||||||
return depotItemMapper.findByAllCount(headIds, materialIds);
|
return depotItemMapperEx.findByAllCount(headIds, materialIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal findByType(String type, Integer ProjectId, Long MId, String MonthTime, Boolean isPrev) {
|
public BigDecimal findByType(String type, Integer ProjectId, Long MId, String MonthTime, Boolean isPrev) {
|
||||||
if (TYPE.equals(type)) {
|
if (TYPE.equals(type)) {
|
||||||
if (isPrev) {
|
if (isPrev) {
|
||||||
return depotItemMapper.findByTypeInIsPrev(ProjectId, MId, MonthTime);
|
return depotItemMapperEx.findByTypeInIsPrev(ProjectId, MId, MonthTime);
|
||||||
} else {
|
} else {
|
||||||
return depotItemMapper.findByTypeInIsNotPrev(ProjectId, MId, MonthTime);
|
return depotItemMapperEx.findByTypeInIsNotPrev(ProjectId, MId, MonthTime);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (isPrev) {
|
if (isPrev) {
|
||||||
return depotItemMapper.findByTypeOutIsPrev(ProjectId, MId, MonthTime);
|
return depotItemMapperEx.findByTypeOutIsPrev(ProjectId, MId, MonthTime);
|
||||||
} else {
|
} else {
|
||||||
return depotItemMapper.findByTypeOutIsNotPrev(ProjectId, MId, MonthTime);
|
return depotItemMapperEx.findByTypeOutIsNotPrev(ProjectId, MId, MonthTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -177,41 +194,64 @@ public class DepotItemService {
|
|||||||
public BigDecimal findPriceByType(String type, Integer ProjectId, Long MId, String MonthTime, Boolean isPrev) {
|
public BigDecimal findPriceByType(String type, Integer ProjectId, Long MId, String MonthTime, Boolean isPrev) {
|
||||||
if (TYPE.equals(type)) {
|
if (TYPE.equals(type)) {
|
||||||
if (isPrev) {
|
if (isPrev) {
|
||||||
return depotItemMapper.findPriceByTypeInIsPrev(ProjectId, MId, MonthTime);
|
return depotItemMapperEx.findPriceByTypeInIsPrev(ProjectId, MId, MonthTime);
|
||||||
} else {
|
} else {
|
||||||
return depotItemMapper.findPriceByTypeInIsNotPrev(ProjectId, MId, MonthTime);
|
return depotItemMapperEx.findPriceByTypeInIsNotPrev(ProjectId, MId, MonthTime);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (isPrev) {
|
if (isPrev) {
|
||||||
return depotItemMapper.findPriceByTypeOutIsPrev(ProjectId, MId, MonthTime);
|
return depotItemMapperEx.findPriceByTypeOutIsPrev(ProjectId, MId, MonthTime);
|
||||||
} else {
|
} else {
|
||||||
return depotItemMapper.findPriceByTypeOutIsNotPrev(ProjectId, MId, MonthTime);
|
return depotItemMapperEx.findPriceByTypeOutIsNotPrev(ProjectId, MId, MonthTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal buyOrSale(String type, String subType, Long MId, String MonthTime, String sumType) {
|
public BigDecimal buyOrSale(String type, String subType, Long MId, String MonthTime, String sumType) {
|
||||||
if (SUM_TYPE.equals(sumType)) {
|
if (SUM_TYPE.equals(sumType)) {
|
||||||
return depotItemMapper.buyOrSaleNumber(type, subType, MId, MonthTime, sumType);
|
return depotItemMapperEx.buyOrSaleNumber(type, subType, MId, MonthTime, sumType);
|
||||||
} else {
|
} else {
|
||||||
return depotItemMapper.buyOrSalePrice(type, subType, MId, MonthTime, sumType);
|
return depotItemMapperEx.buyOrSalePrice(type, subType, MId, MonthTime, sumType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal findGiftByType(String subType, Integer ProjectId, Long MId, String type) {
|
public BigDecimal findGiftByType(String subType, Integer ProjectId, Long MId, String type) {
|
||||||
if (IN.equals(type)) {
|
if (IN.equals(type)) {
|
||||||
return depotItemMapper.findGiftByTypeIn(subType, ProjectId, MId);
|
return depotItemMapperEx.findGiftByTypeIn(subType, ProjectId, MId);
|
||||||
} else {
|
} else {
|
||||||
return depotItemMapper.findGiftByTypeOut(subType, ProjectId, MId);
|
return depotItemMapperEx.findGiftByTypeOut(subType, ProjectId, MId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||||
public String saveDetials(String inserted, String deleted, String updated, Long headerId) throws DataAccessException{
|
public String saveDetials(String inserted, String deleted, String updated, Long headerId) throws Exception{
|
||||||
//转为json
|
//查询单据主表信息
|
||||||
|
DepotHead depotHead=depotHeadMapper.selectByPrimaryKey(headerId);
|
||||||
|
//获得当前操作人
|
||||||
|
User userInfo=userService.getCurrentUser();
|
||||||
|
//转为json
|
||||||
JSONArray insertedJson = JSONArray.parseArray(inserted);
|
JSONArray insertedJson = JSONArray.parseArray(inserted);
|
||||||
JSONArray deletedJson = JSONArray.parseArray(deleted);
|
JSONArray deletedJson = JSONArray.parseArray(deleted);
|
||||||
JSONArray updatedJson = JSONArray.parseArray(updated);
|
JSONArray updatedJson = JSONArray.parseArray(updated);
|
||||||
|
/**
|
||||||
|
* 2019-01-28优先处理删除的
|
||||||
|
* 删除的可以继续卖,删除的需要将使用的序列号回收
|
||||||
|
* 插入的需要判断当前货源是否充足
|
||||||
|
* 更新的需要判断货源是否充足
|
||||||
|
* */
|
||||||
|
if (null != deletedJson) {
|
||||||
|
for (int i = 0; i < deletedJson.size(); i++) {
|
||||||
|
//首先回收序列号,如果是调拨,不用处理序列号
|
||||||
|
JSONObject tempDeletedJson = JSONObject.parseObject(deletedJson.getString(i));
|
||||||
|
if(BusinessConstants.DEPOTHEAD_TYPE_OUT.equals(depotHead.getType())
|
||||||
|
&&!BusinessConstants.SUB_TYPE_TRANSFER.equals(depotHead.getSubtype())){
|
||||||
|
DepotItem depotItem = getDepotItem(tempDeletedJson.getLong("Id"));
|
||||||
|
serialNumberMapperEx.cancelSerialNumber(depotItem.getMaterialid(),depotItem.getHeaderid(),depotItem.getOpernumber().intValue(),
|
||||||
|
new Date(),userInfo==null?null:userInfo.getId());
|
||||||
|
}
|
||||||
|
this.deleteDepotItem(tempDeletedJson.getLong("Id"));
|
||||||
|
}
|
||||||
|
}
|
||||||
if (null != insertedJson) {
|
if (null != insertedJson) {
|
||||||
for (int i = 0; i < insertedJson.size(); i++) {
|
for (int i = 0; i < insertedJson.size(); i++) {
|
||||||
DepotItem depotItem = new DepotItem();
|
DepotItem depotItem = new DepotItem();
|
||||||
@@ -289,18 +329,25 @@ public class DepotItemService {
|
|||||||
depotItem.setMtype(tempInsertedJson.getString("MType"));
|
depotItem.setMtype(tempInsertedJson.getString("MType"));
|
||||||
}
|
}
|
||||||
this.insertDepotItemWithObj(depotItem);
|
this.insertDepotItemWithObj(depotItem);
|
||||||
|
/**出库时处理序列号*/
|
||||||
|
if(BusinessConstants.DEPOTHEAD_TYPE_OUT.equals(depotHead.getType())
|
||||||
|
&&!BusinessConstants.SUB_TYPE_TRANSFER.equals(depotHead.getSubtype())){
|
||||||
|
//查询单据子表中开启序列号的数据列表
|
||||||
|
serialNumberService.checkAndUpdateSerialNumber(depotItem,userInfo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (null != deletedJson) {
|
|
||||||
for (int i = 0; i < deletedJson.size(); i++) {
|
|
||||||
JSONObject tempDeletedJson = JSONObject.parseObject(deletedJson.getString(i));
|
|
||||||
this.deleteDepotItem(tempDeletedJson.getLong("Id"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (null != updatedJson) {
|
if (null != updatedJson) {
|
||||||
for (int i = 0; i < updatedJson.size(); i++) {
|
for (int i = 0; i < updatedJson.size(); i++) {
|
||||||
JSONObject tempUpdatedJson = JSONObject.parseObject(updatedJson.getString(i));
|
JSONObject tempUpdatedJson = JSONObject.parseObject(updatedJson.getString(i));
|
||||||
DepotItem depotItem = this.getDepotItem(tempUpdatedJson.getLong("Id"));
|
DepotItem depotItem = this.getDepotItem(tempUpdatedJson.getLong("Id"));
|
||||||
|
//首先回收序列号
|
||||||
|
if(BusinessConstants.DEPOTHEAD_TYPE_OUT.equals(depotHead.getType())
|
||||||
|
&&!BusinessConstants.SUB_TYPE_TRANSFER.equals(depotHead.getSubtype())) {
|
||||||
|
serialNumberMapperEx.cancelSerialNumber(depotItem.getMaterialid(), depotItem.getHeaderid(), depotItem.getOpernumber().intValue(),
|
||||||
|
new Date(),userInfo==null?null:userInfo.getId());
|
||||||
|
}
|
||||||
depotItem.setId(tempUpdatedJson.getLong("Id"));
|
depotItem.setId(tempUpdatedJson.getLong("Id"));
|
||||||
depotItem.setMaterialid(tempUpdatedJson.getLong("MaterialId"));
|
depotItem.setMaterialid(tempUpdatedJson.getLong("MaterialId"));
|
||||||
depotItem.setMunit(tempUpdatedJson.getString("Unit"));
|
depotItem.setMunit(tempUpdatedJson.getString("Unit"));
|
||||||
@@ -362,6 +409,12 @@ public class DepotItemService {
|
|||||||
depotItem.setOtherfield5(tempUpdatedJson.getString("OtherField5"));
|
depotItem.setOtherfield5(tempUpdatedJson.getString("OtherField5"));
|
||||||
depotItem.setMtype(tempUpdatedJson.getString("MType"));
|
depotItem.setMtype(tempUpdatedJson.getString("MType"));
|
||||||
this.updateDepotItemWithObj(depotItem);
|
this.updateDepotItemWithObj(depotItem);
|
||||||
|
/**出库时处理序列号*/
|
||||||
|
if(BusinessConstants.DEPOTHEAD_TYPE_OUT.equals(depotHead.getType())
|
||||||
|
&&!BusinessConstants.SUB_TYPE_TRANSFER.equals(depotHead.getSubtype())){
|
||||||
|
//查询单据子表中开启序列号的数据列表
|
||||||
|
serialNumberService.checkAndUpdateSerialNumber(depotItem,userInfo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@@ -386,4 +439,5 @@ public class DepotItemService {
|
|||||||
}
|
}
|
||||||
return unitName;
|
return unitName;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,7 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.jsh.erp.constants.BusinessConstants;
|
import com.jsh.erp.constants.BusinessConstants;
|
||||||
import com.jsh.erp.constants.ExceptionConstants;
|
import com.jsh.erp.constants.ExceptionConstants;
|
||||||
import com.jsh.erp.datasource.entities.*;
|
import com.jsh.erp.datasource.entities.*;
|
||||||
import com.jsh.erp.datasource.mappers.MaterialMapperEx;
|
import com.jsh.erp.datasource.mappers.*;
|
||||||
import com.jsh.erp.datasource.mappers.SerialNumberMapper;
|
|
||||||
import com.jsh.erp.datasource.mappers.SerialNumberMapperEx;
|
|
||||||
import com.jsh.erp.exception.BusinessRunTimeException;
|
import com.jsh.erp.exception.BusinessRunTimeException;
|
||||||
import com.jsh.erp.service.depotItem.DepotItemService;
|
import com.jsh.erp.service.depotItem.DepotItemService;
|
||||||
import com.jsh.erp.service.material.MaterialService;
|
import com.jsh.erp.service.material.MaterialService;
|
||||||
@@ -39,9 +37,13 @@ public class SerialNumberService {
|
|||||||
@Resource
|
@Resource
|
||||||
private MaterialMapperEx materialMapperEx;
|
private MaterialMapperEx materialMapperEx;
|
||||||
@Resource
|
@Resource
|
||||||
|
private MaterialMapper materialMapper;
|
||||||
|
@Resource
|
||||||
private DepotItemService depotItemService;
|
private DepotItemService depotItemService;
|
||||||
@Resource
|
@Resource
|
||||||
private UserService userService;
|
private UserService userService;
|
||||||
|
@Resource
|
||||||
|
private DepotItemMapperEx depotItemMapperEx;
|
||||||
|
|
||||||
|
|
||||||
public SerialNumber getSerialNumber(long id) {
|
public SerialNumber getSerialNumber(long id) {
|
||||||
@@ -173,9 +175,9 @@ public class SerialNumberService {
|
|||||||
serialNumberEx.setMaterialId(getSerialNumberMaterialIdByMaterialName(serialNumberEx.getMaterialName()));
|
serialNumberEx.setMaterialId(getSerialNumberMaterialIdByMaterialName(serialNumberEx.getMaterialName()));
|
||||||
}
|
}
|
||||||
//删除标记,默认未删除
|
//删除标记,默认未删除
|
||||||
serialNumberEx.setDeleteFlag(false);
|
serialNumberEx.setDeleteFlag(BusinessConstants.DELETE_FLAG_EXISTS);
|
||||||
//已卖出,默认未否
|
//已卖出,默认未否
|
||||||
serialNumberEx.setIsSell(false);
|
serialNumberEx.setIsSell(BusinessConstants.IS_SELL_HOLD);
|
||||||
Date date=new Date();
|
Date date=new Date();
|
||||||
serialNumberEx.setCreateTime(date);
|
serialNumberEx.setCreateTime(date);
|
||||||
serialNumberEx.setUpdateTime(date);
|
serialNumberEx.setUpdateTime(date);
|
||||||
@@ -231,7 +233,7 @@ public class SerialNumberService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
//获得唯一商品
|
//获得唯一商品
|
||||||
if(BusinessConstants.MATERIAL_NOT_ENABLE_SERIAL_NUMBER==mlist.get(0).getEnableSerialNumber()){
|
if(BusinessConstants.ENABLE_SERIAL_NUMBER_NOT_ENABLED.equals(mlist.get(0).getEnableSerialNumber())){
|
||||||
//商品未开启序列号
|
//商品未开启序列号
|
||||||
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_NOT_ENABLE_SERIAL_NUMBER_CODE,
|
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_NOT_ENABLE_SERIAL_NUMBER_CODE,
|
||||||
ExceptionConstants.MATERIAL_NOT_ENABLE_SERIAL_NUMBER_MSG);
|
ExceptionConstants.MATERIAL_NOT_ENABLE_SERIAL_NUMBER_MSG);
|
||||||
@@ -254,4 +256,66 @@ public class SerialNumberService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* create by: cjl
|
||||||
|
* description:
|
||||||
|
* 出库时判断序列号库存是否足够,
|
||||||
|
* 同时将对应的序列号绑定单据
|
||||||
|
* create time: 2019/1/24 16:24
|
||||||
|
* @Param: List<DepotItem>
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public void checkAndUpdateSerialNumber(DepotItem depotItem,User userInfo) throws Exception{
|
||||||
|
if(depotItem!=null){
|
||||||
|
//查询商品下已分配的可用序列号数量
|
||||||
|
int SerialNumberSum= serialNumberMapperEx.countSerialNumberByMaterialIdAndDepotheadId(depotItem.getMaterialid(),null,BusinessConstants.IS_SELL_HOLD);
|
||||||
|
if(depotItem.getOpernumber().intValue()>SerialNumberSum){
|
||||||
|
//获取商品名称
|
||||||
|
Material material= materialMapper.selectByPrimaryKey(depotItem.getMaterialid());
|
||||||
|
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_SERIAL_NUMBERE_NOT_ENOUGH_CODE,
|
||||||
|
String.format(ExceptionConstants.MATERIAL_SERIAL_NUMBERE_NOT_ENOUGH_MSG,material==null?"":material.getName()));
|
||||||
|
}
|
||||||
|
//商品下序列号充足,分配序列号
|
||||||
|
sellSerialNumber(depotItem.getMaterialid(),depotItem.getHeaderid(),depotItem.getOpernumber().intValue(),userInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* */
|
||||||
|
/**
|
||||||
|
* create by: cjl
|
||||||
|
* description:
|
||||||
|
* 卖出序列号
|
||||||
|
* create time: 2019/1/25 9:17
|
||||||
|
* @Param: materialId
|
||||||
|
* @Param: depotheadId
|
||||||
|
* @Param: isSell 卖出'1'
|
||||||
|
* @Param: Count 卖出或者赎回的数量
|
||||||
|
* @return com.jsh.erp.datasource.entities.SerialNumberEx
|
||||||
|
*/
|
||||||
|
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||||
|
public int sellSerialNumber(Long materialId, Long depotheadId,int count,User user) throws Exception{
|
||||||
|
return serialNumberMapperEx.sellSerialNumber(materialId,depotheadId,count,new Date(),user==null?null:user.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* create by: cjl
|
||||||
|
* description:
|
||||||
|
* 赎回序列号
|
||||||
|
* create time: 2019/1/25 9:17
|
||||||
|
* @Param: materialId
|
||||||
|
* @Param: depotheadId
|
||||||
|
* @Param: isSell 赎回'0'
|
||||||
|
* @Param: Count 卖出或者赎回的数量
|
||||||
|
* @return com.jsh.erp.datasource.entities.SerialNumberEx
|
||||||
|
*/
|
||||||
|
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||||
|
public int cancelSerialNumber(Long materialId, Long depotheadId,int count,User user) throws Exception{
|
||||||
|
return serialNumberMapperEx.cancelSerialNumber(materialId,depotheadId,count,new Date(),user==null?null:user.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,8 +78,13 @@ public class SupplierService {
|
|||||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||||
public int updateAdvanceIn(Long supplierId, BigDecimal advanceIn){
|
public int updateAdvanceIn(Long supplierId, BigDecimal advanceIn){
|
||||||
Supplier supplier = supplierMapper.selectByPrimaryKey(supplierId);
|
Supplier supplier = supplierMapper.selectByPrimaryKey(supplierId);
|
||||||
supplier.setAdvancein(supplier.getAdvancein().add(advanceIn)); //增加预收款的金额,可能增加的是负值
|
if(supplier!=null){
|
||||||
return supplierMapper.updateByPrimaryKeySelective(supplier);
|
supplier.setAdvancein(supplier.getAdvancein().add(advanceIn)); //增加预收款的金额,可能增加的是负值
|
||||||
|
return supplierMapper.updateByPrimaryKeySelective(supplier);
|
||||||
|
}else{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Supplier> findBySelectCus() {
|
public List<Supplier> findBySelectCus() {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.jsh.erp.datasource.mappers.DepotHeadMapper">
|
<mapper namespace="com.jsh.erp.datasource.mappers.DepotHeadMapperEx">
|
||||||
|
|
||||||
<resultMap extends="BaseResultMap" id="ResultMapEx" type="com.jsh.erp.datasource.vo.DepotHeadVo4List">
|
<resultMap extends="com.jsh.erp.datasource.mappers.DepotHeadMapper.BaseResultMap" id="ResultMapEx" type="com.jsh.erp.datasource.vo.DepotHeadVo4List">
|
||||||
<result column="ProjectName" jdbcType="VARCHAR" property="projectName" />
|
<result column="ProjectName" jdbcType="VARCHAR" property="projectName" />
|
||||||
<result column="OrganName" jdbcType="VARCHAR" property="organName" />
|
<result column="OrganName" jdbcType="VARCHAR" property="organName" />
|
||||||
<result column="HandsPersonName" jdbcType="VARCHAR" property="handsPersonName" />
|
<result column="HandsPersonName" jdbcType="VARCHAR" property="handsPersonName" />
|
||||||
@@ -282,4 +282,112 @@
|
|||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<insert id="adddepotHead" parameterType="com.jsh.erp.datasource.entities.DepotHead"
|
||||||
|
useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||||
|
insert into jsh_depothead (Type, SubType,
|
||||||
|
ProjectId, DefaultNumber, Number,
|
||||||
|
OperPersonName, CreateTime, OperTime,
|
||||||
|
OrganId, HandsPersonId, AccountId,
|
||||||
|
ChangeAmount, AllocationProjectId, TotalPrice,
|
||||||
|
PayType, Remark, Salesman,
|
||||||
|
AccountIdList, AccountMoneyList, Discount,
|
||||||
|
DiscountMoney, DiscountLastMoney, OtherMoney,
|
||||||
|
OtherMoneyList, OtherMoneyItem, AccountDay,
|
||||||
|
Status)
|
||||||
|
values (#{type,jdbcType=VARCHAR}, #{subtype,jdbcType=VARCHAR},
|
||||||
|
#{projectid,jdbcType=BIGINT}, #{defaultnumber,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR},
|
||||||
|
#{operpersonname,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{opertime,jdbcType=TIMESTAMP},
|
||||||
|
#{organid,jdbcType=BIGINT}, #{handspersonid,jdbcType=BIGINT}, #{accountid,jdbcType=BIGINT},
|
||||||
|
#{changeamount,jdbcType=DECIMAL}, #{allocationprojectid,jdbcType=BIGINT}, #{totalprice,jdbcType=DECIMAL},
|
||||||
|
#{paytype,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{salesman,jdbcType=VARCHAR},
|
||||||
|
#{accountidlist,jdbcType=VARCHAR}, #{accountmoneylist,jdbcType=VARCHAR}, #{discount,jdbcType=DECIMAL},
|
||||||
|
#{discountmoney,jdbcType=DECIMAL}, #{discountlastmoney,jdbcType=DECIMAL}, #{othermoney,jdbcType=DECIMAL},
|
||||||
|
#{othermoneylist,jdbcType=VARCHAR}, #{othermoneyitem,jdbcType=VARCHAR}, #{accountday,jdbcType=INTEGER},
|
||||||
|
#{status,jdbcType=BIT})
|
||||||
|
</insert>
|
||||||
|
<update id="updatedepotHead" parameterType="com.jsh.erp.datasource.entities.DepotHead">
|
||||||
|
update jsh_depothead
|
||||||
|
<set>
|
||||||
|
<if test="type != null">
|
||||||
|
Type = #{type,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="subtype != null">
|
||||||
|
SubType = #{subtype,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="projectid != null">
|
||||||
|
ProjectId = #{projectid,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="defaultnumber != null">
|
||||||
|
DefaultNumber = #{defaultnumber,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="number != null">
|
||||||
|
Number = #{number,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="operpersonname != null">
|
||||||
|
OperPersonName = #{operpersonname,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="opertime != null">
|
||||||
|
OperTime = #{opertime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="organid != null">
|
||||||
|
OrganId = #{organid,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="handspersonid != null">
|
||||||
|
HandsPersonId = #{handspersonid,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="accountid != null">
|
||||||
|
AccountId = #{accountid,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="changeamount != null">
|
||||||
|
ChangeAmount = #{changeamount,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
|
<if test="allocationprojectid != null">
|
||||||
|
AllocationProjectId = #{allocationprojectid,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="totalprice != null">
|
||||||
|
TotalPrice = #{totalprice,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
|
<if test="paytype != null">
|
||||||
|
PayType = #{paytype,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="remark != null">
|
||||||
|
Remark = #{remark,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="salesman != null">
|
||||||
|
Salesman = #{salesman,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="accountidlist != null">
|
||||||
|
AccountIdList = #{accountidlist,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="accountmoneylist != null">
|
||||||
|
AccountMoneyList = #{accountmoneylist,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="discount != null">
|
||||||
|
Discount = #{discount,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
|
<if test="discountmoney != null">
|
||||||
|
DiscountMoney = #{discountmoney,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
|
<if test="discountlastmoney != null">
|
||||||
|
DiscountLastMoney = #{discountlastmoney,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
|
<if test="othermoney != null">
|
||||||
|
OtherMoney = #{othermoney,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
|
<if test="othermoneylist != null">
|
||||||
|
OtherMoneyList = #{othermoneylist,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="othermoneyitem != null">
|
||||||
|
OtherMoneyItem = #{othermoneyitem,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="accountday != null">
|
||||||
|
AccountDay = #{accountday,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
Status = #{status,jdbcType=BIT},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where Id = #{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.jsh.erp.datasource.mappers.DepotItemMapper">
|
<mapper namespace="com.jsh.erp.datasource.mappers.DepotItemMapperEx">
|
||||||
|
|
||||||
<resultMap id="HeaderIdResultMap" type="com.jsh.erp.datasource.entities.DepotItemVo4HeaderId">
|
<resultMap id="HeaderIdResultMap" type="com.jsh.erp.datasource.entities.DepotItemVo4HeaderId">
|
||||||
<result column="HeaderId" jdbcType="BIGINT" property="headerid" />
|
<result column="HeaderId" jdbcType="BIGINT" property="headerid" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
@@ -12,12 +13,12 @@
|
|||||||
<result column="oTime" jdbcType="TIMESTAMP" property="otime" />
|
<result column="oTime" jdbcType="TIMESTAMP" property="otime" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap extends="BaseResultMap" id="ResultAndMaterialMap" type="com.jsh.erp.datasource.entities.DepotItemVo4Material">
|
<resultMap extends="com.jsh.erp.datasource.mappers.DepotItemMapper.BaseResultMap" id="ResultAndMaterialMap" type="com.jsh.erp.datasource.entities.DepotItemVo4Material">
|
||||||
<result column="mName" jdbcType="VARCHAR" property="mname" />
|
<result column="mName" jdbcType="VARCHAR" property="mname" />
|
||||||
<result column="mModel" jdbcType="VARCHAR" property="mmodel" />
|
<result column="mModel" jdbcType="VARCHAR" property="mmodel" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap extends="BaseResultMap" id="ResultWithInfoExMap" type="com.jsh.erp.datasource.entities.DepotItemVo4WithInfoEx">
|
<resultMap extends="com.jsh.erp.datasource.mappers.DepotItemMapper.BaseResultMap" id="ResultWithInfoExMap" type="com.jsh.erp.datasource.entities.DepotItemVo4WithInfoEx">
|
||||||
<result column="MName" jdbcType="VARCHAR" property="MName" />
|
<result column="MName" jdbcType="VARCHAR" property="MName" />
|
||||||
<result column="MModel" jdbcType="VARCHAR" property="MModel" />
|
<result column="MModel" jdbcType="VARCHAR" property="MModel" />
|
||||||
<result column="MaterialUnit" jdbcType="VARCHAR" property="MaterialUnit" />
|
<result column="MaterialUnit" jdbcType="VARCHAR" property="MaterialUnit" />
|
||||||
@@ -33,7 +34,7 @@
|
|||||||
<result column="UName" jdbcType="VARCHAR" property="UName" />
|
<result column="UName" jdbcType="VARCHAR" property="UName" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap extends="BaseResultMap" id="ResultByMaterial" type="com.jsh.erp.datasource.entities.DepotItemVo4WithInfoEx">
|
<resultMap extends="com.jsh.erp.datasource.mappers.DepotItemMapper.BaseResultMap" id="ResultByMaterial" type="com.jsh.erp.datasource.entities.DepotItemVo4WithInfoEx">
|
||||||
<result column="MId" jdbcType="VARCHAR" property="MId" />
|
<result column="MId" jdbcType="VARCHAR" property="MId" />
|
||||||
<result column="MName" jdbcType="VARCHAR" property="MName" />
|
<result column="MName" jdbcType="VARCHAR" property="MName" />
|
||||||
<result column="MModel" jdbcType="VARCHAR" property="MModel" />
|
<result column="MModel" jdbcType="VARCHAR" property="MModel" />
|
||||||
@@ -41,7 +42,7 @@
|
|||||||
<result column="MColor" jdbcType="VARCHAR" property="MColor" />
|
<result column="MColor" jdbcType="VARCHAR" property="MColor" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="selectByConditionDepotItem" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="BaseResultMap">
|
<select id="selectByConditionDepotItem" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="com.jsh.erp.datasource.mappers.DepotItemMapper.BaseResultMap">
|
||||||
select *
|
select *
|
||||||
FROM jsh_depotitem
|
FROM jsh_depotitem
|
||||||
where 1=1
|
where 1=1
|
||||||
@@ -274,4 +275,35 @@
|
|||||||
and jsh_depotitem.MaterialId =${MId}
|
and jsh_depotitem.MaterialId =${MId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="findDepotItemListBydepotheadId" resultType="com.jsh.erp.datasource.entities.DepotItem">
|
||||||
|
select
|
||||||
|
dep.id,dep.headerId,dep.materialid,dep.munit,dep.opernumber,
|
||||||
|
dep.basicnumber,dep.unitprice,dep.taxunitprice,dep.allprice,dep.remark,
|
||||||
|
dep.img,dep.incidentals,dep.depotid,dep.anotherdepotid,dep.taxrate,
|
||||||
|
dep.taxmoney,dep.taxlastmoney,dep.otherfield1,dep.otherfield2,dep.otherfield3,
|
||||||
|
dep.otherfield4,dep.otherfield5,dep.mtype
|
||||||
|
from jsh_depotitem dep,jsh_material mat
|
||||||
|
where 1=1
|
||||||
|
<if test="depotheadId != null">
|
||||||
|
and HeaderId = #{depotheadId}
|
||||||
|
</if>
|
||||||
|
and dep.materialid=mat.id
|
||||||
|
<if test="enableSerialNumber != null">
|
||||||
|
and mat.enableSerialNumber = #{enableSerialNumber}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<delete id="deleteDepotItemByDepotHeadIds">
|
||||||
|
delete from jsh_depotitem
|
||||||
|
where 1=1
|
||||||
|
and HeaderId in
|
||||||
|
(
|
||||||
|
<foreach collection="depotheadIds" item="depotheadId" separator=",">
|
||||||
|
#{depotheadId}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
<result column="OtherField1" jdbcType="VARCHAR" property="otherfield1" />
|
<result column="OtherField1" jdbcType="VARCHAR" property="otherfield1" />
|
||||||
<result column="OtherField2" jdbcType="VARCHAR" property="otherfield2" />
|
<result column="OtherField2" jdbcType="VARCHAR" property="otherfield2" />
|
||||||
<result column="OtherField3" jdbcType="VARCHAR" property="otherfield3" />
|
<result column="OtherField3" jdbcType="VARCHAR" property="otherfield3" />
|
||||||
<result column="enableSerialNumber" jdbcType="BIT" property="enableSerialNumber" />
|
<result column="enableSerialNumber" jdbcType="VARCHAR" property="enableSerialNumber" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Example_Where_Clause">
|
<sql id="Example_Where_Clause">
|
||||||
<!--
|
<!--
|
||||||
@@ -172,7 +172,7 @@
|
|||||||
#{lowprice,jdbcType=DECIMAL}, #{presetpriceone,jdbcType=DECIMAL}, #{presetpricetwo,jdbcType=DECIMAL},
|
#{lowprice,jdbcType=DECIMAL}, #{presetpriceone,jdbcType=DECIMAL}, #{presetpricetwo,jdbcType=DECIMAL},
|
||||||
#{unitid,jdbcType=BIGINT}, #{firstoutunit,jdbcType=VARCHAR}, #{firstinunit,jdbcType=VARCHAR},
|
#{unitid,jdbcType=BIGINT}, #{firstoutunit,jdbcType=VARCHAR}, #{firstinunit,jdbcType=VARCHAR},
|
||||||
#{pricestrategy,jdbcType=VARCHAR}, #{enabled,jdbcType=BIT}, #{otherfield1,jdbcType=VARCHAR},
|
#{pricestrategy,jdbcType=VARCHAR}, #{enabled,jdbcType=BIT}, #{otherfield1,jdbcType=VARCHAR},
|
||||||
#{otherfield2,jdbcType=VARCHAR}, #{otherfield3,jdbcType=VARCHAR},#{enableSerialNumber,jdbcType=BIT})
|
#{otherfield2,jdbcType=VARCHAR}, #{otherfield3,jdbcType=VARCHAR},#{enableSerialNumber,jdbcType=VARCHAR})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Material">
|
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Material">
|
||||||
<!--
|
<!--
|
||||||
@@ -325,7 +325,7 @@
|
|||||||
#{otherfield3,jdbcType=VARCHAR},
|
#{otherfield3,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="enableSerialNumber != null">
|
<if test="enableSerialNumber != null">
|
||||||
#{enableSerialNumber,jdbcType=BIT},
|
#{enableSerialNumber,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
@@ -452,7 +452,7 @@
|
|||||||
OtherField1 = #{record.otherfield1,jdbcType=VARCHAR},
|
OtherField1 = #{record.otherfield1,jdbcType=VARCHAR},
|
||||||
OtherField2 = #{record.otherfield2,jdbcType=VARCHAR},
|
OtherField2 = #{record.otherfield2,jdbcType=VARCHAR},
|
||||||
OtherField3 = #{record.otherfield3,jdbcType=VARCHAR}
|
OtherField3 = #{record.otherfield3,jdbcType=VARCHAR}
|
||||||
enableSerialNumber = #{record.enableSerialNumber,jdbcType=BIT}
|
enableSerialNumber = #{record.enableSerialNumber,jdbcType=VARCHAR}
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -1,42 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.jsh.erp.datasource.mappers.MaterialMapperEx">
|
<mapper namespace="com.jsh.erp.datasource.mappers.MaterialMapperEx">
|
||||||
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Material">
|
<resultMap extends="com.jsh.erp.datasource.mappers.MaterialMapper.BaseResultMap" id="ResultMapList" type="com.jsh.erp.datasource.entities.MaterialVo4Unit">
|
||||||
<!--
|
|
||||||
WARNING - @mbggenerated
|
|
||||||
This element is automatically generated by MyBatis Generator, do not modify.
|
|
||||||
-->
|
|
||||||
<id column="Id" jdbcType="BIGINT" property="id" />
|
|
||||||
<result column="CategoryId" jdbcType="BIGINT" property="categoryid" />
|
|
||||||
<result column="Name" jdbcType="VARCHAR" property="name" />
|
|
||||||
<result column="Mfrs" jdbcType="VARCHAR" property="mfrs" />
|
|
||||||
<result column="Packing" jdbcType="DECIMAL" property="packing" />
|
|
||||||
<result column="SafetyStock" jdbcType="DECIMAL" property="safetystock" />
|
|
||||||
<result column="Model" jdbcType="VARCHAR" property="model" />
|
|
||||||
<result column="Standard" jdbcType="VARCHAR" property="standard" />
|
|
||||||
<result column="Color" jdbcType="VARCHAR" property="color" />
|
|
||||||
<result column="Unit" jdbcType="VARCHAR" property="unit" />
|
|
||||||
<result column="Remark" jdbcType="VARCHAR" property="remark" />
|
|
||||||
<result column="RetailPrice" jdbcType="DECIMAL" property="retailprice" />
|
|
||||||
<result column="LowPrice" jdbcType="DECIMAL" property="lowprice" />
|
|
||||||
<result column="PresetPriceOne" jdbcType="DECIMAL" property="presetpriceone" />
|
|
||||||
<result column="PresetPriceTwo" jdbcType="DECIMAL" property="presetpricetwo" />
|
|
||||||
<result column="UnitId" jdbcType="BIGINT" property="unitid" />
|
|
||||||
<result column="FirstOutUnit" jdbcType="VARCHAR" property="firstoutunit" />
|
|
||||||
<result column="FirstInUnit" jdbcType="VARCHAR" property="firstinunit" />
|
|
||||||
<result column="PriceStrategy" jdbcType="VARCHAR" property="pricestrategy" />
|
|
||||||
<result column="Enabled" jdbcType="BIT" property="enabled" />
|
|
||||||
<result column="OtherField1" jdbcType="VARCHAR" property="otherfield1" />
|
|
||||||
<result column="OtherField2" jdbcType="VARCHAR" property="otherfield2" />
|
|
||||||
<result column="OtherField3" jdbcType="VARCHAR" property="otherfield3" />
|
|
||||||
<result column="enableSerialNumber" jdbcType="BIT" property="enableSerialNumber" />
|
|
||||||
</resultMap>
|
|
||||||
<resultMap extends="BaseResultMap" id="ResultMapList" type="com.jsh.erp.datasource.entities.MaterialVo4Unit">
|
|
||||||
<result column="unitName" jdbcType="VARCHAR" property="unitName" />
|
<result column="unitName" jdbcType="VARCHAR" property="unitName" />
|
||||||
<result column="categoryName" jdbcType="VARCHAR" property="categoryName" />
|
<result column="categoryName" jdbcType="VARCHAR" property="categoryName" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap extends="BaseResultMap" id="ResultAndUnitMap" type="com.jsh.erp.datasource.entities.MaterialVo4Unit">
|
<resultMap extends="com.jsh.erp.datasource.mappers.MaterialMapper.BaseResultMap" id="ResultAndUnitMap" type="com.jsh.erp.datasource.entities.MaterialVo4Unit">
|
||||||
<result column="UName" jdbcType="VARCHAR" property="unitName" />
|
<result column="UName" jdbcType="VARCHAR" property="unitName" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|||||||
@@ -9,13 +9,14 @@
|
|||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
<result column="material_Id" jdbcType="BIGINT" property="materialId" />
|
<result column="material_Id" jdbcType="BIGINT" property="materialId" />
|
||||||
<result column="serial_Number" jdbcType="VARCHAR" property="serialNumber" />
|
<result column="serial_Number" jdbcType="VARCHAR" property="serialNumber" />
|
||||||
<result column="is_Sell" jdbcType="BIT" property="isSell" />
|
<result column="is_Sell" jdbcType="VARCHAR" property="isSell" />
|
||||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||||
<result column="delete_Flag" jdbcType="BIT" property="deleteFlag" />
|
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
|
||||||
<result column="create_Time" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="create_Time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
<result column="creator" jdbcType="BIGINT" property="creator" />
|
<result column="creator" jdbcType="BIGINT" property="creator" />
|
||||||
<result column="update_Time" jdbcType="TIMESTAMP" property="updateTime" />
|
<result column="update_Time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
<result column="updater" jdbcType="BIGINT" property="updater" />
|
<result column="updater" jdbcType="BIGINT" property="updater" />
|
||||||
|
<result column="depothead_Id" jdbcType="BIGINT" property="depotheadId" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Example_Where_Clause">
|
<sql id="Example_Where_Clause">
|
||||||
<!--
|
<!--
|
||||||
@@ -89,7 +90,7 @@
|
|||||||
This element is automatically generated by MyBatis Generator, do not modify.
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||||||
-->
|
-->
|
||||||
id, material_Id, serial_Number, is_Sell, remark, delete_Flag, create_Time, creator,
|
id, material_Id, serial_Number, is_Sell, remark, delete_Flag, create_Time, creator,
|
||||||
update_Time, updater
|
update_Time, updater,depothead_Id
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.SerialNumberExample" resultMap="BaseResultMap">
|
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.SerialNumberExample" resultMap="BaseResultMap">
|
||||||
<!--
|
<!--
|
||||||
@@ -145,11 +146,11 @@
|
|||||||
insert into jsh_serial_number (id, material_Id, serial_Number,
|
insert into jsh_serial_number (id, material_Id, serial_Number,
|
||||||
is_Sell, remark, delete_Flag,
|
is_Sell, remark, delete_Flag,
|
||||||
create_Time, creator, update_Time,
|
create_Time, creator, update_Time,
|
||||||
updater)
|
updater,depothead_Id)
|
||||||
values (#{id,jdbcType=BIGINT}, #{materialId,jdbcType=BIGINT}, #{serialNumber,jdbcType=VARCHAR},
|
values (#{id,jdbcType=BIGINT}, #{materialId,jdbcType=BIGINT}, #{serialNumber,jdbcType=VARCHAR},
|
||||||
#{isSell,jdbcType=BIT}, #{remark,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=BIT},
|
#{isSell,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=VARCHAR},
|
||||||
#{createTime,jdbcType=TIMESTAMP}, #{creator,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP},
|
#{createTime,jdbcType=TIMESTAMP}, #{creator,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP},
|
||||||
#{updater,jdbcType=BIGINT})
|
#{updater,jdbcType=BIGINT},#{depotheadId,jdbcType=BIGINT})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.SerialNumber">
|
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.SerialNumber">
|
||||||
<!--
|
<!--
|
||||||
@@ -188,6 +189,9 @@
|
|||||||
<if test="updater != null">
|
<if test="updater != null">
|
||||||
updater,
|
updater,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="depotheadId != null">
|
||||||
|
depothead_Id,
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
@@ -200,13 +204,13 @@
|
|||||||
#{serialNumber,jdbcType=VARCHAR},
|
#{serialNumber,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="isSell != null">
|
<if test="isSell != null">
|
||||||
#{isSell,jdbcType=BIT},
|
#{isSell,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="remark != null">
|
<if test="remark != null">
|
||||||
#{remark,jdbcType=VARCHAR},
|
#{remark,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="deleteFlag != null">
|
<if test="deleteFlag != null">
|
||||||
#{deleteFlag,jdbcType=BIT},
|
#{deleteFlag,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="createTime != null">
|
<if test="createTime != null">
|
||||||
#{createTime,jdbcType=TIMESTAMP},
|
#{createTime,jdbcType=TIMESTAMP},
|
||||||
@@ -220,6 +224,9 @@
|
|||||||
<if test="updater != null">
|
<if test="updater != null">
|
||||||
#{updater,jdbcType=BIGINT},
|
#{updater,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="depotheadId != null">
|
||||||
|
#{depotheadId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.SerialNumberExample" resultType="java.lang.Integer">
|
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.SerialNumberExample" resultType="java.lang.Integer">
|
||||||
@@ -249,13 +256,13 @@
|
|||||||
serial_Number = #{record.serialNumber,jdbcType=VARCHAR},
|
serial_Number = #{record.serialNumber,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.isSell != null">
|
<if test="record.isSell != null">
|
||||||
is_Sell = #{record.isSell,jdbcType=BIT},
|
is_Sell = #{record.isSell,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.remark != null">
|
<if test="record.remark != null">
|
||||||
remark = #{record.remark,jdbcType=VARCHAR},
|
remark = #{record.remark,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.deleteFlag != null">
|
<if test="record.deleteFlag != null">
|
||||||
delete_Flag = #{record.deleteFlag,jdbcType=BIT},
|
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.createTime != null">
|
<if test="record.createTime != null">
|
||||||
create_Time = #{record.createTime,jdbcType=TIMESTAMP},
|
create_Time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||||
@@ -269,6 +276,9 @@
|
|||||||
<if test="record.updater != null">
|
<if test="record.updater != null">
|
||||||
updater = #{record.updater,jdbcType=BIGINT},
|
updater = #{record.updater,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="record.depotheadId != null">
|
||||||
|
depothead_Id = #{record.depotheadId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
@@ -283,13 +293,14 @@
|
|||||||
set id = #{record.id,jdbcType=BIGINT},
|
set id = #{record.id,jdbcType=BIGINT},
|
||||||
material_Id = #{record.materialId,jdbcType=BIGINT},
|
material_Id = #{record.materialId,jdbcType=BIGINT},
|
||||||
serial_Number = #{record.serialNumber,jdbcType=VARCHAR},
|
serial_Number = #{record.serialNumber,jdbcType=VARCHAR},
|
||||||
is_Sell = #{record.isSell,jdbcType=BIT},
|
is_Sell = #{record.isSell,jdbcType=VARCHAR},
|
||||||
remark = #{record.remark,jdbcType=VARCHAR},
|
remark = #{record.remark,jdbcType=VARCHAR},
|
||||||
delete_Flag = #{record.deleteFlag,jdbcType=BIT},
|
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
|
||||||
create_Time = #{record.createTime,jdbcType=TIMESTAMP},
|
create_Time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||||
creator = #{record.creator,jdbcType=BIGINT},
|
creator = #{record.creator,jdbcType=BIGINT},
|
||||||
update_Time = #{record.updateTime,jdbcType=TIMESTAMP},
|
update_Time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||||
updater = #{record.updater,jdbcType=BIGINT}
|
updater = #{record.updater,jdbcType=BIGINT},
|
||||||
|
depothead_Id = #{record.depotheadId,jdbcType=BIGINT}
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
</if>
|
</if>
|
||||||
@@ -308,13 +319,13 @@
|
|||||||
serial_Number = #{serialNumber,jdbcType=VARCHAR},
|
serial_Number = #{serialNumber,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="isSell != null">
|
<if test="isSell != null">
|
||||||
is_Sell = #{isSell,jdbcType=BIT},
|
is_Sell = #{isSell,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="remark != null">
|
<if test="remark != null">
|
||||||
remark = #{remark,jdbcType=VARCHAR},
|
remark = #{remark,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="deleteFlag != null">
|
<if test="deleteFlag != null">
|
||||||
delete_Flag = #{deleteFlag,jdbcType=BIT},
|
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="createTime != null">
|
<if test="createTime != null">
|
||||||
create_Time = #{createTime,jdbcType=TIMESTAMP},
|
create_Time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
@@ -328,6 +339,9 @@
|
|||||||
<if test="updater != null">
|
<if test="updater != null">
|
||||||
updater = #{updater,jdbcType=BIGINT},
|
updater = #{updater,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="depotheadId != null">
|
||||||
|
depothead_Id = #{depotheadId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=BIGINT}
|
where id = #{id,jdbcType=BIGINT}
|
||||||
</update>
|
</update>
|
||||||
@@ -339,13 +353,14 @@
|
|||||||
update jsh_serial_number
|
update jsh_serial_number
|
||||||
set material_Id = #{materialId,jdbcType=BIGINT},
|
set material_Id = #{materialId,jdbcType=BIGINT},
|
||||||
serial_Number = #{serialNumber,jdbcType=VARCHAR},
|
serial_Number = #{serialNumber,jdbcType=VARCHAR},
|
||||||
is_Sell = #{isSell,jdbcType=BIT},
|
is_Sell = #{isSell,jdbcType=VARCHAR},
|
||||||
remark = #{remark,jdbcType=VARCHAR},
|
remark = #{remark,jdbcType=VARCHAR},
|
||||||
delete_Flag = #{deleteFlag,jdbcType=BIT},
|
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
|
||||||
create_Time = #{createTime,jdbcType=TIMESTAMP},
|
create_Time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
creator = #{creator,jdbcType=BIGINT},
|
creator = #{creator,jdbcType=BIGINT},
|
||||||
update_Time = #{updateTime,jdbcType=TIMESTAMP},
|
update_Time = #{updateTime,jdbcType=TIMESTAMP},
|
||||||
updater = #{updater,jdbcType=BIGINT}
|
updater = #{updater,jdbcType=BIGINT},
|
||||||
|
depothead_Id = #{depotheadId,jdbcType=BIGINT}
|
||||||
where id = #{id,jdbcType=BIGINT}
|
where id = #{id,jdbcType=BIGINT}
|
||||||
</update>
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -1,25 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.jsh.erp.datasource.mappers.SerialNumberMapperEx">
|
<mapper namespace="com.jsh.erp.datasource.mappers.SerialNumberMapperEx">
|
||||||
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.SerialNumberEx">
|
<resultMap extends="com.jsh.erp.datasource.mappers.SerialNumberMapper.BaseResultMap" id="SerialNumberExBaseResultMap" type="com.jsh.erp.datasource.entities.SerialNumberEx">
|
||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
<result column="material_Id" jdbcType="BIGINT" property="materialId" />
|
|
||||||
<result column="materialName" jdbcType="VARCHAR" property="materialName" />
|
<result column="materialName" jdbcType="VARCHAR" property="materialName" />
|
||||||
<result column="serial_Number" jdbcType="VARCHAR" property="serialNumber" />
|
|
||||||
<result column="is_Sell" jdbcType="BIT" property="isSell" />
|
|
||||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
||||||
<result column="delete_Flag" jdbcType="BIT" property="deleteFlag" />
|
|
||||||
<result column="create_Time" jdbcType="TIMESTAMP" property="createTime" />
|
|
||||||
<result column="update_Time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
||||||
<result column="creator" jdbcType="BIGINT" property="creator" />
|
|
||||||
<result column="updater" jdbcType="BIGINT" property="updater" />
|
|
||||||
<result column="creatorName" jdbcType="VARCHAR" property="creatorName" />
|
<result column="creatorName" jdbcType="VARCHAR" property="creatorName" />
|
||||||
<result column="updaterName" jdbcType="VARCHAR" property="updaterName" />
|
<result column="updaterName" jdbcType="VARCHAR" property="updaterName" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<select id="selectByConditionSerialNumber" resultMap="BaseResultMap">
|
<select id="selectByConditionSerialNumber" resultMap="SerialNumberExBaseResultMap">
|
||||||
select
|
select
|
||||||
ser.id, ser.material_Id, ser.serial_Number, ser.is_Sell, ser.remark, ser.delete_Flag, ser.create_Time,
|
ser.id, ser.material_Id, ser.serial_Number, ser.is_Sell, ser.remark, ser.delete_Flag, ser.create_Time,
|
||||||
ser.update_Time,mat.name as materialName,null as creator,null as updater,null as creatorName, null as updaterName
|
ser.update_Time,mat.name as materialName,null as creator,null as updater,null as creatorName,
|
||||||
|
null as updaterName,ser.depothead_Id
|
||||||
FROM jsh_serial_number ser
|
FROM jsh_serial_number ser
|
||||||
left JOIN jsh_material mat on mat.id = ser.material_Id
|
left JOIN jsh_material mat on mat.id = ser.material_Id
|
||||||
where 1=1
|
where 1=1
|
||||||
@@ -52,11 +44,11 @@
|
|||||||
</if>
|
</if>
|
||||||
order by ser.id desc
|
order by ser.id desc
|
||||||
</select>
|
</select>
|
||||||
<select id="findById" resultMap="BaseResultMap">
|
<select id="findById" resultMap="SerialNumberExBaseResultMap">
|
||||||
SELECT
|
SELECT
|
||||||
ser.id, ser.material_Id, ser.serial_Number, ser.is_Sell, ser.remark, ser.delete_Flag, ser.create_Time,
|
ser.id, ser.material_Id, ser.serial_Number, ser.is_Sell, ser.remark, ser.delete_Flag, ser.create_Time,
|
||||||
ser.update_Time,ser.creator,ser.updater,mat.name as materialName,cr.username as creatorName,
|
ser.update_Time,ser.creator,ser.updater,mat.name as materialName,cr.username as creatorName,
|
||||||
ur.username as updaterName
|
ur.username as updaterName,ser.depothead_Id
|
||||||
FROM jsh_serial_number ser
|
FROM jsh_serial_number ser
|
||||||
left JOIN jsh_material mat on mat.id = ser.material_Id
|
left JOIN jsh_material mat on mat.id = ser.material_Id
|
||||||
left join jsh_user cr on ser.creator=cr.id
|
left join jsh_user cr on ser.creator=cr.id
|
||||||
@@ -65,10 +57,10 @@
|
|||||||
and ser.id=#{id}
|
and ser.id=#{id}
|
||||||
order by ser.id desc
|
order by ser.id desc
|
||||||
</select>
|
</select>
|
||||||
<select id="findBySerialNumber" resultMap="BaseResultMap">
|
<select id="findBySerialNumber" resultMap="SerialNumberExBaseResultMap">
|
||||||
SELECT
|
SELECT
|
||||||
ser.id, ser.material_Id, ser.serial_Number, ser.is_Sell, ser.remark, ser.delete_Flag, ser.create_Time,
|
ser.id, ser.material_Id, ser.serial_Number, ser.is_Sell, ser.remark, ser.delete_Flag, ser.create_Time,
|
||||||
ser.update_Time,ser.creator,ser.updater
|
ser.update_Time,ser.creator,ser.updater,ser.depothead_Id
|
||||||
FROM jsh_serial_number ser
|
FROM jsh_serial_number ser
|
||||||
where 1=1
|
where 1=1
|
||||||
<if test="serialNumber != null">
|
<if test="serialNumber != null">
|
||||||
@@ -80,10 +72,10 @@
|
|||||||
useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||||
insert into jsh_serial_number
|
insert into jsh_serial_number
|
||||||
(material_Id, serial_Number, is_Sell, remark,delete_Flag,
|
(material_Id, serial_Number, is_Sell, remark,delete_Flag,
|
||||||
create_Time, creator,update_Time, updater)
|
create_Time, creator,update_Time, updater,depothead_Id)
|
||||||
values
|
values
|
||||||
(#{materialId},#{serialNumber},#{isSell},#{remark},#{deleteFlag},
|
(#{materialId},#{serialNumber},#{isSell},#{remark},#{deleteFlag},
|
||||||
#{createTime},#{creator},#{updateTime},#{updater}
|
#{createTime},#{creator},#{updateTime},#{updater},#{depotheadId}
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
<update id="updateSerialNumber" parameterType="com.jsh.erp.datasource.entities.SerialNumberEx">
|
<update id="updateSerialNumber" parameterType="com.jsh.erp.datasource.entities.SerialNumberEx">
|
||||||
@@ -96,13 +88,13 @@
|
|||||||
serial_Number = #{serialNumber,jdbcType=VARCHAR},
|
serial_Number = #{serialNumber,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="isSell != null">
|
<if test="isSell != null">
|
||||||
is_Sell = #{isSell,jdbcType=BIT},
|
is_Sell = #{isSell,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="remark != null">
|
<if test="remark != null">
|
||||||
remark = #{remark,jdbcType=VARCHAR},
|
remark = #{remark,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="deleteFlag != null">
|
<if test="deleteFlag != null">
|
||||||
delete_Flag = #{deleteFlag,jdbcType=BIT},
|
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="updateTime != null">
|
<if test="updateTime != null">
|
||||||
update_Time = #{updateTime,jdbcType=TIMESTAMP},
|
update_Time = #{updateTime,jdbcType=TIMESTAMP},
|
||||||
@@ -110,9 +102,13 @@
|
|||||||
<if test="updater != null">
|
<if test="updater != null">
|
||||||
updater = #{updater,jdbcType=BIGINT},
|
updater = #{updater,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="depotheadId != null">
|
||||||
|
depothead_Id = #{depotheadId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=BIGINT}
|
where id = #{id,jdbcType=BIGINT}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="findSerialNumberByMaterialId" resultType="java.lang.Integer">
|
<select id="findSerialNumberByMaterialId" resultType="java.lang.Integer">
|
||||||
SELECT
|
SELECT
|
||||||
count(ser.id)
|
count(ser.id)
|
||||||
@@ -124,5 +120,93 @@
|
|||||||
and ser.delete_Flag !='1'
|
and ser.delete_Flag !='1'
|
||||||
and ser.is_Sell !='1'
|
and ser.is_Sell !='1'
|
||||||
</select>
|
</select>
|
||||||
|
<select id="countSerialNumberByMaterialIdAndDepotheadId" resultType="java.lang.Integer">
|
||||||
|
SELECT
|
||||||
|
count(ser.id)
|
||||||
|
FROM jsh_serial_number ser
|
||||||
|
where 1=1
|
||||||
|
<if test="materialId != null">
|
||||||
|
and ser.material_Id=#{materialId}
|
||||||
|
</if>
|
||||||
|
<if test="depotheadId != null">
|
||||||
|
and ser.depothead_Id=#{depotheadId}
|
||||||
|
</if>
|
||||||
|
and ser.is_Sell =#{isSell,jdbcType=VARCHAR}
|
||||||
|
and ser.delete_Flag !='1'
|
||||||
|
</select>
|
||||||
|
<update id="sellSerialNumber">
|
||||||
|
update jsh_serial_number
|
||||||
|
<set>
|
||||||
|
is_Sell = '1',
|
||||||
|
<if test="depotheadId !=null ">
|
||||||
|
depothead_Id = #{depotheadId},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime !=null ">
|
||||||
|
update_Time = #{updateTime},
|
||||||
|
</if>
|
||||||
|
<if test="updater != null">
|
||||||
|
updater = #{updater},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where 1=1
|
||||||
|
<if test="materialId != null">
|
||||||
|
and material_Id = #{materialId}
|
||||||
|
</if>
|
||||||
|
and is_Sell != '1'
|
||||||
|
<if test="count != null">
|
||||||
|
and id in
|
||||||
|
( select batchSN.id from
|
||||||
|
( select selFrom.id from jsh_serial_number selFrom
|
||||||
|
where 1=1
|
||||||
|
<if test="materialId != null">
|
||||||
|
and selFrom.material_Id = #{materialId}
|
||||||
|
</if>
|
||||||
|
and selFrom.is_Sell != '1'
|
||||||
|
limit 0,#{count}
|
||||||
|
) batchSN
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="cancelSerialNumber">
|
||||||
|
update jsh_serial_number
|
||||||
|
<set>
|
||||||
|
is_Sell = '0',
|
||||||
|
<if test="updateTime !=null ">
|
||||||
|
update_Time = #{updateTime},
|
||||||
|
</if>
|
||||||
|
<if test="updater != null">
|
||||||
|
updater = #{updater},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where 1=1
|
||||||
|
<if test="materialId != null">
|
||||||
|
and material_Id = #{materialId}
|
||||||
|
</if>
|
||||||
|
<if test="depotheadId !=null ">
|
||||||
|
and depothead_Id = #{depotheadId,jdbcType=BIGINT}
|
||||||
|
</if>
|
||||||
|
and is_Sell != '0'
|
||||||
|
<if test="count != null">
|
||||||
|
and id in
|
||||||
|
( select batchSN.id from
|
||||||
|
( select selFrom.id from jsh_serial_number selFrom
|
||||||
|
where 1=1
|
||||||
|
<if test="materialId != null">
|
||||||
|
and selFrom.material_Id = #{materialId}
|
||||||
|
</if>
|
||||||
|
<if test="depotheadId !=null ">
|
||||||
|
and selFrom.depothead_Id = #{depotheadId,jdbcType=BIGINT}
|
||||||
|
</if>
|
||||||
|
and selFrom.is_Sell !='0'
|
||||||
|
limit 0,#{count}
|
||||||
|
) batchSN
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user