从源更新

This commit is contained in:
qiankunpingtai
2019-07-29 10:20:17 +08:00
58 changed files with 1007 additions and 5226 deletions

48
erp_web/css/user_help.css Normal file
View File

@@ -0,0 +1,48 @@
#tt .title {
font-size: 14px;
font-weight: bold;
text-align: center;
color: green;
height: 30px;
}
#tt .content {
font-size: 14px;
text-align: center;
height: 30px;
}
#tt .list {
width: 100%;
margin: 20px 0px 20px 0px;
}
#tt .list .row{
width: 20%;
float: left;
}
#tt .list .row ul{
list-style:none;
float: left;
}
#tt .list .row ul li{
text-align: center;
height: 40px;
}
#tt .list .row ul .module{
font-size: 14px;
color: blue;
cursor:pointer;
}
#tt .list .row ul .module:hover{
text-decoration: underline;
}
#tt .list .row ul .remark{
font-size: 12px;
text-align: left;
}

View File

@@ -7,12 +7,17 @@
var payTypeTitle = "";//收入 支出 var payTypeTitle = "";//收入 支出
var itemType = true; //隐藏当前列 var itemType = true; //隐藏当前列
var moneyType = true; //隐藏当前列 var moneyType = true; //隐藏当前列
$(function() { $(function() {
initSystemData_account(); //获取账户信息 initSystemData_account(); //获取账户信息
initMProperty(); //初始化商品属性 initMProperty(); //初始化商品属性
initOutItemList(); //初始化支出项目 initOutItemList(); //初始化支出项目
initialize();//初始化系统基础信息 initialize();//初始化系统基础信息
}); });
//获取账户信息 //获取账户信息
function initSystemData_account(){ function initSystemData_account(){
$.ajax({ $.ajax({
@@ -95,38 +100,47 @@
if(listSubType == "采购入库") { if(listSubType == "采购入库") {
billType = "material"; billType = "material";
$("#bill .purchase_in").show(); $("#bill .purchase_in").show();
tableString = $(".purchase_in").html();
} }
else if(listSubType == "采购退货出库") { else if(listSubType == "采购退货出库") {
billType = "material"; billType = "material";
$("#bill .purchase_back").show(); $("#bill .purchase_back").show();
tableString = $(".purchase_back").html();
} }
else if(listSubType == "销售出库") { else if(listSubType == "销售出库") {
billType = "material"; billType = "material";
$("#bill .sale_out").show(); $("#bill .sale_out").show();
tableString = $(".sale_out").html();
} }
else if(listSubType == "销售退货入库") { else if(listSubType == "销售退货入库") {
billType = "material"; billType = "material";
$("#bill .sale_back").show(); $("#bill .sale_back").show();
tableString = $(".sale_back").html();
} }
else if(listSubType == "零售出库") { else if(listSubType == "零售出库") {
billType = "material"; billType = "material";
$("#bill .retail_out").show(); $("#bill .retail_out").show();
tableString = $(".retail_out").html();
} }
else if(listSubType == "零售退货入库") { else if(listSubType == "零售退货入库") {
billType = "material"; billType = "material";
$("#bill .retail_back").show(); $("#bill .retail_back").show();
tableString = $(".retail_back").html();
} }
else if(listSubType == "其它入库") { else if(listSubType == "其它入库") {
billType = "material"; billType = "material";
$("#bill .other_in").show(); $("#bill .other_in").show();
tableString = $(".other_in").html();
} }
else if(listSubType == "其它出库") { else if(listSubType == "其它出库") {
billType = "material"; billType = "material";
$("#bill .other_out").show(); $("#bill .other_out").show();
tableString = $(".other_out").html();
} }
else if(listSubType == "调拨出库") { else if(listSubType == "调拨出库") {
billType = "material"; billType = "material";
$("#bill .allocation_out").show(); $("#bill .allocation_out").show();
tableString = $(".allocation_out").html();
} }
else if(listSubType == "收入") { else if(listSubType == "收入") {
billType = "account"; billType = "account";
@@ -134,6 +148,7 @@
itemType = false; //显示当前列 itemType = false; //显示当前列
moneyType = true; //隐藏当前列 moneyType = true; //隐藏当前列
$("#bill .item_in").show(); $("#bill .item_in").show();
tableString = $(".item_in").html();
} }
else if(listSubType == "支出") { else if(listSubType == "支出") {
billType = "account"; billType = "account";
@@ -141,6 +156,7 @@
itemType = false; //显示当前列 itemType = false; //显示当前列
moneyType = true; //隐藏当前列 moneyType = true; //隐藏当前列
$("#bill .item_out").show(); $("#bill .item_out").show();
tableString = $(".item_out").html();
} }
else if(listSubType == "收款") { else if(listSubType == "收款") {
billType = "account"; billType = "account";
@@ -148,6 +164,7 @@
itemType = true; //隐藏当前列 itemType = true; //隐藏当前列
moneyType = false; //显示当前列 moneyType = false; //显示当前列
$("#bill .money_in").show(); $("#bill .money_in").show();
tableString = $(".money_in").html();
} }
else if(listSubType == "付款") { else if(listSubType == "付款") {
billType = "account"; billType = "account";
@@ -155,6 +172,7 @@
itemType = true; //隐藏当前列 itemType = true; //隐藏当前列
moneyType = false; //显示当前列 moneyType = false; //显示当前列
$("#bill .money_out").show(); $("#bill .money_out").show();
tableString = $(".money_out").html();
} }
else if(listSubType == "转账") { else if(listSubType == "转账") {
billType = "account"; billType = "account";
@@ -162,6 +180,7 @@
itemType = true; //隐藏当前列 itemType = true; //隐藏当前列
moneyType = false; //显示当前列 moneyType = false; //显示当前列
$("#bill .giro").show(); $("#bill .giro").show();
tableString = $(".giro").html();
} }
else if(listSubType == "收预付款") { else if(listSubType == "收预付款") {
billType = "account"; billType = "account";
@@ -169,8 +188,12 @@
itemType = true; //隐藏当前列 itemType = true; //隐藏当前列
moneyType = false; //显示当前列 moneyType = false; //显示当前列
$("#bill .advance_in").show(); $("#bill .advance_in").show();
tableString = $(".advance_in").html();
} }
//如果是进货、销售 //如果是进货、销售
if(billType == "material"){ if(billType == "material"){
$.ajax({ $.ajax({
@@ -317,6 +340,57 @@
} }
}); });
} }
//打印table
$("#print_bill_detail").off("click").on("click",function(){
var tableString = "";//打印table
if(listSubType == "采购入库") {
tableString = $(".purchase_in").html();
}
else if(listSubType == "采购退货出库") {
tableString = $(".purchase_back").html();
}
else if(listSubType == "销售出库") {
tableString = $(".sale_out").html();
}
else if(listSubType == "销售退货入库") {
tableString = $(".sale_back").html();
}
else if(listSubType == "零售出库") {
tableString = $(".retail_out").html();
}
else if(listSubType == "零售退货入库") {
tableString = $(".retail_back").html();
}
else if(listSubType == "其它入库") {
tableString = $(".other_in").html();
}
else if(listSubType == "其它出库") {
tableString = $(".other_out").html();
}
else if(listSubType == "调拨出库") {
tableString = $(".allocation_out").html();
}
else if(listSubType == "收入") {
tableString = $(".item_in").html();
}
else if(listSubType == "支出") {
tableString = $(".item_out").html();
}
else if(listSubType == "收款") {
tableString = $(".money_in").html();
}
else if(listSubType == "付款") {
tableString = $(".money_out").html();
}
else if(listSubType == "转账") {
tableString = $(".giro").html();
}
else if(listSubType == "收预付款") {
tableString = $(".advance_in").html();
}
localStorage.setItem("tableString",tableString);
window.open("../../js/print/print_form.html","location:No;status:No;help:No;dialogWidth:800px;dialogHeight:600px;scroll:auto;");
});
} }
//初始化表格数据-商品列表-查看状态 //初始化表格数据-商品列表-查看状态
@@ -459,3 +533,6 @@
}); });
} }
function print(){
alert(listSubType);
}

View File

@@ -132,7 +132,7 @@
</table> </table>
</div> </div>
<div id="dlg-buttons-show"> <div id="dlg-buttons-show">
<a href="javascript:void(0)" id="printDepotHeadShow" class="easyui-linkbutton" iconCls="icon-ok">打印</a> <a href="javascript:void(0)" id="printDepotHeadShow" class="easyui-linkbutton" iconCls="icon-print">打印</a>
<a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel" <a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a> onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a>
</div> </div>

View File

@@ -131,7 +131,7 @@
</table> </table>
</div> </div>
<div id="dlg-buttons-show"> <div id="dlg-buttons-show">
<a href="javascript:void(0)" id="printDepotHeadShow" class="easyui-linkbutton" iconCls="icon-ok">打印</a> <a href="javascript:void(0)" id="printDepotHeadShow" class="easyui-linkbutton" iconCls="icon-print">打印</a>
<a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel" <a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a> onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a>
</div> </div>

View File

@@ -15,6 +15,7 @@
<script src="/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="/js/common/common.js"></script> <script src="/js/common/common.js"></script>
<script src="/js/pages/materials/bill_detail.js"></script> <script src="/js/pages/materials/bill_detail.js"></script>
</head> </head>
<body> <body>
<div id="bill" class="easyui-panel" style="padding:10px;height:500px;" title="单据明细" iconCls="icon-list" <div id="bill" class="easyui-panel" style="padding:10px;height:500px;" title="单据明细" iconCls="icon-list"
@@ -24,7 +25,7 @@
closed="true" modal="true" cache="false" collapsible="false" closable="true"> closed="true" modal="true" cache="false" collapsible="false" closable="true">
<table> <table>
<tr> <tr>
<td style="width:60px;height:50px;">会员卡号:</td> <td style="width:80px;height:50px;">会员卡号:</td>
<td style="padding:5px;width:200px;"> <td style="padding:5px;width:200px;">
<span class="OrganIdShow"></span> <span class="OrganIdShow"></span>
</td> </td>
@@ -93,7 +94,7 @@
closed="true" modal="true" cache="false" collapsible="false" closable="true"> closed="true" modal="true" cache="false" collapsible="false" closable="true">
<table> <table>
<tr> <tr>
<td style="width:60px;height:50px;">会员卡号:</td> <td style="width:80px;height:50px;">会员卡号:</td>
<td style="padding:5px;width:200px;"> <td style="padding:5px;width:200px;">
<span class="OrganIdShow"></span> <span class="OrganIdShow"></span>
</td> </td>
@@ -822,6 +823,10 @@
</tr> </tr>
</table> </table>
</div> </div>
<div id="dlg-buttons-show" style="width:1100px;padding:10px 20px;top:20px">
<a href="javascript:void(0)" id="print_bill_detail" class="easyui-linkbutton" iconCls="icon-print">打印</a>
</div>
</div> </div>
</body> </body>
</html> </html>

View File

@@ -137,7 +137,7 @@
</table> </table>
</div> </div>
<div id="dlg-buttons-show"> <div id="dlg-buttons-show">
<a href="javascript:void(0)" id="printDepotHeadShow" class="easyui-linkbutton" iconCls="icon-ok">打印</a> <a href="javascript:void(0)" id="printDepotHeadShow" class="easyui-linkbutton" iconCls="icon-print">打印</a>
<a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel" <a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a> onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a>
</div> </div>

View File

@@ -79,6 +79,7 @@
<script type="text/javascript"> <script type="text/javascript">
var url; var url;
var clickType = ""; //记录从哪里点击的类别弹窗
//初始化界面 //初始化界面
$(function () { $(function () {
var treeHeight=webH-35; var treeHeight=webH-35;

View File

@@ -46,8 +46,21 @@
function forSelectMaterialCategory(node) { function forSelectMaterialCategory(node) {
console.log(node); console.log(node);
$("#parentName").val(node.text); if(clickType) {
$("#parentid").val(node.id); if(clickType == "selectBtn") {
$("#searchParentName").val(node.text);
$("#searchParentId").val(node.id);
types = "";
initMCData(node.id);
} else if(clickType == "editBtn") {
$("#parentName").val(node.text);
$("#parentid").val(node.id);
}
}
else {
$("#parentName").val(node.text);
$("#parentid").val(node.id);
}
$('#forSelectMaterialCategoryDlg').dialog('close'); $('#forSelectMaterialCategoryDlg').dialog('close');
} }
}); });

View File

@@ -142,7 +142,7 @@
</table> </table>
</div> </div>
<div id="dlg-buttons-show"> <div id="dlg-buttons-show">
<a href="javascript:void(0)" id="printDepotHeadShow" class="easyui-linkbutton" iconCls="icon-ok">打印</a> <a href="javascript:void(0)" id="printDepotHeadShow" class="easyui-linkbutton" iconCls="icon-print">打印</a>
<a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel" <a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a> onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a>
</div> </div>

View File

@@ -136,7 +136,7 @@
</table> </table>
</div> </div>
<div id="dlg-buttons-show"> <div id="dlg-buttons-show">
<a href="javascript:void(0)" id="printDepotHeadShow" class="easyui-linkbutton" iconCls="icon-ok">打印</a> <a href="javascript:void(0)" id="printDepotHeadShow" class="easyui-linkbutton" iconCls="icon-print">打印</a>
<a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel" <a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a> onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a>
</div> </div>

View File

@@ -222,7 +222,7 @@
</table> </table>
</div> </div>
<div id="dlg-buttons-show"> <div id="dlg-buttons-show">
<a href="javascript:void(0)" id="printDepotHeadShow" class="easyui-linkbutton" iconCls="icon-ok">打印</a> <a href="javascript:void(0)" id="printDepotHeadShow" class="easyui-linkbutton" iconCls="icon-print">打印</a>
<a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel" <a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a> onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a>
</div> </div>

View File

@@ -224,7 +224,7 @@
</table> </table>
</div> </div>
<div id="dlg-buttons-show"> <div id="dlg-buttons-show">
<a href="javascript:void(0)" id="printDepotHeadShow" class="easyui-linkbutton" iconCls="icon-ok">打印</a> <a href="javascript:void(0)" id="printDepotHeadShow" class="easyui-linkbutton" iconCls="icon-print">打印</a>
<a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel" <a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a> onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a>
</div> </div>

View File

@@ -143,7 +143,7 @@
</table> </table>
</div> </div>
<div id="dlg-buttons-show"> <div id="dlg-buttons-show">
<a href="javascript:void(0)" id="printDepotHeadShow" class="easyui-linkbutton" iconCls="icon-ok">打印</a> <a href="javascript:void(0)" id="printDepotHeadShow" class="easyui-linkbutton" iconCls="icon-print">打印</a>
<a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel" <a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a> onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a>
</div> </div>

View File

@@ -208,7 +208,7 @@
</table> </table>
</div> </div>
<div id="dlg-buttons-show"> <div id="dlg-buttons-show">
<a href="javascript:void(0)" id="printDepotHeadShow" class="easyui-linkbutton" iconCls="icon-ok">打印</a> <a href="javascript:void(0)" id="printDepotHeadShow" class="easyui-linkbutton" iconCls="icon-print">打印</a>
<a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel" <a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a> onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a>
</div> </div>

View File

@@ -219,7 +219,7 @@
</table> </table>
</div> </div>
<div id="dlg-buttons-show"> <div id="dlg-buttons-show">
<a href="javascript:void(0)" id="printDepotHeadShow" class="easyui-linkbutton" iconCls="icon-ok">打印</a> <a href="javascript:void(0)" id="printDepotHeadShow" class="easyui-linkbutton" iconCls="icon-print">打印</a>
<a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel" <a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a> onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a>
</div> </div>

View File

@@ -216,7 +216,7 @@
</table> </table>
</div> </div>
<div id="dlg-buttons-show"> <div id="dlg-buttons-show">
<a href="javascript:void(0)" id="printDepotHeadShow" class="easyui-linkbutton" iconCls="icon-ok">打印</a> <a href="javascript:void(0)" id="printDepotHeadShow" class="easyui-linkbutton" iconCls="icon-print">打印</a>
<a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel" <a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a> onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a>
</div> </div>

View File

@@ -145,7 +145,7 @@
</table> </table>
</div> </div>
<div id="dlg-buttons-show"> <div id="dlg-buttons-show">
<a href="javascript:void(0)" id="printDepotHeadShow" class="easyui-linkbutton" iconCls="icon-ok">打印</a> <a href="javascript:void(0)" id="printDepotHeadShow" class="easyui-linkbutton" iconCls="icon-print">打印</a>
<a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel" <a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a> onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a>
</div> </div>

View File

@@ -226,7 +226,7 @@
</table> </table>
</div> </div>
<div id="dlg-buttons-show"> <div id="dlg-buttons-show">
<a href="javascript:void(0)" id="printDepotHeadShow" class="easyui-linkbutton" iconCls="icon-ok">打印</a> <a href="javascript:void(0)" id="printDepotHeadShow" class="easyui-linkbutton" iconCls="icon-print">打印</a>
<a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel" <a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a> onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a>
</div> </div>

View File

@@ -34,7 +34,7 @@
&nbsp;&nbsp; &nbsp;&nbsp;
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a>
</td> </td>
<td><span class="tip">注:此处包含零售+批发销售</span></td> <td>当前销售总额:<span class="first-total">0</span>&nbsp;&nbsp;<span class="tip">注:此处包含零售+批发销售</span></td>
</tr> </tr>
</table> </table>
</div> </div>
@@ -110,14 +110,16 @@
pageSize: 10, pageSize: 10,
pageList: [10, 50, 100], pageList: [10, 50, 100],
columns: [[ columns: [[
{title: '名称', field: 'MaterialName', width: 60}, {title: '名称', field: 'MaterialName', width: 60, align: "center"},
{title: '型号', field: 'MaterialModel', width: 80}, {title: '型号', field: 'MaterialModel', width: 80, align: "center"},
{title: '扩展信息', field: 'MaterialOther', width: 150}, {title: '扩展信息', field: 'MaterialOther', width: 150, align: "center"},
{title: '单位', field: 'MaterialUnit', width: 80}, {title: '单位', field: 'MaterialUnit', width: 80, align: "center"},
{title: '销售数量', field: 'OutSum', width: 60}, {title: '销售数量', field: 'OutSum', width: 60, align: "center"},
{title: '销售金额', field: 'OutSumPrice', width: 60}, {title: '销售金额', field: 'OutSumPrice', width: 60, align: "center"},
{title: '退货数量', field: 'InSum', width: 60}, {title: '退货数量', field: 'InSum', width: 60, align: "center"},
{title: '退货金额', field: 'InSumPrice', width: 60} {title: '退货金额', field: 'InSumPrice', width: 60, align: "center"},
{title: '实际销售金额', field: 'OutInSumPrice', width: 80, align: "center"}
]], ]],
onLoadError: function () { onLoadError: function () {
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error'); $.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
@@ -219,6 +221,13 @@
if (res && res.code === 200 && res.data) { if (res && res.code === 200 && res.data) {
$("#tableData").datagrid('loadData', res.data.rows); $("#tableData").datagrid('loadData', res.data.rows);
} }
var total = 0;
res.data.rows.forEach(function(value, index, array){
//执行某些操作
total += value.OutInSumPrice;
})
$(".first-total").text(total); //当前总余额
}, },
//此处添加错误处理 //此处添加错误处理
error: function () { error: function () {
@@ -260,4 +269,4 @@
} }
</script> </script>
</body> </body>
</html> </html>

View File

@@ -0,0 +1,348 @@
<!DOCTYPE html>
<html>
<head>
<title>新手引导</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="/js/easyui-1.3.5/themes/icon.css"/>
<link rel="stylesheet" type="text/css" href="/css/user_help.css" />
<script type="text/javascript" src="/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="/js/common/common.js"></script>
</head>
<body>
<div id="tt" class="easyui-tabs" style="width:997px;height:466px;">
<div class="init" title="初始资料" style="padding:20px;">
<p class="title">初始资料录入</p>
<p class="content">及时准确的录入商品、客户、供应商、仓库信息与结算账户信息,能够有效的保障经营数据的完善以及后期账务的核算。</p>
<hr/>
<div class="list">
<div class="row">
<ul>
<li class="module goods">商品信息</li>
<li class="remark">管理商品信息及商品分类。</li>
</ul>
</div>
<div class="row">
<ul>
<li class="module customer">客户信息</li>
<li class="remark">维护您的客户信息及欠款,新增的客户需要分配给用户才能使用。</li>
</ul>
</div>
<div class="row">
<ul>
<li class="module vendor">供应商信息</li>
<li class="remark">维护您的供应商信息及欠款。</li>
</ul>
</div>
<div class="row">
<ul>
<li class="module depot">仓库信息</li>
<li class="remark">可以设置仓库负责人、设为默认仓库,新增的仓库需要分配给用户才能使用。</li>
</ul>
</div>
<div class="row">
<ul>
<li class="module account">结算账户</li>
<li class="remark">管理账户信息及初始余额。</li>
</ul>
</div>
</div>
</div>
<div class="purchase" title="采购相关" style="padding:20px;">
<p class="title">采购相关</p>
<p class="content">包含采购订单、采购入库、采购退货、进货统计与入库明细等模块</p>
<hr/>
<div class="list">
<div class="row">
<ul>
<li class="module purchase_orders">采购订单</li>
<li class="remark">采购订单不涉及入库仓库和付款金额,采购订单可以转采购入库单,但需要先对采购订单进行审核。</li>
</ul>
</div>
<div class="row">
<ul>
<li class="module purchase_in">采购入库</li>
<li class="remark">采购入库单可以由采购订单转过来,也可以单独创建。采购入库单据中的仓库列表只显示当前用户有权限的仓库。采购入库单可以使用多账户付款。</li>
</ul>
</div>
<div class="row">
<ul>
<li class="module purchase_back">采购退货</li>
<li class="remark">用于采购入库单据的退货。</li>
</ul>
</div>
<div class="row">
<ul>
<li class="module buy_in">进货统计</li>
<li class="remark">以采购入库为统计依据,让我们可以清楚地知道,我们一共进了多少货,多少钱的货。</li>
</ul>
</div>
<div class="row">
<ul>
<li class="module in_detail">入库明细</li>
<li class="remark">入库信息列表,可以查看单条信息。</li>
</ul>
</div>
</div>
</div>
<div class="sale" title="销售相关" style="padding:20px;">
<p class="title">销售相关</p>
<p class="content">包含销售订单、销售入库、销售退货、销售统计与出库明细等模块</p>
<hr/>
<div class="list">
<div class="row">
<ul>
<li class="module sale_orders">销售订单</li>
<li class="remark">销售订单不涉及出库仓库和收款金额,销售订单可以转销售出库单,但需要先对销售订单进行审核。</li>
</ul>
</div>
<div class="row">
<ul>
<li class="module sale_out">销售出库</li>
<li class="remark">销售出库单可以由销售订单转过来,也可以单独创建。销售出库单据中的仓库列表只显示当前用户有权限的仓库。销售出库单可以使用多账户收款。</li>
</ul>
</div>
<div class="row">
<ul>
<li class="module sale_back">销售退货</li>
<li class="remark">用于销售出库单据的退货。</li>
</ul>
</div>
<div class="row">
<ul>
<li class="module sale_out_report">销售统计</li>
<li class="remark">以销售出库为统计依据,让我们可以清楚地知道,我们一共卖了多少货,多少钱的货。</li>
</ul>
</div>
<div class="row">
<ul>
<li class="module out_detail">出库明细</li>
<li class="remark">出库信息列表,可以查看单条信息。</li>
</ul>
</div>
</div>
</div>
<div class="stock" title="仓库管理" style="padding:20px;">
<p class="title">仓库管理</p>
<p class="content">包含其它入库、其它出库、调拨出库、组装单与拆卸单等模块</p>
<hr/>
<div class="list">
<div class="row">
<ul>
<li class="module other_in">其它入库</li>
<li class="remark">用于库存初始化、盘点库存等。</li>
</ul>
</div>
<div class="row">
<ul>
<li class="module other_out">其它出库</li>
<li class="remark">用于盘点库存、给商品报废等。</li>
</ul>
</div>
<div class="row">
<ul>
<li class="module allocation_out">调拨出库</li>
<li class="remark">用于两个仓库之间的商品调拨,调拨单会影响库存。</li>
</ul>
</div>
<div class="row">
<ul>
<li class="module assemble">组装单</li>
<li class="remark">用于将多种商品合并成一个商品,被合并的商品库存减少,合并后的商品库存增加。</li>
</ul>
</div>
<div class="row">
<ul>
<li class="module disassemble">拆卸单</li>
<li class="remark">用于将一个商品拆分成多种商品,被拆分的商品库存增加,拆分后的商品库存减少。</li>
</ul>
</div>
</div>
</div>
<div class="financial" title="财务管理" style="padding:20px;">
<p class="title">财务管理</p>
<p class="content">包含收入单、支出单、收款单、付款单与转账单等模块</p>
<hr/>
<div class="list">
<div class="row">
<ul>
<li class="module item_in">收入单</li>
<li class="remark">收入单主要处理一些销售收入以外的收入如维修服务收入、利息收入、调账收入等。</li>
</ul>
</div>
<div class="row">
<ul>
<li class="module item_out">支出单</li>
<li class="remark">支出单主要处理一些进货支出以外的支出如水电支出、房租支出等。</li>
</ul>
</div>
<div class="row">
<ul>
<li class="module money_in">收款单</li>
<li class="remark">收款单所收金额只对付款单位的应收应付产生影响,可以在回款统计中进行查看。收款单的优惠金额会对利润产生影响,但不影响付款单位的应收应付。优惠金额计入收入类的收款优惠中。</li>
</ul>
</div>
<div class="row">
<ul>
<li class="module money_out">付款单</li>
<li class="remark">付款单的要素和录入原则与“收款单”相同。付款单中优惠金额计入支出类中的付款优惠中,为负值 (因优惠意味着实际少付款)。</li>
</ul>
</div>
<div class="row">
<ul>
<li class="module giro">转账单</li>
<li class="remark">转账:本系统的转账是指从一个银行存款账户转入到另一个银行存款账户。</li>
</ul>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var parentDom = $(window.parent.document);
function showModule(appName, funName) {
parentDom.find("#desk .desktop-container span:contains(" + appName + ")").click();
setTimeout(function () {
var parentIframe = parentDom.find("iframe");
var funDom = parentIframe.contents().find("#tt li a:contains(" + funName + ")");
funDom.click();
},1000);
}
//初始资料
$("#tt .goods").off("click").on("click", function () {
var appName = "基础数据";
var funName = "商品信息";
showModule(appName, funName);
});
$("#tt .customer").off("click").on("click", function () {
var appName = "基础数据";
var funName = "客户信息";
showModule(appName, funName);
});
$("#tt .vendor").off("click").on("click", function () {
var appName = "基础数据";
var funName = "供应商信息";
showModule(appName, funName);
});
$("#tt .depot").off("click").on("click", function () {
var appName = "基础数据";
var funName = "仓库信息";
showModule(appName, funName);
});
$("#tt .account").off("click").on("click", function () {
var appName = "基础数据";
var funName = "结算账户";
showModule(appName, funName);
});
//采购
$("#tt .purchase_orders").off("click").on("click", function () {
var appName = "采购管理";
var funName = "采购订单";
showModule(appName, funName);
});
$("#tt .purchase_in").off("click").on("click", function () {
var appName = "采购管理";
var funName = "采购入库";
showModule(appName, funName);
});
$("#tt .purchase_back").off("click").on("click", function () {
var appName = "采购管理";
var funName = "采购退货";
showModule(appName, funName);
});
$("#tt .buy_in").off("click").on("click", function () {
var appName = "报表查询";
var funName = "进货统计";
showModule(appName, funName);
});
$("#tt .in_detail").off("click").on("click", function () {
var appName = "报表查询";
var funName = "入库明细";
showModule(appName, funName);
});
//销售
$("#tt .sale_orders").off("click").on("click", function () {
var appName = "销售管理";
var funName = "销售订单";
showModule(appName, funName);
});
$("#tt .sale_out").off("click").on("click", function () {
var appName = "销售管理";
var funName = "销售出库";
showModule(appName, funName);
});
$("#tt .sale_back").off("click").on("click", function () {
var appName = "销售管理";
var funName = "销售退货";
showModule(appName, funName);
});
$("#tt .sale_out_report").off("click").on("click", function () {
var appName = "报表查询";
var funName = "销售统计";
showModule(appName, funName);
});
$("#tt .out_detail").off("click").on("click", function () {
var appName = "报表查询";
var funName = "出库明细";
showModule(appName, funName);
});
//库存
$("#tt .other_in").off("click").on("click", function () {
var appName = "仓库管理";
var funName = "其它入库";
showModule(appName, funName);
});
$("#tt .other_out").off("click").on("click", function () {
var appName = "仓库管理";
var funName = "其它出库";
showModule(appName, funName);
});
$("#tt .allocation_out").off("click").on("click", function () {
var appName = "仓库管理";
var funName = "调拨出库";
showModule(appName, funName);
});
$("#tt .assemble").off("click").on("click", function () {
var appName = "仓库管理";
var funName = "组装单";
showModule(appName, funName);
});
$("#tt .disassemble").off("click").on("click", function () {
var appName = "仓库管理";
var funName = "拆卸单";
showModule(appName, funName);
});
//财务
$("#tt .item_in").off("click").on("click", function () {
var appName = "财务管理";
var funName = "收入单";
showModule(appName, funName);
});
$("#tt .item_out").off("click").on("click", function () {
var appName = "财务管理";
var funName = "支出单";
showModule(appName, funName);
});
$("#tt .money_in").off("click").on("click", function () {
var appName = "财务管理";
var funName = "收款单";
showModule(appName, funName);
});
$("#tt .money_out").off("click").on("click", function () {
var appName = "财务管理";
var funName = "付款单";
showModule(appName, funName);
});
$("#tt .giro").off("click").on("click", function () {
var appName = "财务管理";
var funName = "转账单";
showModule(appName, funName);
});
</script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

77
pom.xml
View File

@@ -110,65 +110,50 @@
</dependency> </dependency>
</dependencies> </dependencies>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<build> <build>
<finalName>jshERP2.0</finalName> <finalName>jshERP2.0</finalName>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>maven-assembly-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
<version>2.4</version> <version>2.0.3.RELEASE</version>
<executions> <executions>
<execution> <execution>
<id>make-assembly</id> <id>build-info</id>
<phase>generate-sources</phase>
<goals>
<goal>build-info</goal>
</goals>
</execution>
<execution>
<id>repackage</id>
<phase>package</phase>
<goals>
<goal>repackage</goal>
</goals>
<configuration>
<mainClass>com.jsh.erp.ErpApplication</mainClass>
<layout>JAR</layout>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.5.1</version>
<executions>
<execution>
<id>make-zip</id>
<phase>package</phase> <phase>package</phase>
<goals> <goals>
<goal>single</goal> <goal>single</goal>
</goals> </goals>
<configuration> <configuration>
<appendAssemblyId>false</appendAssemblyId>
<skipAssembly>false</skipAssembly>
<outputDirectory>./bin</outputDirectory>
<descriptors> <descriptors>
<descriptor>src/main/assembly/package.xml</descriptor> <descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors> </descriptors>
<outputDirectory>./dist</outputDirectory>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>

View File

@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8" ?>
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0
http://maven.apache.org/xsd/assembly-1.1.0.xsd
http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 ">
<id>bin</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>true</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>erp_web</directory>
<outputDirectory>/erp_web</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.basedir}/target</directory>
<includes>
<include>*.jar</include>
</includes>
<outputDirectory>/lib</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.basedir}/src/main/resources</directory>
<includes>
<include>*.properties</include>
<include>*.yml</include>
<include>*.yaml</include>
<include>*.xml</include>
</includes>
<outputDirectory>/config</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.basedir}/src/main/bin</directory>
<outputDirectory>/bin</outputDirectory>
<includes>
<include>run-manage.sh</include>
</includes>
<lineEnding>unix</lineEnding>
</fileSet>
<fileSet>
<directory>${project.basedir}/src/main/bin/</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>start.bat</include>
<include>restart.sh</include>
<include>start.sh</include>
<include>stop.sh</include>
<include>status.sh</include>
</includes>
</fileSet>
<fileSet>
<directory>docs</directory>
<outputDirectory>/docs</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.basedir}</directory>
<includes>
<include>*.md</include>
<include>*.txt</include>
</includes>
<outputDirectory>/</outputDirectory>
</fileSet>
</fileSets>
</assembly>

View File

@@ -1,44 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0
http://maven.apache.org/xsd/assembly-1.1.0.xsd
http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 ">
<id>package</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<moduleSets>
<moduleSet>
<includes>
</includes>
</moduleSet>
</moduleSets>
<fileSets>
<fileSet>
<directory>src/main/conf</directory>
<outputDirectory>/</outputDirectory>
</fileSet>
<fileSet>
<directory>erp_web</directory>
<outputDirectory>/erp_web</outputDirectory>
</fileSet>
</fileSets>
<files>
<file>
<source>src/main/resources/application.properties</source>
<outputDirectory>/conf</outputDirectory>
</file>
<file>
<source>src/main/resources/logback-spring.xml</source>
<outputDirectory>/conf</outputDirectory>
</file>
</files>
<dependencySets>
<dependencySet>
<outputDirectory>lib</outputDirectory>
<scope>runtime</scope>
</dependencySet>
</dependencySets>
</assembly>

1
src/main/bin/restart.sh Normal file
View File

@@ -0,0 +1 @@
./bin/run-manage.sh restart

163
src/main/bin/run-manage.sh Normal file
View File

@@ -0,0 +1,163 @@
FILE_PATH=/home/jshERP2.0
SERVER_NAME=jshERP
readonly APP_HOME=${FILE_PATH:-$(dirname $(cd `dirname $0`; pwd))}
#readonly JAVA_HOME=""
readonly CONFIG_HOME="$APP_HOME/config/"
readonly LIB_HOME="$APP_HOME/lib"
readonly LOGS_HOME="$APP_HOME/logs"
readonly PID_FILE="$LOGS_HOME/application.pid"
readonly APP_MAIN_CLASS="jshERP2.0.jar"
readonly LOG_CONFIG="$CONFIG_HOME/logback-spring.xml"
readonly JAVA_RUN="-Dlogs.home=$LOGS_HOME -Dlogging.config=$LOG_CONFIG -Dspring.config.location=file:$CONFIG_HOME -Dspring.pid.file=$PID_FILE -Dspring.pid.fail-on-write-error=true"
readonly JAVA_OPTS="-server -Xms128m -Xmx320m -XX:PermSize=128M -XX:MaxPermSize=256M $JAVA_RUN"
readonly JAVA="java"
PID=0
if [ ! -x "$LOGS_HOME" ]
then
mkdir $LOGS_HOME
fi
chmod +x -R "$JAVA_HOME/bin/"
functions="/etc/functions.sh"
if test -f $functions ; then
. $functions
else
success()
{
echo " SUCCESS! $@"
}
failure()
{
echo " ERROR! $@"
}
warning()
{
echo "WARNING! $@"
}
fi
function install(){
if [[ ! -n $FILE_PATH ]];then
sed -i "s#FILE_PATH=/home/jshERP2.0#FILE_PATH=$APP_HOME#" $APP_HOME/$0
if [[ -e /usr/sbin/$SERVER_NAME || -L /usr/sbin/$SERVER_NAME ]];then
rm -rf /usr/sbin/$SERVER_NAME && ln -s $APP_HOME/$0 /usr/sbin/$SERVER_NAME
fi
fi
}
function checkpid() {
PID=$(ps -ef | grep $APP_MAIN_CLASS | grep -v 'grep' | awk '{print int($2)}')
if [[ -n "$PID" ]]
then
return 0
else
return 1
fi
}
function start() {
checkpid
if [[ $? -eq 0 ]]
then
warning "[$APP_MAIN_CLASS]: already started! (PID=$PID)"
else
echo -n "[$APP_MAIN_CLASS]: Starting ..."
JAVA_CMD="nohup $JAVA $JAVA_OPTS -jar $LIB_HOME/$APP_MAIN_CLASS > /dev/null 2>&1 &"
# echo "Exec cmmand : $JAVA_CMD"
sh -c "$JAVA_CMD"
sleep 3
checkpid
if [[ $? -eq 0 ]]
then
success "(PID=$PID) "
else
failure " "
fi
fi
}
function stop() {
checkpid
if [[ $? -eq 0 ]];
then
echo -n "[$APP_MAIN_CLASS]: Shutting down ...(PID=$PID) "
kill -9 $PID
if [[ $? -eq 0 ]];
then
echo 0 > $PID_FILE
success " "
else
failure " "
fi
else
warning "[$APP_MAIN_CLASS]: is not running ..."
fi
}
function status() {
checkpid
if [[ $? -eq 0 ]]
then
success "[$APP_MAIN_CLASS]: is running! (PID=$PID)"
return 0
else
failure "[$APP_MAIN_CLASS]: is not running"
return 1
fi
}
function info() {
echo "System Information:"
echo
echo "****************************"
echo `head -n 1 /etc/issue`
echo `uname -a`
echo
echo "JAVA_HOME=$JAVA_HOME"
echo
echo "JAVA Environment Information:"
echo `$JAVA -version`
echo
echo "APP_HOME=$APP_HOME"
echo "APP_MAIN_CLASS=$APP_MAIN_CLASS"
echo
echo "****************************"
}
case "$1" in
'start')
start
;;
'stop')
stop
;;
'restart')
stop
start
;;
'status')
status
;;
'info')
info
;;
'install')
install
;;
*)
echo "Usage: $0 {help|start|stop|restart|status|info|install}"
;;
esac
exit 0

6
src/main/bin/start.bat Normal file
View File

@@ -0,0 +1,6 @@
@echo off
title jshERP
java -Xms1000m -Xmx2000m -jar .\lib\jshERP2.0.jar
pause over

1
src/main/bin/start.sh Normal file
View File

@@ -0,0 +1 @@
./bin/run-manage.sh start

1
src/main/bin/status.sh Normal file
View File

@@ -0,0 +1 @@
./bin/run-manage.sh status

1
src/main/bin/stop.sh Normal file
View File

@@ -0,0 +1 @@
./bin/run-manage.sh stop

View File

@@ -1,6 +0,0 @@
@echo off
title jshERP
java -Xms1000m -Xmx2000m -cp .\conf;.\lib\*; -XX:+CreateMinidumpOnCrash com.jsh.erp.ErpApplication
pause over

View File

@@ -1 +0,0 @@
nohup java -XX:+CreateMinidumpOnCrash -cp ./conf:./lib/*: com.jsh.erp.ErpApplication > /dev/null 2>&1 &

View File

@@ -53,19 +53,7 @@ public class AccountHeadController {
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
try { try {
JSONObject outer = new JSONObject(); JSONObject outer = new JSONObject();
BigDecimal sum = BigDecimal.ZERO; BigDecimal sum = accountHeadService.findTotalPay(supplierId, endTime, supType);
String getS = supplierId.toString();
int i = 1;
if (supType.equals("customer")) { //客户
i = 1;
} else if (supType.equals("vendor")) { //供应商
i = -1;
}
//收付款部分
sum = sum.add((allMoney(getS, "付款", "合计",endTime).add(allMoney(getS, "付款", "实际",endTime))).multiply(new BigDecimal(i)));
sum = sum.subtract((allMoney(getS, "收款", "合计",endTime).add(allMoney(getS, "收款", "实际",endTime))).multiply(new BigDecimal(i)));
sum = sum.add((allMoney(getS, "收入", "合计",endTime).subtract(allMoney(getS, "收入", "实际",endTime))).multiply(new BigDecimal(i)));
sum = sum.subtract((allMoney(getS, "支出", "合计",endTime).subtract(allMoney(getS, "支出", "实际",endTime))).multiply(new BigDecimal(i)));
outer.put("getAllMoney", sum); outer.put("getAllMoney", sum);
map.put("rows", outer); map.put("rows", outer);
res.code = 200; res.code = 200;
@@ -104,31 +92,6 @@ public class AccountHeadController {
return res; return res;
} }
/**
* 统计总金额
* @param getS
* @param type
* @param mode 合计或者金额
* @param endTime
* @return
*/
public BigDecimal allMoney(String getS, String type, String mode, String endTime)throws Exception {
BigDecimal allMoney = BigDecimal.ZERO;
try {
Integer supplierId = Integer.valueOf(getS);
BigDecimal sum = accountHeadService.findAllMoney(supplierId, type, mode, endTime);
if(sum != null) {
allMoney = sum;
}
} catch (Exception e) {
e.printStackTrace();
}
//返回正数,如果负数也转为正数
if ((allMoney.compareTo(BigDecimal.ZERO))==-1) {
allMoney = allMoney.abs();
}
return allMoney;
}
/** /**
* create by: qiankunpingtai * create by: qiankunpingtai
* websitehttps://qiankunpingtai.cn * websitehttps://qiankunpingtai.cn

View File

@@ -322,19 +322,7 @@ public class DepotHeadController {
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
try { try {
JSONObject outer = new JSONObject(); JSONObject outer = new JSONObject();
BigDecimal sum = BigDecimal.ZERO; BigDecimal sum = depotHeadService.findTotalPay(supplierId, endTime, supType);
String getS = supplierId.toString();
int i = 1;
if (supType.equals("customer")) { //客户
i = 1;
} else if (supType.equals("vendor")) { //供应商
i = -1;
}
//进销部分
sum = sum.subtract((allMoney(getS, "入库", "采购", "合计",endTime).subtract(allMoney(getS, "入库", "采购", "实际",endTime))).multiply(new BigDecimal(i)));
sum = sum.subtract((allMoney(getS, "入库", "销售退货", "合计",endTime).subtract(allMoney(getS, "入库", "销售退货", "实际",endTime))).multiply(new BigDecimal(i)));
sum = sum.add((allMoney(getS, "出库", "销售", "合计",endTime).subtract(allMoney(getS, "出库", "销售", "实际",endTime))).multiply(new BigDecimal(i)));
sum = sum.add((allMoney(getS, "出库", "采购退货", "合计",endTime).subtract(allMoney(getS, "出库", "采购退货", "实际",endTime))).multiply(new BigDecimal(i)));
outer.put("getAllMoney", sum); outer.put("getAllMoney", sum);
map.put("rows", outer); map.put("rows", outer);
res.code = 200; res.code = 200;
@@ -373,32 +361,6 @@ public class DepotHeadController {
return res; return res;
} }
/**
* 统计总金额
* @param getS
* @param type
* @param subType
* @param mode 合计或者金额
* @return
*/
public BigDecimal allMoney(String getS, String type, String subType, String mode, String endTime)throws Exception {
BigDecimal allMoney = BigDecimal.ZERO;
try {
Integer supplierId = Integer.valueOf(getS);
BigDecimal sum = depotHeadService.findAllMoney(supplierId, type, subType, mode, endTime);
if(sum != null) {
allMoney = sum;
}
} catch (Exception e) {
e.printStackTrace();
}
//返回正数,如果负数也转为正数
if ((allMoney.compareTo(BigDecimal.ZERO))==-1) {
allMoney = allMoney.abs();
}
return allMoney;
}
/** /**
* create by: cjl * create by: cjl
* description: * description:

View File

@@ -192,7 +192,6 @@ public class MaterialController {
* 生成excel表格 * 生成excel表格
* @param name * @param name
* @param model * @param model
* @param categoryId
* @param categoryIds * @param categoryIds
* @param request * @param request
* @param response * @param response
@@ -201,14 +200,13 @@ public class MaterialController {
@GetMapping(value = "/exportExcel") @GetMapping(value = "/exportExcel")
public void exportExcel(@RequestParam("name") String name, public void exportExcel(@RequestParam("name") String name,
@RequestParam("model") String model, @RequestParam("model") String model,
@RequestParam("categoryId") Long categoryId,
@RequestParam("categoryIds") String categoryIds, @RequestParam("categoryIds") String categoryIds,
HttpServletRequest request, HttpServletResponse response)throws Exception { HttpServletRequest request, HttpServletResponse response)throws Exception {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
String message = "成功"; String message = "成功";
try { try {
List<MaterialVo4Unit> dataList = materialService.findByAll(name, model, categoryId, categoryIds); List<MaterialVo4Unit> dataList = materialService.findByAll(name, model, categoryIds);
String[] names = {"品名", "类型", "型号", "安全存量", "单位", "零售价", "最低售价", "预计采购价", "批发价", "备注", "状态"}; String[] names = {"品名", "类型", "型号", "安全存量", "单位", "零售价", "最低售价", "预计采购价", "批发价", "备注", "状态"};
String title = "商品信息"; String title = "商品信息";
List<String[]> objects = new ArrayList<String[]>(); List<String[]> objects = new ArrayList<String[]>();

View File

@@ -1,678 +0,0 @@
package com.jsh.erp.datasource.entities;
import java.math.BigDecimal;
import java.util.Date;
public class Asset {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_asset.id
*
* @mbggenerated
*/
private Long id;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_asset.assetnameID
*
* @mbggenerated
*/
private Long assetnameid;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_asset.location
*
* @mbggenerated
*/
private String location;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_asset.labels
*
* @mbggenerated
*/
private String labels;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_asset.status
*
* @mbggenerated
*/
private Short status;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_asset.userID
*
* @mbggenerated
*/
private Long userid;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_asset.price
*
* @mbggenerated
*/
private BigDecimal price;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_asset.purchasedate
*
* @mbggenerated
*/
private Date purchasedate;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_asset.periodofvalidity
*
* @mbggenerated
*/
private Date periodofvalidity;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_asset.warrantydate
*
* @mbggenerated
*/
private Date warrantydate;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_asset.assetnum
*
* @mbggenerated
*/
private String assetnum;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_asset.serialnum
*
* @mbggenerated
*/
private String serialnum;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_asset.supplier
*
* @mbggenerated
*/
private Long supplier;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_asset.createtime
*
* @mbggenerated
*/
private Date createtime;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_asset.creator
*
* @mbggenerated
*/
private Long creator;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_asset.updatetime
*
* @mbggenerated
*/
private Date updatetime;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_asset.updator
*
* @mbggenerated
*/
private Long updator;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_asset.tenant_id
*
* @mbggenerated
*/
private Long tenantId;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_asset.delete_Flag
*
* @mbggenerated
*/
private String deleteFlag;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_asset.description
*
* @mbggenerated
*/
private String description;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_asset.addMonth
*
* @mbggenerated
*/
private String addmonth;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_asset.id
*
* @return the value of jsh_asset.id
*
* @mbggenerated
*/
public Long getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_asset.id
*
* @param id the value for jsh_asset.id
*
* @mbggenerated
*/
public void setId(Long id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_asset.assetnameID
*
* @return the value of jsh_asset.assetnameID
*
* @mbggenerated
*/
public Long getAssetnameid() {
return assetnameid;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_asset.assetnameID
*
* @param assetnameid the value for jsh_asset.assetnameID
*
* @mbggenerated
*/
public void setAssetnameid(Long assetnameid) {
this.assetnameid = assetnameid;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_asset.location
*
* @return the value of jsh_asset.location
*
* @mbggenerated
*/
public String getLocation() {
return location;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_asset.location
*
* @param location the value for jsh_asset.location
*
* @mbggenerated
*/
public void setLocation(String location) {
this.location = location == null ? null : location.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_asset.labels
*
* @return the value of jsh_asset.labels
*
* @mbggenerated
*/
public String getLabels() {
return labels;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_asset.labels
*
* @param labels the value for jsh_asset.labels
*
* @mbggenerated
*/
public void setLabels(String labels) {
this.labels = labels == null ? null : labels.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_asset.status
*
* @return the value of jsh_asset.status
*
* @mbggenerated
*/
public Short getStatus() {
return status;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_asset.status
*
* @param status the value for jsh_asset.status
*
* @mbggenerated
*/
public void setStatus(Short status) {
this.status = status;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_asset.userID
*
* @return the value of jsh_asset.userID
*
* @mbggenerated
*/
public Long getUserid() {
return userid;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_asset.userID
*
* @param userid the value for jsh_asset.userID
*
* @mbggenerated
*/
public void setUserid(Long userid) {
this.userid = userid;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_asset.price
*
* @return the value of jsh_asset.price
*
* @mbggenerated
*/
public BigDecimal getPrice() {
return price;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_asset.price
*
* @param price the value for jsh_asset.price
*
* @mbggenerated
*/
public void setPrice(BigDecimal price) {
this.price = price;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_asset.purchasedate
*
* @return the value of jsh_asset.purchasedate
*
* @mbggenerated
*/
public Date getPurchasedate() {
return purchasedate;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_asset.purchasedate
*
* @param purchasedate the value for jsh_asset.purchasedate
*
* @mbggenerated
*/
public void setPurchasedate(Date purchasedate) {
this.purchasedate = purchasedate;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_asset.periodofvalidity
*
* @return the value of jsh_asset.periodofvalidity
*
* @mbggenerated
*/
public Date getPeriodofvalidity() {
return periodofvalidity;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_asset.periodofvalidity
*
* @param periodofvalidity the value for jsh_asset.periodofvalidity
*
* @mbggenerated
*/
public void setPeriodofvalidity(Date periodofvalidity) {
this.periodofvalidity = periodofvalidity;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_asset.warrantydate
*
* @return the value of jsh_asset.warrantydate
*
* @mbggenerated
*/
public Date getWarrantydate() {
return warrantydate;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_asset.warrantydate
*
* @param warrantydate the value for jsh_asset.warrantydate
*
* @mbggenerated
*/
public void setWarrantydate(Date warrantydate) {
this.warrantydate = warrantydate;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_asset.assetnum
*
* @return the value of jsh_asset.assetnum
*
* @mbggenerated
*/
public String getAssetnum() {
return assetnum;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_asset.assetnum
*
* @param assetnum the value for jsh_asset.assetnum
*
* @mbggenerated
*/
public void setAssetnum(String assetnum) {
this.assetnum = assetnum == null ? null : assetnum.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_asset.serialnum
*
* @return the value of jsh_asset.serialnum
*
* @mbggenerated
*/
public String getSerialnum() {
return serialnum;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_asset.serialnum
*
* @param serialnum the value for jsh_asset.serialnum
*
* @mbggenerated
*/
public void setSerialnum(String serialnum) {
this.serialnum = serialnum == null ? null : serialnum.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_asset.supplier
*
* @return the value of jsh_asset.supplier
*
* @mbggenerated
*/
public Long getSupplier() {
return supplier;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_asset.supplier
*
* @param supplier the value for jsh_asset.supplier
*
* @mbggenerated
*/
public void setSupplier(Long supplier) {
this.supplier = supplier;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_asset.createtime
*
* @return the value of jsh_asset.createtime
*
* @mbggenerated
*/
public Date getCreatetime() {
return createtime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_asset.createtime
*
* @param createtime the value for jsh_asset.createtime
*
* @mbggenerated
*/
public void setCreatetime(Date createtime) {
this.createtime = createtime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_asset.creator
*
* @return the value of jsh_asset.creator
*
* @mbggenerated
*/
public Long getCreator() {
return creator;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_asset.creator
*
* @param creator the value for jsh_asset.creator
*
* @mbggenerated
*/
public void setCreator(Long creator) {
this.creator = creator;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_asset.updatetime
*
* @return the value of jsh_asset.updatetime
*
* @mbggenerated
*/
public Date getUpdatetime() {
return updatetime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_asset.updatetime
*
* @param updatetime the value for jsh_asset.updatetime
*
* @mbggenerated
*/
public void setUpdatetime(Date updatetime) {
this.updatetime = updatetime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_asset.updator
*
* @return the value of jsh_asset.updator
*
* @mbggenerated
*/
public Long getUpdator() {
return updator;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_asset.updator
*
* @param updator the value for jsh_asset.updator
*
* @mbggenerated
*/
public void setUpdator(Long updator) {
this.updator = updator;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_asset.tenant_id
*
* @return the value of jsh_asset.tenant_id
*
* @mbggenerated
*/
public Long getTenantId() {
return tenantId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_asset.tenant_id
*
* @param tenantId the value for jsh_asset.tenant_id
*
* @mbggenerated
*/
public void setTenantId(Long tenantId) {
this.tenantId = tenantId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_asset.delete_Flag
*
* @return the value of jsh_asset.delete_Flag
*
* @mbggenerated
*/
public String getDeleteFlag() {
return deleteFlag;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_asset.delete_Flag
*
* @param deleteFlag the value for jsh_asset.delete_Flag
*
* @mbggenerated
*/
public void setDeleteFlag(String deleteFlag) {
this.deleteFlag = deleteFlag == null ? null : deleteFlag.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_asset.description
*
* @return the value of jsh_asset.description
*
* @mbggenerated
*/
public String getDescription() {
return description;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_asset.description
*
* @param description the value for jsh_asset.description
*
* @mbggenerated
*/
public void setDescription(String description) {
this.description = description == null ? null : description.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_asset.addMonth
*
* @return the value of jsh_asset.addMonth
*
* @mbggenerated
*/
public String getAddmonth() {
return addmonth;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_asset.addMonth
*
* @param addmonth the value for jsh_asset.addMonth
*
* @mbggenerated
*/
public void setAddmonth(String addmonth) {
this.addmonth = addmonth == null ? null : addmonth.trim();
}
}

View File

@@ -1,195 +0,0 @@
package com.jsh.erp.datasource.entities;
public class AssetCategory {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_assetcategory.id
*
* @mbggenerated
*/
private Long id;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_assetcategory.assetname
*
* @mbggenerated
*/
private String assetname;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_assetcategory.isystem
*
* @mbggenerated
*/
private Byte isystem;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_assetcategory.description
*
* @mbggenerated
*/
private String description;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_assetcategory.tenant_id
*
* @mbggenerated
*/
private Long tenantId;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_assetcategory.delete_Flag
*
* @mbggenerated
*/
private String deleteFlag;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_assetcategory.id
*
* @return the value of jsh_assetcategory.id
*
* @mbggenerated
*/
public Long getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_assetcategory.id
*
* @param id the value for jsh_assetcategory.id
*
* @mbggenerated
*/
public void setId(Long id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_assetcategory.assetname
*
* @return the value of jsh_assetcategory.assetname
*
* @mbggenerated
*/
public String getAssetname() {
return assetname;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_assetcategory.assetname
*
* @param assetname the value for jsh_assetcategory.assetname
*
* @mbggenerated
*/
public void setAssetname(String assetname) {
this.assetname = assetname == null ? null : assetname.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_assetcategory.isystem
*
* @return the value of jsh_assetcategory.isystem
*
* @mbggenerated
*/
public Byte getIsystem() {
return isystem;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_assetcategory.isystem
*
* @param isystem the value for jsh_assetcategory.isystem
*
* @mbggenerated
*/
public void setIsystem(Byte isystem) {
this.isystem = isystem;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_assetcategory.description
*
* @return the value of jsh_assetcategory.description
*
* @mbggenerated
*/
public String getDescription() {
return description;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_assetcategory.description
*
* @param description the value for jsh_assetcategory.description
*
* @mbggenerated
*/
public void setDescription(String description) {
this.description = description == null ? null : description.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_assetcategory.tenant_id
*
* @return the value of jsh_assetcategory.tenant_id
*
* @mbggenerated
*/
public Long getTenantId() {
return tenantId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_assetcategory.tenant_id
*
* @param tenantId the value for jsh_assetcategory.tenant_id
*
* @mbggenerated
*/
public void setTenantId(Long tenantId) {
this.tenantId = tenantId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_assetcategory.delete_Flag
*
* @return the value of jsh_assetcategory.delete_Flag
*
* @mbggenerated
*/
public String getDeleteFlag() {
return deleteFlag;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_assetcategory.delete_Flag
*
* @param deleteFlag the value for jsh_assetcategory.delete_Flag
*
* @mbggenerated
*/
public void setDeleteFlag(String deleteFlag) {
this.deleteFlag = deleteFlag == null ? null : deleteFlag.trim();
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,259 +0,0 @@
package com.jsh.erp.datasource.entities;
public class AssetName {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_assetname.id
*
* @mbggenerated
*/
private Long id;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_assetname.assetname
*
* @mbggenerated
*/
private String assetname;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_assetname.assetcategoryID
*
* @mbggenerated
*/
private Long assetcategoryid;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_assetname.isystem
*
* @mbggenerated
*/
private Short isystem;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_assetname.isconsumables
*
* @mbggenerated
*/
private Short isconsumables;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_assetname.tenant_id
*
* @mbggenerated
*/
private Long tenantId;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_assetname.delete_Flag
*
* @mbggenerated
*/
private String deleteFlag;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_assetname.description
*
* @mbggenerated
*/
private String description;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_assetname.id
*
* @return the value of jsh_assetname.id
*
* @mbggenerated
*/
public Long getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_assetname.id
*
* @param id the value for jsh_assetname.id
*
* @mbggenerated
*/
public void setId(Long id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_assetname.assetname
*
* @return the value of jsh_assetname.assetname
*
* @mbggenerated
*/
public String getAssetname() {
return assetname;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_assetname.assetname
*
* @param assetname the value for jsh_assetname.assetname
*
* @mbggenerated
*/
public void setAssetname(String assetname) {
this.assetname = assetname == null ? null : assetname.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_assetname.assetcategoryID
*
* @return the value of jsh_assetname.assetcategoryID
*
* @mbggenerated
*/
public Long getAssetcategoryid() {
return assetcategoryid;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_assetname.assetcategoryID
*
* @param assetcategoryid the value for jsh_assetname.assetcategoryID
*
* @mbggenerated
*/
public void setAssetcategoryid(Long assetcategoryid) {
this.assetcategoryid = assetcategoryid;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_assetname.isystem
*
* @return the value of jsh_assetname.isystem
*
* @mbggenerated
*/
public Short getIsystem() {
return isystem;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_assetname.isystem
*
* @param isystem the value for jsh_assetname.isystem
*
* @mbggenerated
*/
public void setIsystem(Short isystem) {
this.isystem = isystem;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_assetname.isconsumables
*
* @return the value of jsh_assetname.isconsumables
*
* @mbggenerated
*/
public Short getIsconsumables() {
return isconsumables;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_assetname.isconsumables
*
* @param isconsumables the value for jsh_assetname.isconsumables
*
* @mbggenerated
*/
public void setIsconsumables(Short isconsumables) {
this.isconsumables = isconsumables;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_assetname.tenant_id
*
* @return the value of jsh_assetname.tenant_id
*
* @mbggenerated
*/
public Long getTenantId() {
return tenantId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_assetname.tenant_id
*
* @param tenantId the value for jsh_assetname.tenant_id
*
* @mbggenerated
*/
public void setTenantId(Long tenantId) {
this.tenantId = tenantId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_assetname.delete_Flag
*
* @return the value of jsh_assetname.delete_Flag
*
* @mbggenerated
*/
public String getDeleteFlag() {
return deleteFlag;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_assetname.delete_Flag
*
* @param deleteFlag the value for jsh_assetname.delete_Flag
*
* @mbggenerated
*/
public void setDeleteFlag(String deleteFlag) {
this.deleteFlag = deleteFlag == null ? null : deleteFlag.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_assetname.description
*
* @return the value of jsh_assetname.description
*
* @mbggenerated
*/
public String getDescription() {
return description;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_assetname.description
*
* @param description the value for jsh_assetname.description
*
* @mbggenerated
*/
public void setDescription(String description) {
this.description = description == null ? null : description.trim();
}
}

View File

@@ -1,742 +0,0 @@
package com.jsh.erp.datasource.entities;
import java.util.ArrayList;
import java.util.List;
public class AssetNameExample {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
protected String orderByClause;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
protected boolean distinct;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
protected List<Criteria> oredCriteria;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
public AssetNameExample() {
oredCriteria = new ArrayList<Criteria>();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
public String getOrderByClause() {
return orderByClause;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
public boolean isDistinct() {
return distinct;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andAssetnameIsNull() {
addCriterion("assetname is null");
return (Criteria) this;
}
public Criteria andAssetnameIsNotNull() {
addCriterion("assetname is not null");
return (Criteria) this;
}
public Criteria andAssetnameEqualTo(String value) {
addCriterion("assetname =", value, "assetname");
return (Criteria) this;
}
public Criteria andAssetnameNotEqualTo(String value) {
addCriterion("assetname <>", value, "assetname");
return (Criteria) this;
}
public Criteria andAssetnameGreaterThan(String value) {
addCriterion("assetname >", value, "assetname");
return (Criteria) this;
}
public Criteria andAssetnameGreaterThanOrEqualTo(String value) {
addCriterion("assetname >=", value, "assetname");
return (Criteria) this;
}
public Criteria andAssetnameLessThan(String value) {
addCriterion("assetname <", value, "assetname");
return (Criteria) this;
}
public Criteria andAssetnameLessThanOrEqualTo(String value) {
addCriterion("assetname <=", value, "assetname");
return (Criteria) this;
}
public Criteria andAssetnameLike(String value) {
addCriterion("assetname like", value, "assetname");
return (Criteria) this;
}
public Criteria andAssetnameNotLike(String value) {
addCriterion("assetname not like", value, "assetname");
return (Criteria) this;
}
public Criteria andAssetnameIn(List<String> values) {
addCriterion("assetname in", values, "assetname");
return (Criteria) this;
}
public Criteria andAssetnameNotIn(List<String> values) {
addCriterion("assetname not in", values, "assetname");
return (Criteria) this;
}
public Criteria andAssetnameBetween(String value1, String value2) {
addCriterion("assetname between", value1, value2, "assetname");
return (Criteria) this;
}
public Criteria andAssetnameNotBetween(String value1, String value2) {
addCriterion("assetname not between", value1, value2, "assetname");
return (Criteria) this;
}
public Criteria andAssetcategoryidIsNull() {
addCriterion("assetcategoryID is null");
return (Criteria) this;
}
public Criteria andAssetcategoryidIsNotNull() {
addCriterion("assetcategoryID is not null");
return (Criteria) this;
}
public Criteria andAssetcategoryidEqualTo(Long value) {
addCriterion("assetcategoryID =", value, "assetcategoryid");
return (Criteria) this;
}
public Criteria andAssetcategoryidNotEqualTo(Long value) {
addCriterion("assetcategoryID <>", value, "assetcategoryid");
return (Criteria) this;
}
public Criteria andAssetcategoryidGreaterThan(Long value) {
addCriterion("assetcategoryID >", value, "assetcategoryid");
return (Criteria) this;
}
public Criteria andAssetcategoryidGreaterThanOrEqualTo(Long value) {
addCriterion("assetcategoryID >=", value, "assetcategoryid");
return (Criteria) this;
}
public Criteria andAssetcategoryidLessThan(Long value) {
addCriterion("assetcategoryID <", value, "assetcategoryid");
return (Criteria) this;
}
public Criteria andAssetcategoryidLessThanOrEqualTo(Long value) {
addCriterion("assetcategoryID <=", value, "assetcategoryid");
return (Criteria) this;
}
public Criteria andAssetcategoryidIn(List<Long> values) {
addCriterion("assetcategoryID in", values, "assetcategoryid");
return (Criteria) this;
}
public Criteria andAssetcategoryidNotIn(List<Long> values) {
addCriterion("assetcategoryID not in", values, "assetcategoryid");
return (Criteria) this;
}
public Criteria andAssetcategoryidBetween(Long value1, Long value2) {
addCriterion("assetcategoryID between", value1, value2, "assetcategoryid");
return (Criteria) this;
}
public Criteria andAssetcategoryidNotBetween(Long value1, Long value2) {
addCriterion("assetcategoryID not between", value1, value2, "assetcategoryid");
return (Criteria) this;
}
public Criteria andIsystemIsNull() {
addCriterion("isystem is null");
return (Criteria) this;
}
public Criteria andIsystemIsNotNull() {
addCriterion("isystem is not null");
return (Criteria) this;
}
public Criteria andIsystemEqualTo(Short value) {
addCriterion("isystem =", value, "isystem");
return (Criteria) this;
}
public Criteria andIsystemNotEqualTo(Short value) {
addCriterion("isystem <>", value, "isystem");
return (Criteria) this;
}
public Criteria andIsystemGreaterThan(Short value) {
addCriterion("isystem >", value, "isystem");
return (Criteria) this;
}
public Criteria andIsystemGreaterThanOrEqualTo(Short value) {
addCriterion("isystem >=", value, "isystem");
return (Criteria) this;
}
public Criteria andIsystemLessThan(Short value) {
addCriterion("isystem <", value, "isystem");
return (Criteria) this;
}
public Criteria andIsystemLessThanOrEqualTo(Short value) {
addCriterion("isystem <=", value, "isystem");
return (Criteria) this;
}
public Criteria andIsystemIn(List<Short> values) {
addCriterion("isystem in", values, "isystem");
return (Criteria) this;
}
public Criteria andIsystemNotIn(List<Short> values) {
addCriterion("isystem not in", values, "isystem");
return (Criteria) this;
}
public Criteria andIsystemBetween(Short value1, Short value2) {
addCriterion("isystem between", value1, value2, "isystem");
return (Criteria) this;
}
public Criteria andIsystemNotBetween(Short value1, Short value2) {
addCriterion("isystem not between", value1, value2, "isystem");
return (Criteria) this;
}
public Criteria andIsconsumablesIsNull() {
addCriterion("isconsumables is null");
return (Criteria) this;
}
public Criteria andIsconsumablesIsNotNull() {
addCriterion("isconsumables is not null");
return (Criteria) this;
}
public Criteria andIsconsumablesEqualTo(Short value) {
addCriterion("isconsumables =", value, "isconsumables");
return (Criteria) this;
}
public Criteria andIsconsumablesNotEqualTo(Short value) {
addCriterion("isconsumables <>", value, "isconsumables");
return (Criteria) this;
}
public Criteria andIsconsumablesGreaterThan(Short value) {
addCriterion("isconsumables >", value, "isconsumables");
return (Criteria) this;
}
public Criteria andIsconsumablesGreaterThanOrEqualTo(Short value) {
addCriterion("isconsumables >=", value, "isconsumables");
return (Criteria) this;
}
public Criteria andIsconsumablesLessThan(Short value) {
addCriterion("isconsumables <", value, "isconsumables");
return (Criteria) this;
}
public Criteria andIsconsumablesLessThanOrEqualTo(Short value) {
addCriterion("isconsumables <=", value, "isconsumables");
return (Criteria) this;
}
public Criteria andIsconsumablesIn(List<Short> values) {
addCriterion("isconsumables in", values, "isconsumables");
return (Criteria) this;
}
public Criteria andIsconsumablesNotIn(List<Short> values) {
addCriterion("isconsumables not in", values, "isconsumables");
return (Criteria) this;
}
public Criteria andIsconsumablesBetween(Short value1, Short value2) {
addCriterion("isconsumables between", value1, value2, "isconsumables");
return (Criteria) this;
}
public Criteria andIsconsumablesNotBetween(Short value1, Short value2) {
addCriterion("isconsumables not between", value1, value2, "isconsumables");
return (Criteria) this;
}
public Criteria andTenantIdIsNull() {
addCriterion("tenant_id is null");
return (Criteria) this;
}
public Criteria andTenantIdIsNotNull() {
addCriterion("tenant_id is not null");
return (Criteria) this;
}
public Criteria andTenantIdEqualTo(Long value) {
addCriterion("tenant_id =", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotEqualTo(Long value) {
addCriterion("tenant_id <>", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdGreaterThan(Long value) {
addCriterion("tenant_id >", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdGreaterThanOrEqualTo(Long value) {
addCriterion("tenant_id >=", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdLessThan(Long value) {
addCriterion("tenant_id <", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdLessThanOrEqualTo(Long value) {
addCriterion("tenant_id <=", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdIn(List<Long> values) {
addCriterion("tenant_id in", values, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotIn(List<Long> values) {
addCriterion("tenant_id not in", values, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdBetween(Long value1, Long value2) {
addCriterion("tenant_id between", value1, value2, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotBetween(Long value1, Long value2) {
addCriterion("tenant_id not between", value1, value2, "tenantId");
return (Criteria) this;
}
public Criteria andDeleteFlagIsNull() {
addCriterion("delete_Flag is null");
return (Criteria) this;
}
public Criteria andDeleteFlagIsNotNull() {
addCriterion("delete_Flag is not null");
return (Criteria) this;
}
public Criteria andDeleteFlagEqualTo(String value) {
addCriterion("delete_Flag =", value, "deleteFlag");
return (Criteria) this;
}
public Criteria andDeleteFlagNotEqualTo(String value) {
addCriterion("delete_Flag <>", value, "deleteFlag");
return (Criteria) this;
}
public Criteria andDeleteFlagGreaterThan(String value) {
addCriterion("delete_Flag >", value, "deleteFlag");
return (Criteria) this;
}
public Criteria andDeleteFlagGreaterThanOrEqualTo(String value) {
addCriterion("delete_Flag >=", value, "deleteFlag");
return (Criteria) this;
}
public Criteria andDeleteFlagLessThan(String value) {
addCriterion("delete_Flag <", value, "deleteFlag");
return (Criteria) this;
}
public Criteria andDeleteFlagLessThanOrEqualTo(String value) {
addCriterion("delete_Flag <=", value, "deleteFlag");
return (Criteria) this;
}
public Criteria andDeleteFlagLike(String value) {
addCriterion("delete_Flag like", value, "deleteFlag");
return (Criteria) this;
}
public Criteria andDeleteFlagNotLike(String value) {
addCriterion("delete_Flag not like", value, "deleteFlag");
return (Criteria) this;
}
public Criteria andDeleteFlagIn(List<String> values) {
addCriterion("delete_Flag in", values, "deleteFlag");
return (Criteria) this;
}
public Criteria andDeleteFlagNotIn(List<String> values) {
addCriterion("delete_Flag not in", values, "deleteFlag");
return (Criteria) this;
}
public Criteria andDeleteFlagBetween(String value1, String value2) {
addCriterion("delete_Flag between", value1, value2, "deleteFlag");
return (Criteria) this;
}
public Criteria andDeleteFlagNotBetween(String value1, String value2) {
addCriterion("delete_Flag not between", value1, value2, "deleteFlag");
return (Criteria) this;
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table jsh_assetname
*
* @mbggenerated do_not_delete_during_merge
*/
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

View File

@@ -10,6 +10,8 @@ public class MaterialVo4Unit extends Material{
private String materialOther; private String materialOther;
private Long stock;
public String getUnitName() { public String getUnitName() {
return unitName; return unitName;
} }
@@ -33,4 +35,12 @@ public class MaterialVo4Unit extends Material{
public void setMaterialOther(String materialOther) { public void setMaterialOther(String materialOther) {
this.materialOther = materialOther; this.materialOther = materialOther;
} }
public Long getStock() {
return stock;
}
public void setStock(Long stock) {
this.stock = stock;
}
} }

View File

@@ -1,96 +0,0 @@
package com.jsh.erp.datasource.mappers;
import com.jsh.erp.datasource.entities.AssetCategory;
import com.jsh.erp.datasource.entities.AssetCategoryExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface AssetCategoryMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetcategory
*
* @mbggenerated
*/
int countByExample(AssetCategoryExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetcategory
*
* @mbggenerated
*/
int deleteByExample(AssetCategoryExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetcategory
*
* @mbggenerated
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetcategory
*
* @mbggenerated
*/
int insert(AssetCategory record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetcategory
*
* @mbggenerated
*/
int insertSelective(AssetCategory record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetcategory
*
* @mbggenerated
*/
List<AssetCategory> selectByExample(AssetCategoryExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetcategory
*
* @mbggenerated
*/
AssetCategory selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetcategory
*
* @mbggenerated
*/
int updateByExampleSelective(@Param("record") AssetCategory record, @Param("example") AssetCategoryExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetcategory
*
* @mbggenerated
*/
int updateByExample(@Param("record") AssetCategory record, @Param("example") AssetCategoryExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetcategory
*
* @mbggenerated
*/
int updateByPrimaryKeySelective(AssetCategory record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetcategory
*
* @mbggenerated
*/
int updateByPrimaryKey(AssetCategory record);
}

View File

@@ -1,120 +0,0 @@
package com.jsh.erp.datasource.mappers;
import com.jsh.erp.datasource.entities.Asset;
import com.jsh.erp.datasource.entities.AssetExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface AssetMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
int countByExample(AssetExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
int deleteByExample(AssetExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
int insert(Asset record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
int insertSelective(Asset record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
List<Asset> selectByExampleWithBLOBs(AssetExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
List<Asset> selectByExample(AssetExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
Asset selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
int updateByExampleSelective(@Param("record") Asset record, @Param("example") AssetExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
int updateByExampleWithBLOBs(@Param("record") Asset record, @Param("example") AssetExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
int updateByExample(@Param("record") Asset record, @Param("example") AssetExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
int updateByPrimaryKeySelective(Asset record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
int updateByPrimaryKeyWithBLOBs(Asset record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
int updateByPrimaryKey(Asset record);
}

View File

@@ -1,120 +0,0 @@
package com.jsh.erp.datasource.mappers;
import com.jsh.erp.datasource.entities.AssetName;
import com.jsh.erp.datasource.entities.AssetNameExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface AssetNameMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
int countByExample(AssetNameExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
int deleteByExample(AssetNameExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
int insert(AssetName record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
int insertSelective(AssetName record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
List<AssetName> selectByExampleWithBLOBs(AssetNameExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
List<AssetName> selectByExample(AssetNameExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
AssetName selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
int updateByExampleSelective(@Param("record") AssetName record, @Param("example") AssetNameExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
int updateByExampleWithBLOBs(@Param("record") AssetName record, @Param("example") AssetNameExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
int updateByExample(@Param("record") AssetName record, @Param("example") AssetNameExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
int updateByPrimaryKeySelective(AssetName record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
int updateByPrimaryKeyWithBLOBs(AssetName record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
int updateByPrimaryKey(AssetName record);
}

View File

@@ -110,10 +110,11 @@ public interface DepotHeadMapperEx {
* */ * */
void updatedepotHead(DepotHead depotHead); void updatedepotHead(DepotHead depotHead);
void updateBuildOnlyNumber();
/** /**
* 获得一个全局唯一的数作为订单号的追加 * 获得一个全局唯一的数作为订单号的追加
* */ * */
Long getBuildOnlyNumber(@Param("seq_name") String seq_name); Long getBuildOnlyNumber(@Param("seq_name") String seq_name);
int batchDeleteDepotHeadByIds(@Param("updateTime") Date updateTime, @Param("updater") Long updater, @Param("ids") String ids[]); int batchDeleteDepotHeadByIds(@Param("updateTime") Date updateTime, @Param("updater") Long updater, @Param("ids") String ids[]);

View File

@@ -45,10 +45,10 @@ public interface DepotItemMapperEx {
@Param("mId") Long mId, @Param("mId") Long mId,
@Param("monthTime") String monthTime); @Param("monthTime") String monthTime);
int findByTypeAndMaterialIdIn( Long findByTypeAndMaterialIdIn(
@Param("mId") Long mId); @Param("mId") Long mId);
int findByTypeAndMaterialIdOut( Long findByTypeAndMaterialIdOut(
@Param("mId") Long mId); @Param("mId") Long mId);
int findByTypeAndDepotIdAndMaterialIdIn( int findByTypeAndDepotIdAndMaterialIdIn(

View File

@@ -20,7 +20,6 @@ public interface MaterialMapperEx {
List<MaterialVo4Unit> selectByConditionMaterial( List<MaterialVo4Unit> selectByConditionMaterial(
@Param("name") String name, @Param("name") String name,
@Param("model") String model, @Param("model") String model,
@Param("categoryId") Long categoryId,
@Param("categoryIds") String categoryIds, @Param("categoryIds") String categoryIds,
@Param("mpList") String mpList, @Param("mpList") String mpList,
@Param("offset") Integer offset, @Param("offset") Integer offset,
@@ -29,7 +28,6 @@ public interface MaterialMapperEx {
Long countsByMaterial( Long countsByMaterial(
@Param("name") String name, @Param("name") String name,
@Param("model") String model, @Param("model") String model,
@Param("categoryId") Long categoryId,
@Param("categoryIds") String categoryIds, @Param("categoryIds") String categoryIds,
@Param("mpList") String mpList); @Param("mpList") String mpList);
@@ -46,7 +44,6 @@ public interface MaterialMapperEx {
List<MaterialVo4Unit> findByAll( List<MaterialVo4Unit> findByAll(
@Param("name") String name, @Param("name") String name,
@Param("model") String model, @Param("model") String model,
@Param("categoryId") Long categoryId,
@Param("categoryIds") String categoryIds); @Param("categoryIds") String categoryIds);
/** /**
* 通过商品名称查询商品信息 * 通过商品名称查询商品信息

View File

@@ -24,6 +24,10 @@ import java.lang.annotation.*;
* depotItem-90 * depotItem-90
* accountHead-95 * accountHead-95
* accountItem-100 * accountItem-100
* serialNumber-105
* organization-110
* orgaUserRel-115
* tenant-120
*/ */
@Target({ElementType.TYPE, ElementType.ANNOTATION_TYPE}) @Target({ElementType.TYPE, ElementType.ANNOTATION_TYPE})
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)

View File

@@ -208,6 +208,56 @@ public class AccountHeadService {
return result; return result;
} }
/**
* 统计总金额
* @param getS
* @param type
* @param mode 合计或者金额
* @param endTime
* @return
*/
public BigDecimal allMoney(String getS, String type, String mode, String endTime) {
BigDecimal allMoney = BigDecimal.ZERO;
try {
Integer supplierId = Integer.valueOf(getS);
BigDecimal sum = findAllMoney(supplierId, type, mode, endTime);
if(sum != null) {
allMoney = sum;
}
} catch (Exception e) {
e.printStackTrace();
}
//返回正数,如果负数也转为正数
if ((allMoney.compareTo(BigDecimal.ZERO))==-1) {
allMoney = allMoney.abs();
}
return allMoney;
}
/**
* 查询单位的累计应收和累计应付,收预付款不计入此处
* @param supplierId
* @param endTime
* @param supType
* @return
*/
public BigDecimal findTotalPay(Integer supplierId, String endTime, String supType) {
BigDecimal sum = BigDecimal.ZERO;
String getS = supplierId.toString();
int i = 1;
if (("customer").equals(supType)) { //客户
i = 1;
} else if (("vendor").equals(supType)) { //供应商
i = -1;
}
//收付款部分
sum = sum.add((allMoney(getS, "付款", "合计",endTime).add(allMoney(getS, "付款", "实际",endTime))).multiply(new BigDecimal(i)));
sum = sum.subtract((allMoney(getS, "收款", "合计",endTime).add(allMoney(getS, "收款", "实际",endTime))).multiply(new BigDecimal(i)));
sum = sum.add((allMoney(getS, "收入", "合计",endTime).subtract(allMoney(getS, "收入", "实际",endTime))).multiply(new BigDecimal(i)));
sum = sum.subtract((allMoney(getS, "支出", "合计",endTime).subtract(allMoney(getS, "支出", "实际",endTime))).multiply(new BigDecimal(i)));
return sum;
}
public List<AccountHeadVo4ListEx> getDetailByNumber(String billNo)throws Exception { public List<AccountHeadVo4ListEx> getDetailByNumber(String billNo)throws Exception {
List<AccountHeadVo4ListEx> resList = new ArrayList<AccountHeadVo4ListEx>(); List<AccountHeadVo4ListEx> resList = new ArrayList<AccountHeadVo4ListEx>();
List<AccountHeadVo4ListEx> list = null; List<AccountHeadVo4ListEx> list = null;

View File

@@ -264,10 +264,12 @@ public class DepotHeadService {
/** /**
* 创建一个唯一的序列号 * 创建一个唯一的序列号
* */ * */
public String buildOnlyNumber()throws Exception{ @Transactional(value = "transactionManager", rollbackFor = Exception.class)
public String buildOnlyNumber()throws Exception{
Long buildOnlyNumber=null; Long buildOnlyNumber=null;
synchronized (this){ synchronized (this){
try{ try{
depotHeadMapperEx.updateBuildOnlyNumber(); //编号+1
buildOnlyNumber= depotHeadMapperEx.getBuildOnlyNumber(BusinessConstants.DEPOT_NUMBER_SEQ); buildOnlyNumber= depotHeadMapperEx.getBuildOnlyNumber(BusinessConstants.DEPOT_NUMBER_SEQ);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", logger.error("异常码[{}],异常提示[{}],异常[{}]",
@@ -275,7 +277,6 @@ public class DepotHeadService {
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE, throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG); ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
} }
if(buildOnlyNumber<BusinessConstants.SEQ_TO_STRING_MIN_LENGTH){ if(buildOnlyNumber<BusinessConstants.SEQ_TO_STRING_MIN_LENGTH){
StringBuffer sb=new StringBuffer(buildOnlyNumber.toString()); StringBuffer sb=new StringBuffer(buildOnlyNumber.toString());
@@ -434,6 +435,56 @@ public class DepotHeadService {
return result; return result;
} }
/**
* 统计总金额
* @param getS
* @param type
* @param subType
* @param mode 合计或者金额
* @return
*/
public BigDecimal allMoney(String getS, String type, String subType, String mode, String endTime) {
BigDecimal allMoney = BigDecimal.ZERO;
try {
Integer supplierId = Integer.valueOf(getS);
BigDecimal sum = findAllMoney(supplierId, type, subType, mode, endTime);
if(sum != null) {
allMoney = sum;
}
} catch (Exception e) {
e.printStackTrace();
}
//返回正数,如果负数也转为正数
if ((allMoney.compareTo(BigDecimal.ZERO))==-1) {
allMoney = allMoney.abs();
}
return allMoney;
}
/**
* 查询单位的累计应收和累计应付,零售不能计入
* @param supplierId
* @param endTime
* @param supType
* @return
*/
public BigDecimal findTotalPay(Integer supplierId, String endTime, String supType) {
BigDecimal sum = BigDecimal.ZERO;
String getS = supplierId.toString();
int i = 1;
if (("customer").equals(supType)) { //客户
i = 1;
} else if (("vendor").equals(supType)) { //供应商
i = -1;
}
//进销部分
sum = sum.subtract((allMoney(getS, "入库", "采购", "合计",endTime).subtract(allMoney(getS, "入库", "采购", "实际",endTime))).multiply(new BigDecimal(i)));
sum = sum.subtract((allMoney(getS, "入库", "销售退货", "合计",endTime).subtract(allMoney(getS, "入库", "销售退货", "实际",endTime))).multiply(new BigDecimal(i)));
sum = sum.add((allMoney(getS, "出库", "销售", "合计",endTime).subtract(allMoney(getS, "出库", "销售", "实际",endTime))).multiply(new BigDecimal(i)));
sum = sum.add((allMoney(getS, "出库", "采购退货", "合计",endTime).subtract(allMoney(getS, "出库", "采购退货", "实际",endTime))).multiply(new BigDecimal(i)));
return sum;
}
public List<DepotHeadVo4List> getDetailByNumber(String number)throws Exception { public List<DepotHeadVo4List> getDetailByNumber(String number)throws Exception {
List<DepotHeadVo4List> resList = new ArrayList<DepotHeadVo4List>(); List<DepotHeadVo4List> resList = new ArrayList<DepotHeadVo4List>();
List<DepotHeadVo4List> list = null; List<DepotHeadVo4List> list = null;

View File

@@ -291,8 +291,8 @@ public class DepotItemService {
return depotItemMapper.updateByPrimaryKeySelective(depotItem); return depotItemMapper.updateByPrimaryKeySelective(depotItem);
} }
public int findByTypeAndMaterialId(String type, Long mId) throws Exception{ public Long findByTypeAndMaterialId(String type, Long mId) throws Exception{
int result =0; Long result = 0l;
try{ try{
if(type.equals(TYPE)) { if(type.equals(TYPE)) {
result= depotItemMapperEx.findByTypeAndMaterialIdIn(mId); result= depotItemMapperEx.findByTypeAndMaterialIdIn(mId);

View File

@@ -34,11 +34,10 @@ public class MaterialComponent implements ICommonQuery {
String search = map.get(Constants.SEARCH); String search = map.get(Constants.SEARCH);
String name = StringUtil.getInfo(search, "name"); String name = StringUtil.getInfo(search, "name");
String model = StringUtil.getInfo(search, "model"); String model = StringUtil.getInfo(search, "model");
Long categoryId = Long.parseLong(StringUtil.getInfo(search, "categoryId"));
String categoryIds = StringUtil.getInfo(search, "categoryIds"); String categoryIds = StringUtil.getInfo(search, "categoryIds");
String mpList = StringUtil.getInfo(search, "mpList"); String mpList = StringUtil.getInfo(search, "mpList");
String order = QueryUtils.order(map); String order = QueryUtils.order(map);
return materialService.select(name, model,categoryId,categoryIds,mpList, QueryUtils.offset(map), QueryUtils.rows(map)); return materialService.select(name, model,categoryIds,mpList, QueryUtils.offset(map), QueryUtils.rows(map));
} }
@Override @Override
@@ -46,10 +45,9 @@ public class MaterialComponent implements ICommonQuery {
String search = map.get(Constants.SEARCH); String search = map.get(Constants.SEARCH);
String name = StringUtil.getInfo(search, "name"); String name = StringUtil.getInfo(search, "name");
String model = StringUtil.getInfo(search, "model"); String model = StringUtil.getInfo(search, "model");
Long categoryId = Long.parseLong(StringUtil.getInfo(search, "categoryId"));
String categoryIds = StringUtil.getInfo(search, "categoryIds"); String categoryIds = StringUtil.getInfo(search, "categoryIds");
String mpList = StringUtil.getInfo(search, "mpList"); String mpList = StringUtil.getInfo(search, "mpList");
return materialService.countMaterial(name, model,categoryId,categoryIds,mpList); return materialService.countMaterial(name, model,categoryIds,mpList);
} }
@Override @Override

View File

@@ -9,6 +9,7 @@ import com.jsh.erp.datasource.mappers.DepotItemMapperEx;
import com.jsh.erp.datasource.mappers.MaterialMapper; import com.jsh.erp.datasource.mappers.MaterialMapper;
import com.jsh.erp.datasource.mappers.MaterialMapperEx; import com.jsh.erp.datasource.mappers.MaterialMapperEx;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.service.depotItem.DepotItemService;
import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.user.UserService; import com.jsh.erp.service.user.UserService;
import com.jsh.erp.utils.BaseResponseInfo; import com.jsh.erp.utils.BaseResponseInfo;
@@ -38,6 +39,8 @@ public class MaterialService {
private UserService userService; private UserService userService;
@Resource @Resource
private DepotItemMapperEx depotItemMapperEx; private DepotItemMapperEx depotItemMapperEx;
@Resource
private DepotItemService depotItemService;
public Material getMaterial(long id)throws Exception { public Material getMaterial(long id)throws Exception {
Material result=null; Material result=null;
@@ -67,13 +70,13 @@ public class MaterialService {
return list; return list;
} }
public List<MaterialVo4Unit> select(String name, String model,Long categoryId, String categoryIds,String mpList, int offset, int rows) public List<MaterialVo4Unit> select(String name, String model, String categoryIds,String mpList, int offset, int rows)
throws Exception{ throws Exception{
String[] mpArr = mpList.split(","); String[] mpArr = mpList.split(",");
List<MaterialVo4Unit> resList = new ArrayList<MaterialVo4Unit>(); List<MaterialVo4Unit> resList = new ArrayList<MaterialVo4Unit>();
List<MaterialVo4Unit> list =null; List<MaterialVo4Unit> list =null;
try{ try{
list= materialMapperEx.selectByConditionMaterial(name, model,categoryId,categoryIds,mpList, offset, rows); list= materialMapperEx.selectByConditionMaterial(name, model,categoryIds,mpList, offset, rows);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", logger.error("异常码[{}],异常提示[{}],异常[{}]",
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e); ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
@@ -105,16 +108,19 @@ public class MaterialService {
} }
} }
m.setMaterialOther(materialOther); m.setMaterialOther(materialOther);
Long InSum = depotItemService.findByTypeAndMaterialId("入库", m.getId());
Long OutSum = depotItemService.findByTypeAndMaterialId("出库", m.getId());
m.setStock(InSum - OutSum);
resList.add(m); resList.add(m);
} }
} }
return resList; return resList;
} }
public Long countMaterial(String name, String model,Long categoryId, String categoryIds,String mpList)throws Exception { public Long countMaterial(String name, String model, String categoryIds,String mpList)throws Exception {
Long result =null; Long result =null;
try{ try{
result= materialMapperEx.countsByMaterial(name, model,categoryId,categoryIds,mpList); result= materialMapperEx.countsByMaterial(name, model,categoryIds,mpList);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", logger.error("异常码[{}],异常提示[{}],异常[{}]",
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e); ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
@@ -314,11 +320,11 @@ public class MaterialService {
return list; return list;
} }
public List<MaterialVo4Unit> findByAll(String name, String model, Long categoryId, String categoryIds)throws Exception { public List<MaterialVo4Unit> findByAll(String name, String model, String categoryIds)throws Exception {
List<MaterialVo4Unit> resList = new ArrayList<MaterialVo4Unit>(); List<MaterialVo4Unit> resList = new ArrayList<MaterialVo4Unit>();
List<MaterialVo4Unit> list =null; List<MaterialVo4Unit> list =null;
try{ try{
list= materialMapperEx.findByAll(name, model, categoryId, categoryIds); list= materialMapperEx.findByAll(name, model, categoryIds);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", logger.error("异常码[{}],异常提示[{}],异常[{}]",
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e); ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);

View File

@@ -22,6 +22,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@@ -68,12 +69,9 @@ public class MaterialCategoryService {
} }
public List<MaterialCategory> getAllList(Long parentId)throws Exception { public List<MaterialCategory> getAllList(Long parentId)throws Exception {
MaterialCategoryExample example = new MaterialCategoryExample();
example.createCriteria().andParentidEqualTo(parentId).andIdNotEqualTo(1l);
example.setOrderByClause("id");
List<MaterialCategory> list=null; List<MaterialCategory> list=null;
try{ try{
list=materialCategoryMapper.selectByExample(example); list = getMCList(parentId);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", logger.error("异常码[{}],异常提示[{}],异常[{}]",
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e); ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
@@ -83,6 +81,25 @@ public class MaterialCategoryService {
return list; return list;
} }
public List<MaterialCategory> getMCList(Long parentId)throws Exception {
List<MaterialCategory> res= new ArrayList<MaterialCategory>();
List<MaterialCategory> list=null;
MaterialCategoryExample example = new MaterialCategoryExample();
example.createCriteria().andParentidEqualTo(parentId).andIdNotEqualTo(1l);
example.setOrderByClause("id");
list=materialCategoryMapper.selectByExample(example);
if(list!=null && list.size()>0) {
res.addAll(list);
for(MaterialCategory mc : list) {
List<MaterialCategory> mcList = getMCList(mc.getId());
if(mcList!=null && mcList.size()>0) {
res.addAll(mcList);
}
}
}
return res;
}
public List<MaterialCategory> select(String name, Integer parentId, int offset, int rows) throws Exception{ public List<MaterialCategory> select(String name, Integer parentId, int offset, int rows) throws Exception{
List<MaterialCategory> list=null; List<MaterialCategory> list=null;
try{ try{

View File

@@ -10,6 +10,8 @@ import com.jsh.erp.datasource.mappers.DepotHeadMapperEx;
import com.jsh.erp.datasource.mappers.SupplierMapper; import com.jsh.erp.datasource.mappers.SupplierMapper;
import com.jsh.erp.datasource.mappers.SupplierMapperEx; import com.jsh.erp.datasource.mappers.SupplierMapperEx;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.service.accountHead.AccountHeadService;
import com.jsh.erp.service.depotHead.DepotHeadService;
import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.user.UserService; import com.jsh.erp.service.user.UserService;
import com.jsh.erp.utils.BaseResponseInfo; import com.jsh.erp.utils.BaseResponseInfo;
@@ -24,10 +26,9 @@ import org.springframework.web.context.request.ServletRequestAttributes;
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.*;
import java.util.HashMap;
import java.util.List; import static com.jsh.erp.utils.Tools.getNow3;
import java.util.Map;
@Service @Service
public class SupplierService { public class SupplierService {
@@ -46,6 +47,10 @@ public class SupplierService {
private AccountHeadMapperEx accountHeadMapperEx; private AccountHeadMapperEx accountHeadMapperEx;
@Resource @Resource
private DepotHeadMapperEx depotHeadMapperEx; private DepotHeadMapperEx depotHeadMapperEx;
@Resource
private DepotHeadService depotHeadService;
@Resource
private AccountHeadService accountHeadService;
public Supplier getSupplier(long id)throws Exception { public Supplier getSupplier(long id)throws Exception {
Supplier result=null; Supplier result=null;
@@ -77,16 +82,47 @@ public class SupplierService {
public List<Supplier> select(String supplier, String type, String phonenum, public List<Supplier> select(String supplier, String type, String phonenum,
String telephone, String description, int offset, int rows) throws Exception{ String telephone, String description, int offset, int rows) throws Exception{
List<Supplier> list=null; List<Supplier> resList = new ArrayList<Supplier>();
try{ try{
list=supplierMapperEx.selectByConditionSupplier(supplier, type, phonenum, telephone, description, offset, rows); List<Supplier> list = supplierMapperEx.selectByConditionSupplier(supplier, type, phonenum, telephone, description, offset, rows);
for(Supplier s : list) {
Integer supplierId = s.getId().intValue();
String endTime = getNow3();
String supType = null;
if(("客户").equals(s.getType())) {
supType = "customer";
} else if(("供应商").equals(s.getType())) {
supType = "vendor";
}
BigDecimal sum = BigDecimal.ZERO;
BigDecimal beginNeedGet = s.getBeginneedget();
if(beginNeedGet==null) {
beginNeedGet = BigDecimal.ZERO;
}
BigDecimal beginNeedPay = s.getBeginneedpay();
if(beginNeedPay==null) {
beginNeedPay = BigDecimal.ZERO;
}
sum = sum.add(depotHeadService.findTotalPay(supplierId, endTime, supType));
sum = sum.add(accountHeadService.findTotalPay(supplierId, endTime, supType));
if(("客户").equals(s.getType())) {
sum = sum.add(beginNeedGet).subtract(beginNeedPay);
s.setAllneedget(sum);
s.setAllneedpay(BigDecimal.ZERO);
} else if(("供应商").equals(s.getType())) {
sum = sum.add(beginNeedPay).subtract(beginNeedGet);
s.setAllneedget(BigDecimal.ZERO);
s.setAllneedpay(sum);
}
resList.add(s);
}
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", logger.error("异常码[{}],异常提示[{}],异常[{}]",
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e); ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE, throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG); ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return resList;
} }
public Long countSupplier(String supplier, String type, String phonenum, String telephone, String description) throws Exception{ public Long countSupplier(String supplier, String type, String phonenum, String telephone, String description) throws Exception{

View File

@@ -1,288 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.AssetCategoryMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.AssetCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="assetname" jdbcType="VARCHAR" property="assetname" />
<result column="isystem" jdbcType="TINYINT" property="isystem" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, assetname, isystem, description, tenant_id, delete_Flag
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AssetCategoryExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_assetcategory
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_assetcategory
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_assetcategory
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.AssetCategoryExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_assetcategory
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.AssetCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_assetcategory (id, assetname, isystem,
description, tenant_id, delete_Flag
)
values (#{id,jdbcType=BIGINT}, #{assetname,jdbcType=VARCHAR}, #{isystem,jdbcType=TINYINT},
#{description,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.AssetCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_assetcategory
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="assetname != null">
assetname,
</if>
<if test="isystem != null">
isystem,
</if>
<if test="description != null">
description,
</if>
<if test="tenantId != null">
tenant_id,
</if>
<if test="deleteFlag != null">
delete_Flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="assetname != null">
#{assetname,jdbcType=VARCHAR},
</if>
<if test="isystem != null">
#{isystem,jdbcType=TINYINT},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.AssetCategoryExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_assetcategory
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetcategory
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.assetname != null">
assetname = #{record.assetname,jdbcType=VARCHAR},
</if>
<if test="record.isystem != null">
isystem = #{record.isystem,jdbcType=TINYINT},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=VARCHAR},
</if>
<if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if test="record.deleteFlag != null">
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetcategory
set id = #{record.id,jdbcType=BIGINT},
assetname = #{record.assetname,jdbcType=VARCHAR},
isystem = #{record.isystem,jdbcType=TINYINT},
description = #{record.description,jdbcType=VARCHAR},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.AssetCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetcategory
<set>
<if test="assetname != null">
assetname = #{assetname,jdbcType=VARCHAR},
</if>
<if test="isystem != null">
isystem = #{isystem,jdbcType=TINYINT},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.AssetCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetcategory
set assetname = #{assetname,jdbcType=VARCHAR},
isystem = #{isystem,jdbcType=TINYINT},
description = #{description,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -1,615 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.AssetMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Asset">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="assetnameID" jdbcType="BIGINT" property="assetnameid" />
<result column="location" jdbcType="VARCHAR" property="location" />
<result column="labels" jdbcType="VARCHAR" property="labels" />
<result column="status" jdbcType="SMALLINT" property="status" />
<result column="userID" jdbcType="BIGINT" property="userid" />
<result column="price" jdbcType="DECIMAL" property="price" />
<result column="purchasedate" jdbcType="TIMESTAMP" property="purchasedate" />
<result column="periodofvalidity" jdbcType="TIMESTAMP" property="periodofvalidity" />
<result column="warrantydate" jdbcType="TIMESTAMP" property="warrantydate" />
<result column="assetnum" jdbcType="VARCHAR" property="assetnum" />
<result column="serialnum" jdbcType="VARCHAR" property="serialnum" />
<result column="supplier" jdbcType="BIGINT" property="supplier" />
<result column="createtime" jdbcType="TIMESTAMP" property="createtime" />
<result column="creator" jdbcType="BIGINT" property="creator" />
<result column="updatetime" jdbcType="TIMESTAMP" property="updatetime" />
<result column="updator" jdbcType="BIGINT" property="updator" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.jsh.erp.datasource.entities.Asset">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<result column="description" jdbcType="LONGVARCHAR" property="description" />
<result column="addMonth" jdbcType="LONGVARCHAR" property="addmonth" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, assetnameID, location, labels, status, userID, price, purchasedate, periodofvalidity,
warrantydate, assetnum, serialnum, supplier, createtime, creator, updatetime, updator,
tenant_id, delete_Flag
</sql>
<sql id="Blob_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
description, addMonth
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.jsh.erp.datasource.entities.AssetExample" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from jsh_asset
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AssetExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_asset
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from jsh_asset
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_asset
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.AssetExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_asset
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Asset">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_asset (id, assetnameID, location,
labels, status, userID,
price, purchasedate, periodofvalidity,
warrantydate, assetnum, serialnum,
supplier, createtime, creator,
updatetime, updator, tenant_id,
delete_Flag, description, addMonth
)
values (#{id,jdbcType=BIGINT}, #{assetnameid,jdbcType=BIGINT}, #{location,jdbcType=VARCHAR},
#{labels,jdbcType=VARCHAR}, #{status,jdbcType=SMALLINT}, #{userid,jdbcType=BIGINT},
#{price,jdbcType=DECIMAL}, #{purchasedate,jdbcType=TIMESTAMP}, #{periodofvalidity,jdbcType=TIMESTAMP},
#{warrantydate,jdbcType=TIMESTAMP}, #{assetnum,jdbcType=VARCHAR}, #{serialnum,jdbcType=VARCHAR},
#{supplier,jdbcType=BIGINT}, #{createtime,jdbcType=TIMESTAMP}, #{creator,jdbcType=BIGINT},
#{updatetime,jdbcType=TIMESTAMP}, #{updator,jdbcType=BIGINT}, #{tenantId,jdbcType=BIGINT},
#{deleteFlag,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR}, #{addmonth,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Asset">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_asset
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="assetnameid != null">
assetnameID,
</if>
<if test="location != null">
location,
</if>
<if test="labels != null">
labels,
</if>
<if test="status != null">
status,
</if>
<if test="userid != null">
userID,
</if>
<if test="price != null">
price,
</if>
<if test="purchasedate != null">
purchasedate,
</if>
<if test="periodofvalidity != null">
periodofvalidity,
</if>
<if test="warrantydate != null">
warrantydate,
</if>
<if test="assetnum != null">
assetnum,
</if>
<if test="serialnum != null">
serialnum,
</if>
<if test="supplier != null">
supplier,
</if>
<if test="createtime != null">
createtime,
</if>
<if test="creator != null">
creator,
</if>
<if test="updatetime != null">
updatetime,
</if>
<if test="updator != null">
updator,
</if>
<if test="tenantId != null">
tenant_id,
</if>
<if test="deleteFlag != null">
delete_Flag,
</if>
<if test="description != null">
description,
</if>
<if test="addmonth != null">
addMonth,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="assetnameid != null">
#{assetnameid,jdbcType=BIGINT},
</if>
<if test="location != null">
#{location,jdbcType=VARCHAR},
</if>
<if test="labels != null">
#{labels,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=SMALLINT},
</if>
<if test="userid != null">
#{userid,jdbcType=BIGINT},
</if>
<if test="price != null">
#{price,jdbcType=DECIMAL},
</if>
<if test="purchasedate != null">
#{purchasedate,jdbcType=TIMESTAMP},
</if>
<if test="periodofvalidity != null">
#{periodofvalidity,jdbcType=TIMESTAMP},
</if>
<if test="warrantydate != null">
#{warrantydate,jdbcType=TIMESTAMP},
</if>
<if test="assetnum != null">
#{assetnum,jdbcType=VARCHAR},
</if>
<if test="serialnum != null">
#{serialnum,jdbcType=VARCHAR},
</if>
<if test="supplier != null">
#{supplier,jdbcType=BIGINT},
</if>
<if test="createtime != null">
#{createtime,jdbcType=TIMESTAMP},
</if>
<if test="creator != null">
#{creator,jdbcType=BIGINT},
</if>
<if test="updatetime != null">
#{updatetime,jdbcType=TIMESTAMP},
</if>
<if test="updator != null">
#{updator,jdbcType=BIGINT},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=LONGVARCHAR},
</if>
<if test="addmonth != null">
#{addmonth,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.AssetExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_asset
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_asset
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.assetnameid != null">
assetnameID = #{record.assetnameid,jdbcType=BIGINT},
</if>
<if test="record.location != null">
location = #{record.location,jdbcType=VARCHAR},
</if>
<if test="record.labels != null">
labels = #{record.labels,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=SMALLINT},
</if>
<if test="record.userid != null">
userID = #{record.userid,jdbcType=BIGINT},
</if>
<if test="record.price != null">
price = #{record.price,jdbcType=DECIMAL},
</if>
<if test="record.purchasedate != null">
purchasedate = #{record.purchasedate,jdbcType=TIMESTAMP},
</if>
<if test="record.periodofvalidity != null">
periodofvalidity = #{record.periodofvalidity,jdbcType=TIMESTAMP},
</if>
<if test="record.warrantydate != null">
warrantydate = #{record.warrantydate,jdbcType=TIMESTAMP},
</if>
<if test="record.assetnum != null">
assetnum = #{record.assetnum,jdbcType=VARCHAR},
</if>
<if test="record.serialnum != null">
serialnum = #{record.serialnum,jdbcType=VARCHAR},
</if>
<if test="record.supplier != null">
supplier = #{record.supplier,jdbcType=BIGINT},
</if>
<if test="record.createtime != null">
createtime = #{record.createtime,jdbcType=TIMESTAMP},
</if>
<if test="record.creator != null">
creator = #{record.creator,jdbcType=BIGINT},
</if>
<if test="record.updatetime != null">
updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
</if>
<if test="record.updator != null">
updator = #{record.updator,jdbcType=BIGINT},
</if>
<if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if test="record.deleteFlag != null">
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=LONGVARCHAR},
</if>
<if test="record.addmonth != null">
addMonth = #{record.addmonth,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_asset
set id = #{record.id,jdbcType=BIGINT},
assetnameID = #{record.assetnameid,jdbcType=BIGINT},
location = #{record.location,jdbcType=VARCHAR},
labels = #{record.labels,jdbcType=VARCHAR},
status = #{record.status,jdbcType=SMALLINT},
userID = #{record.userid,jdbcType=BIGINT},
price = #{record.price,jdbcType=DECIMAL},
purchasedate = #{record.purchasedate,jdbcType=TIMESTAMP},
periodofvalidity = #{record.periodofvalidity,jdbcType=TIMESTAMP},
warrantydate = #{record.warrantydate,jdbcType=TIMESTAMP},
assetnum = #{record.assetnum,jdbcType=VARCHAR},
serialnum = #{record.serialnum,jdbcType=VARCHAR},
supplier = #{record.supplier,jdbcType=BIGINT},
createtime = #{record.createtime,jdbcType=TIMESTAMP},
creator = #{record.creator,jdbcType=BIGINT},
updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
updator = #{record.updator,jdbcType=BIGINT},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
description = #{record.description,jdbcType=LONGVARCHAR},
addMonth = #{record.addmonth,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_asset
set id = #{record.id,jdbcType=BIGINT},
assetnameID = #{record.assetnameid,jdbcType=BIGINT},
location = #{record.location,jdbcType=VARCHAR},
labels = #{record.labels,jdbcType=VARCHAR},
status = #{record.status,jdbcType=SMALLINT},
userID = #{record.userid,jdbcType=BIGINT},
price = #{record.price,jdbcType=DECIMAL},
purchasedate = #{record.purchasedate,jdbcType=TIMESTAMP},
periodofvalidity = #{record.periodofvalidity,jdbcType=TIMESTAMP},
warrantydate = #{record.warrantydate,jdbcType=TIMESTAMP},
assetnum = #{record.assetnum,jdbcType=VARCHAR},
serialnum = #{record.serialnum,jdbcType=VARCHAR},
supplier = #{record.supplier,jdbcType=BIGINT},
createtime = #{record.createtime,jdbcType=TIMESTAMP},
creator = #{record.creator,jdbcType=BIGINT},
updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
updator = #{record.updator,jdbcType=BIGINT},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Asset">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_asset
<set>
<if test="assetnameid != null">
assetnameID = #{assetnameid,jdbcType=BIGINT},
</if>
<if test="location != null">
location = #{location,jdbcType=VARCHAR},
</if>
<if test="labels != null">
labels = #{labels,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=SMALLINT},
</if>
<if test="userid != null">
userID = #{userid,jdbcType=BIGINT},
</if>
<if test="price != null">
price = #{price,jdbcType=DECIMAL},
</if>
<if test="purchasedate != null">
purchasedate = #{purchasedate,jdbcType=TIMESTAMP},
</if>
<if test="periodofvalidity != null">
periodofvalidity = #{periodofvalidity,jdbcType=TIMESTAMP},
</if>
<if test="warrantydate != null">
warrantydate = #{warrantydate,jdbcType=TIMESTAMP},
</if>
<if test="assetnum != null">
assetnum = #{assetnum,jdbcType=VARCHAR},
</if>
<if test="serialnum != null">
serialnum = #{serialnum,jdbcType=VARCHAR},
</if>
<if test="supplier != null">
supplier = #{supplier,jdbcType=BIGINT},
</if>
<if test="createtime != null">
createtime = #{createtime,jdbcType=TIMESTAMP},
</if>
<if test="creator != null">
creator = #{creator,jdbcType=BIGINT},
</if>
<if test="updatetime != null">
updatetime = #{updatetime,jdbcType=TIMESTAMP},
</if>
<if test="updator != null">
updator = #{updator,jdbcType=BIGINT},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=LONGVARCHAR},
</if>
<if test="addmonth != null">
addMonth = #{addmonth,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.jsh.erp.datasource.entities.Asset">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_asset
set assetnameID = #{assetnameid,jdbcType=BIGINT},
location = #{location,jdbcType=VARCHAR},
labels = #{labels,jdbcType=VARCHAR},
status = #{status,jdbcType=SMALLINT},
userID = #{userid,jdbcType=BIGINT},
price = #{price,jdbcType=DECIMAL},
purchasedate = #{purchasedate,jdbcType=TIMESTAMP},
periodofvalidity = #{periodofvalidity,jdbcType=TIMESTAMP},
warrantydate = #{warrantydate,jdbcType=TIMESTAMP},
assetnum = #{assetnum,jdbcType=VARCHAR},
serialnum = #{serialnum,jdbcType=VARCHAR},
supplier = #{supplier,jdbcType=BIGINT},
createtime = #{createtime,jdbcType=TIMESTAMP},
creator = #{creator,jdbcType=BIGINT},
updatetime = #{updatetime,jdbcType=TIMESTAMP},
updator = #{updator,jdbcType=BIGINT},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
description = #{description,jdbcType=LONGVARCHAR},
addMonth = #{addmonth,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Asset">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_asset
set assetnameID = #{assetnameid,jdbcType=BIGINT},
location = #{location,jdbcType=VARCHAR},
labels = #{labels,jdbcType=VARCHAR},
status = #{status,jdbcType=SMALLINT},
userID = #{userid,jdbcType=BIGINT},
price = #{price,jdbcType=DECIMAL},
purchasedate = #{purchasedate,jdbcType=TIMESTAMP},
periodofvalidity = #{periodofvalidity,jdbcType=TIMESTAMP},
warrantydate = #{warrantydate,jdbcType=TIMESTAMP},
assetnum = #{assetnum,jdbcType=VARCHAR},
serialnum = #{serialnum,jdbcType=VARCHAR},
supplier = #{supplier,jdbcType=BIGINT},
createtime = #{createtime,jdbcType=TIMESTAMP},
creator = #{creator,jdbcType=BIGINT},
updatetime = #{updatetime,jdbcType=TIMESTAMP},
updator = #{updator,jdbcType=BIGINT},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -1,384 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.AssetNameMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.AssetName">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="assetname" jdbcType="VARCHAR" property="assetname" />
<result column="assetcategoryID" jdbcType="BIGINT" property="assetcategoryid" />
<result column="isystem" jdbcType="SMALLINT" property="isystem" />
<result column="isconsumables" jdbcType="SMALLINT" property="isconsumables" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.jsh.erp.datasource.entities.AssetName">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<result column="description" jdbcType="LONGVARCHAR" property="description" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, assetname, assetcategoryID, isystem, isconsumables, tenant_id, delete_Flag
</sql>
<sql id="Blob_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
description
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.jsh.erp.datasource.entities.AssetNameExample" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from jsh_assetname
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AssetNameExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_assetname
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from jsh_assetname
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_assetname
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.AssetNameExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_assetname
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.AssetName">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_assetname (id, assetname, assetcategoryID,
isystem, isconsumables, tenant_id,
delete_Flag, description)
values (#{id,jdbcType=BIGINT}, #{assetname,jdbcType=VARCHAR}, #{assetcategoryid,jdbcType=BIGINT},
#{isystem,jdbcType=SMALLINT}, #{isconsumables,jdbcType=SMALLINT}, #{tenantId,jdbcType=BIGINT},
#{deleteFlag,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.AssetName">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_assetname
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="assetname != null">
assetname,
</if>
<if test="assetcategoryid != null">
assetcategoryID,
</if>
<if test="isystem != null">
isystem,
</if>
<if test="isconsumables != null">
isconsumables,
</if>
<if test="tenantId != null">
tenant_id,
</if>
<if test="deleteFlag != null">
delete_Flag,
</if>
<if test="description != null">
description,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="assetname != null">
#{assetname,jdbcType=VARCHAR},
</if>
<if test="assetcategoryid != null">
#{assetcategoryid,jdbcType=BIGINT},
</if>
<if test="isystem != null">
#{isystem,jdbcType=SMALLINT},
</if>
<if test="isconsumables != null">
#{isconsumables,jdbcType=SMALLINT},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.AssetNameExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_assetname
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetname
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.assetname != null">
assetname = #{record.assetname,jdbcType=VARCHAR},
</if>
<if test="record.assetcategoryid != null">
assetcategoryID = #{record.assetcategoryid,jdbcType=BIGINT},
</if>
<if test="record.isystem != null">
isystem = #{record.isystem,jdbcType=SMALLINT},
</if>
<if test="record.isconsumables != null">
isconsumables = #{record.isconsumables,jdbcType=SMALLINT},
</if>
<if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if test="record.deleteFlag != null">
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetname
set id = #{record.id,jdbcType=BIGINT},
assetname = #{record.assetname,jdbcType=VARCHAR},
assetcategoryID = #{record.assetcategoryid,jdbcType=BIGINT},
isystem = #{record.isystem,jdbcType=SMALLINT},
isconsumables = #{record.isconsumables,jdbcType=SMALLINT},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
description = #{record.description,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetname
set id = #{record.id,jdbcType=BIGINT},
assetname = #{record.assetname,jdbcType=VARCHAR},
assetcategoryID = #{record.assetcategoryid,jdbcType=BIGINT},
isystem = #{record.isystem,jdbcType=SMALLINT},
isconsumables = #{record.isconsumables,jdbcType=SMALLINT},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.AssetName">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetname
<set>
<if test="assetname != null">
assetname = #{assetname,jdbcType=VARCHAR},
</if>
<if test="assetcategoryid != null">
assetcategoryID = #{assetcategoryid,jdbcType=BIGINT},
</if>
<if test="isystem != null">
isystem = #{isystem,jdbcType=SMALLINT},
</if>
<if test="isconsumables != null">
isconsumables = #{isconsumables,jdbcType=SMALLINT},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.jsh.erp.datasource.entities.AssetName">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetname
set assetname = #{assetname,jdbcType=VARCHAR},
assetcategoryID = #{assetcategoryid,jdbcType=BIGINT},
isystem = #{isystem,jdbcType=SMALLINT},
isconsumables = #{isconsumables,jdbcType=SMALLINT},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
description = #{description,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.AssetName">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetname
set assetname = #{assetname,jdbcType=VARCHAR},
assetcategoryID = #{assetcategoryid,jdbcType=BIGINT},
isystem = #{isystem,jdbcType=SMALLINT},
isconsumables = #{isconsumables,jdbcType=SMALLINT},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>