From 3f76280df04a40bb381a367ba27267dd59b62cda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Tue, 18 Feb 2020 13:23:37 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E5=8A=9F=E8=83=BD=E7=BB=86?= =?UTF-8?q?=E8=8A=82=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/数据库更新记录-方便升级.txt | 10 +- erp_web/js/pages/materials/in_out.js | 34 +---- erp_web/pages/reports/buy_in_report.html | 2 +- erp_web/pages/reports/sale_out_report.html | 2 +- .../pages/reports/stock_warning_report.html | 2 +- .../erp/datasource/entities/DepotHead.java | 20 --- .../datasource/entities/DepotHeadExample.java | 120 ------------------ .../service/depotHead/DepotHeadService.java | 22 ++-- .../resources/mapper_xml/DepotHeadMapper.xml | 77 ++++------- .../mapper_xml/DepotHeadMapperEx.xml | 6 +- 10 files changed, 47 insertions(+), 248 deletions(-) diff --git a/docs/数据库更新记录-方便升级.txt b/docs/数据库更新记录-方便升级.txt index ace1eb7f..c44a30b5 100644 --- a/docs/数据库更新记录-方便升级.txt +++ b/docs/数据库更新记录-方便升级.txt @@ -732,4 +732,12 @@ ROW_FORMAT=COMPACT -- 时间 2020-02-16 -- by jishenghua -- ---------------------------- -alter table jsh_depotitem add material_extend_id bigint(20) DEFAULT NULL COMMENT '商品扩展id' after MaterialId; \ No newline at end of file +alter table jsh_depotitem add material_extend_id bigint(20) DEFAULT NULL COMMENT '商品扩展id' after MaterialId; + +-- ---------------------------- +-- 给单据主表删除字段ProjectId 和 AllocationProjectId +-- 时间 2020-02-18 +-- by jishenghua +-- ---------------------------- +alter table jsh_depothead drop column ProjectId +alter table jsh_depothead drop column AllocationProjectId \ No newline at end of file diff --git a/erp_web/js/pages/materials/in_out.js b/erp_web/js/pages/materials/in_out.js index d0306ec2..5eae159e 100644 --- a/erp_web/js/pages/materials/in_out.js +++ b/erp_web/js/pages/materials/in_out.js @@ -21,7 +21,6 @@ var orgDefaultList; //存储查询出来的会员列表 var accountList; //账户列表 var outItemList; //支出项目列表 - var thisTaxRate = 0; //当前税率,选择供应商或者客户的时候设置 var oldNumber = ""; //编辑前的单据编号 var oldId = 0; //编辑前的单据Id var otherColumns = true; //明细中的‘别名’列是否显示 @@ -248,26 +247,6 @@ } $("#payType").empty().append(option); } - else{ - $.ajax({ - type:"get", - url: "/supplier/findById", - data: { - supplierId: rec.id - }, - dataType: "json", - success: function (res){ - if(res && res.code === 200) { - if(res.data && res.data[0]){ - thisTaxRate = res.data[0].taxRate; //设置当前的税率 - } - } - }, - error:function(){ - - } - }); - } } }); } @@ -1465,6 +1444,8 @@ $("#AccountId").attr("data-accountArr", JSON.stringify(accountArr)).attr("data-accountMoneyArr", JSON.stringify(accountMoneyArr)); //json数据存储 $(".many-account-ico").show(); //显示多账户的ico图标 + } else { + $(".many-account-ico").hide(); //隐藏多账户的ico图标 } //采购入库、销售出库的费用数据加载 @@ -2397,15 +2378,8 @@ body.find("[field='TaxMoney']").find(input).val((UnitPrice*OperNumber*(taxRate/100)).toFixed(2)); //税额 statisticsFun(body,UnitPrice,OperNumber,footer,taxRate); }); - - //加载税率 - if(thisTaxRate) { - body.find("[field='TaxRate']").find(input).val(thisTaxRate); - } - else { - body.find("[field='TaxRate']").find(input).val(0); //默认为0 - } - + //默认税率为0 + body.find("[field='TaxRate']").find(input).val(0); //在商品类型加载 组装件、普通子件 var mType = body.find("[field='MType']"); var rowListLength = mType.find(input).closest(".datagrid-row").attr("datagrid-row-index"); diff --git a/erp_web/pages/reports/buy_in_report.html b/erp_web/pages/reports/buy_in_report.html index 61da9b72..b026aa66 100644 --- a/erp_web/pages/reports/buy_in_report.html +++ b/erp_web/pages/reports/buy_in_report.html @@ -101,7 +101,7 @@ pageSize: 10, pageList: [10, 50, 100], columns: [[ - {title: '名称', field: 'MaterialName', width: 60}, + {title: '名称', field: 'MaterialName', width: 160}, {title: '型号', field: 'MaterialModel', width: 80}, {title: '扩展信息', field: 'MaterialOther', width: 150}, {title: '单位', field: 'MaterialUnit', width: 80, diff --git a/erp_web/pages/reports/sale_out_report.html b/erp_web/pages/reports/sale_out_report.html index 110e5ea8..331a958e 100644 --- a/erp_web/pages/reports/sale_out_report.html +++ b/erp_web/pages/reports/sale_out_report.html @@ -104,7 +104,7 @@ pageSize: 10, pageList: [10, 50, 100], columns: [[ - {title: '名称', field: 'MaterialName', width: 60}, + {title: '名称', field: 'MaterialName', width: 160}, {title: '型号', field: 'MaterialModel', width: 80}, {title: '扩展信息', field: 'MaterialOther', width: 150}, {title: '单位', field: 'MaterialUnit', width: 80, diff --git a/erp_web/pages/reports/stock_warning_report.html b/erp_web/pages/reports/stock_warning_report.html index df9abf5a..4d46a204 100644 --- a/erp_web/pages/reports/stock_warning_report.html +++ b/erp_web/pages/reports/stock_warning_report.html @@ -203,7 +203,7 @@ pageSize: 10, pageList: [10, 50, 100], columns: [[ - {title: '名称', field: 'materialName', width: 60}, + {title: '名称', field: 'materialName', width: 160}, {title: '型号', field: 'materialModel', width: 80}, {title: '扩展信息', field: 'materialOther', width: 150}, {title: '单位', field: 'materialUnit', width: 80}, diff --git a/src/main/java/com/jsh/erp/datasource/entities/DepotHead.java b/src/main/java/com/jsh/erp/datasource/entities/DepotHead.java index 23e3a308..a64ebade 100644 --- a/src/main/java/com/jsh/erp/datasource/entities/DepotHead.java +++ b/src/main/java/com/jsh/erp/datasource/entities/DepotHead.java @@ -10,8 +10,6 @@ public class DepotHead { private String subtype; - private Long projectid; - private String defaultnumber; private String number; @@ -30,8 +28,6 @@ public class DepotHead { private BigDecimal changeamount; - private Long allocationprojectid; - private BigDecimal totalprice; private String paytype; @@ -90,14 +86,6 @@ public class DepotHead { this.subtype = subtype == null ? null : subtype.trim(); } - public Long getProjectid() { - return projectid; - } - - public void setProjectid(Long projectid) { - this.projectid = projectid; - } - public String getDefaultnumber() { return defaultnumber; } @@ -170,14 +158,6 @@ public class DepotHead { this.changeamount = changeamount; } - public Long getAllocationprojectid() { - return allocationprojectid; - } - - public void setAllocationprojectid(Long allocationprojectid) { - this.allocationprojectid = allocationprojectid; - } - public BigDecimal getTotalprice() { return totalprice; } diff --git a/src/main/java/com/jsh/erp/datasource/entities/DepotHeadExample.java b/src/main/java/com/jsh/erp/datasource/entities/DepotHeadExample.java index 83ac7bf9..98ba16be 100644 --- a/src/main/java/com/jsh/erp/datasource/entities/DepotHeadExample.java +++ b/src/main/java/com/jsh/erp/datasource/entities/DepotHeadExample.java @@ -306,66 +306,6 @@ public class DepotHeadExample { return (Criteria) this; } - public Criteria andProjectidIsNull() { - addCriterion("ProjectId is null"); - return (Criteria) this; - } - - public Criteria andProjectidIsNotNull() { - addCriterion("ProjectId is not null"); - return (Criteria) this; - } - - public Criteria andProjectidEqualTo(Long value) { - addCriterion("ProjectId =", value, "projectid"); - return (Criteria) this; - } - - public Criteria andProjectidNotEqualTo(Long value) { - addCriterion("ProjectId <>", value, "projectid"); - return (Criteria) this; - } - - public Criteria andProjectidGreaterThan(Long value) { - addCriterion("ProjectId >", value, "projectid"); - return (Criteria) this; - } - - public Criteria andProjectidGreaterThanOrEqualTo(Long value) { - addCriterion("ProjectId >=", value, "projectid"); - return (Criteria) this; - } - - public Criteria andProjectidLessThan(Long value) { - addCriterion("ProjectId <", value, "projectid"); - return (Criteria) this; - } - - public Criteria andProjectidLessThanOrEqualTo(Long value) { - addCriterion("ProjectId <=", value, "projectid"); - return (Criteria) this; - } - - public Criteria andProjectidIn(List values) { - addCriterion("ProjectId in", values, "projectid"); - return (Criteria) this; - } - - public Criteria andProjectidNotIn(List values) { - addCriterion("ProjectId not in", values, "projectid"); - return (Criteria) this; - } - - public Criteria andProjectidBetween(Long value1, Long value2) { - addCriterion("ProjectId between", value1, value2, "projectid"); - return (Criteria) this; - } - - public Criteria andProjectidNotBetween(Long value1, Long value2) { - addCriterion("ProjectId not between", value1, value2, "projectid"); - return (Criteria) this; - } - public Criteria andDefaultnumberIsNull() { addCriterion("DefaultNumber is null"); return (Criteria) this; @@ -936,66 +876,6 @@ public class DepotHeadExample { return (Criteria) this; } - public Criteria andAllocationprojectidIsNull() { - addCriterion("AllocationProjectId is null"); - return (Criteria) this; - } - - public Criteria andAllocationprojectidIsNotNull() { - addCriterion("AllocationProjectId is not null"); - return (Criteria) this; - } - - public Criteria andAllocationprojectidEqualTo(Long value) { - addCriterion("AllocationProjectId =", value, "allocationprojectid"); - return (Criteria) this; - } - - public Criteria andAllocationprojectidNotEqualTo(Long value) { - addCriterion("AllocationProjectId <>", value, "allocationprojectid"); - return (Criteria) this; - } - - public Criteria andAllocationprojectidGreaterThan(Long value) { - addCriterion("AllocationProjectId >", value, "allocationprojectid"); - return (Criteria) this; - } - - public Criteria andAllocationprojectidGreaterThanOrEqualTo(Long value) { - addCriterion("AllocationProjectId >=", value, "allocationprojectid"); - return (Criteria) this; - } - - public Criteria andAllocationprojectidLessThan(Long value) { - addCriterion("AllocationProjectId <", value, "allocationprojectid"); - return (Criteria) this; - } - - public Criteria andAllocationprojectidLessThanOrEqualTo(Long value) { - addCriterion("AllocationProjectId <=", value, "allocationprojectid"); - return (Criteria) this; - } - - public Criteria andAllocationprojectidIn(List values) { - addCriterion("AllocationProjectId in", values, "allocationprojectid"); - return (Criteria) this; - } - - public Criteria andAllocationprojectidNotIn(List values) { - addCriterion("AllocationProjectId not in", values, "allocationprojectid"); - return (Criteria) this; - } - - public Criteria andAllocationprojectidBetween(Long value1, Long value2) { - addCriterion("AllocationProjectId between", value1, value2, "allocationprojectid"); - return (Criteria) this; - } - - public Criteria andAllocationprojectidNotBetween(Long value1, Long value2) { - addCriterion("AllocationProjectId not between", value1, value2, "allocationprojectid"); - return (Criteria) this; - } - public Criteria andTotalpriceIsNull() { addCriterion("TotalPrice is null"); return (Criteria) this; diff --git a/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java b/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java index 5bd6f438..070f825a 100644 --- a/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java +++ b/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java @@ -94,6 +94,14 @@ public class DepotHeadService { } if (null != list) { for (DepotHeadVo4List dh : list) { + if(dh.getAccountidlist() != null) { + String accountidlistStr = dh.getAccountidlist().replace("[", "").replace("]", "").replaceAll("\"", ""); + dh.setAccountidlist(accountidlistStr); + } + if(dh.getAccountmoneylist() != null) { + String accountmoneylistStr = dh.getAccountmoneylist().replace("[", "").replace("]", "").replaceAll("\"", ""); + dh.setAccountmoneylist(accountmoneylistStr); + } if(dh.getOthermoneylist() != null) { String otherMoneyListStr = dh.getOthermoneylist().replace("[", "").replace("]", "").replaceAll("\"", ""); dh.setOthermoneylist(otherMoneyListStr); @@ -291,20 +299,6 @@ public class DepotHeadService { return list; } - public List getDepotHeadGiftOut(String projectId)throws Exception { - DepotHeadExample example = new DepotHeadExample(); - if (projectId != null) { - example.createCriteria().andProjectidEqualTo(Long.parseLong(projectId)); - } - List list = null; - try{ - list =depotHeadMapper.selectByExample(example); - }catch(Exception e){ - JshException.readFail(logger, e); - } - return list; - } - public List findByAll(String beginTime, String endTime, String type, Integer pid, String dids, Integer oId, Integer offset, Integer rows) throws Exception{ List list = null; try{ diff --git a/src/main/resources/mapper_xml/DepotHeadMapper.xml b/src/main/resources/mapper_xml/DepotHeadMapper.xml index 55d79306..22b68a34 100644 --- a/src/main/resources/mapper_xml/DepotHeadMapper.xml +++ b/src/main/resources/mapper_xml/DepotHeadMapper.xml @@ -5,7 +5,6 @@ - @@ -15,7 +14,6 @@ - @@ -93,11 +91,10 @@ - Id, Type, SubType, ProjectId, DefaultNumber, Number, OperPersonName, CreateTime, - OperTime, OrganId, HandsPersonId, AccountId, ChangeAmount, AllocationProjectId, TotalPrice, - PayType, Remark, Salesman, AccountIdList, AccountMoneyList, Discount, DiscountMoney, - DiscountLastMoney, OtherMoney, OtherMoneyList, OtherMoneyItem, AccountDay, Status, - LinkNumber, tenant_id, delete_Flag + Id, Type, SubType, DefaultNumber, Number, OperPersonName, CreateTime, OperTime, OrganId, + HandsPersonId, AccountId, ChangeAmount, TotalPrice, PayType, Remark, Salesman, AccountIdList, + AccountMoneyList, Discount, DiscountMoney, DiscountLastMoney, OtherMoney, OtherMoneyList, + OtherMoneyItem, AccountDay, Status, LinkNumber, tenant_id, delete_Flag - select distinct dh.*, d.name ProjectName, s.supplier OrganName, p.name HandsPersonName, a.name AccountName, dd.name AllocationProjectName + select distinct dh.*, s.supplier OrganName, p.name HandsPersonName, a.name AccountName from jsh_depothead dh - left join jsh_depot d on dh.ProjectId=d.id and ifnull(d.delete_Flag,'0') !='1' left join jsh_supplier s on dh.OrganId=s.id and ifnull(s.delete_Flag,'0') !='1' left join jsh_person p on dh.HandsPersonId=p.id and ifnull(p.delete_Flag,'0') !='1' left join jsh_account a on dh.AccountId=a.id and ifnull(a.delete_Flag,'0') !='1' - left join jsh_depot dd on dh.AllocationProjectId=dd.id and ifnull(dd.delete_Flag,'0') !='1' left join jsh_depotitem di on dh.Id = di.HeaderId and ifnull(di.delete_Flag,'0') !='1' left join jsh_material m on di.MaterialId = m.Id and ifnull(m.delete_Flag,'0') !='1' where 1=1