diff --git a/jshERP-boot/docs/jsh_erp.sql b/jshERP-boot/docs/jsh_erp.sql index b5e6bbc6..fb266763 100644 --- a/jshERP-boot/docs/jsh_erp.sql +++ b/jshERP-boot/docs/jsh_erp.sql @@ -10,7 +10,7 @@ Target Server Type : MYSQL Target Server Version : 50704 File Encoding : 65001 -Date: 2021-06-30 01:09:37 +Date: 2021-07-02 00:26:31 */ SET FOREIGN_KEY_CHECKS=0; @@ -411,6 +411,7 @@ CREATE TABLE `jsh_material` ( `color` varchar(50) DEFAULT NULL COMMENT '颜色', `unit` varchar(50) DEFAULT NULL COMMENT '单位-单个', `remark` varchar(100) DEFAULT NULL COMMENT '备注', + `img_name` varchar(500) DEFAULT NULL COMMENT '图片名称', `unit_id` bigint(20) DEFAULT NULL COMMENT '计量单位Id', `enabled` bit(1) DEFAULT NULL COMMENT '启用 0-禁用 1-启用', `other_field1` varchar(50) DEFAULT NULL COMMENT '自定义1', @@ -427,14 +428,14 @@ CREATE TABLE `jsh_material` ( -- ---------------------------- -- Records of jsh_material -- ---------------------------- -INSERT INTO `jsh_material` VALUES ('568', '17', '商品1', '制1', '100.000000', 'sp1', '', '', '个', '', null, '', '', '', '', '0', '63', '0'); -INSERT INTO `jsh_material` VALUES ('569', '17', '商品2', '', '200.000000', 'sp2', '', '', '只', '', null, '', '', '', '', '0', '63', '0'); -INSERT INTO `jsh_material` VALUES ('570', '17', '商品3', '', '300.000000', 'sp3', '', '', '个', '', null, '', '', '', '', '0', '63', '0'); -INSERT INTO `jsh_material` VALUES ('577', null, '商品8', '', null, 'sp8', '', '', '', '', '15', '', '', '', '', '0', '63', '0'); -INSERT INTO `jsh_material` VALUES ('579', '21', '商品17', '', null, 'sp17', '', '', '', '', '15', '', '', '', '', '0', '63', '0'); -INSERT INTO `jsh_material` VALUES ('586', '17', '序列号商品测试', '', null, 'xlh123', '', '', '个', '', null, '', '', '', '', '1', '63', '0'); -INSERT INTO `jsh_material` VALUES ('587', '17', '商品test1', '南通中远', null, '', 'test1', '', '个', '', null, '', '', '', '', '0', '63', '0'); -INSERT INTO `jsh_material` VALUES ('588', '21', '商品200', 'fafda', '112.000000', 'weqwe', '300ml', '红色', '个', 'aaaabbbbb', null, '', '', '', '', '0', '63', '0'); +INSERT INTO `jsh_material` VALUES ('568', '17', '商品1', '制1', '100.000000', 'sp1', '', '', '个', '', null, null, '', '', '', '', '0', '63', '0'); +INSERT INTO `jsh_material` VALUES ('569', '17', '商品2', '', '200.000000', 'sp2', '', '', '只', '', null, null, '', '', '', '', '0', '63', '0'); +INSERT INTO `jsh_material` VALUES ('570', '17', '商品3', '', '300.000000', 'sp3', '', '', '个', '', null, null, '', '', '', '', '0', '63', '0'); +INSERT INTO `jsh_material` VALUES ('577', null, '商品8', '', null, 'sp8', '', '', '', '', null, '15', '', '', '', '', '0', '63', '0'); +INSERT INTO `jsh_material` VALUES ('579', '21', '商品17', '', null, 'sp17', '', '', '', '', null, '15', '', '', '', '', '0', '63', '0'); +INSERT INTO `jsh_material` VALUES ('586', '17', '序列号商品测试', '', null, 'xlh123', '', '', '个', '', null, null, '', '', '', '', '1', '63', '0'); +INSERT INTO `jsh_material` VALUES ('587', '17', '商品test1', '南通中远', null, '', 'test1', '', '个', '', null, null, '', '', '', '', '0', '63', '0'); +INSERT INTO `jsh_material` VALUES ('588', '21', '商品200', 'fafda', '112.000000', 'weqwe', '300ml', '红色', '个', 'aaaabbbbb', null, null, '', '', '', '', '0', '63', '0'); -- ---------------------------- -- Table structure for jsh_material_category diff --git a/jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt b/jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt index 49c3bf78..6265ba3f 100644 --- a/jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt +++ b/jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt @@ -1111,4 +1111,11 @@ alter table jsh_account_item add need_debt decimal(24,6) DEFAULT NULL COMMENT ' alter table jsh_account_item add finish_debt decimal(24,6) DEFAULT NULL COMMENT '已收欠款' after need_debt; alter table jsh_depot_head add file_name varchar(500) DEFAULT NULL COMMENT '附件名称' after remark; alter table jsh_account_head add file_name varchar(500) DEFAULT NULL COMMENT '附件名称' after remark; -alter table jsh_account_head add discount_money decimal(24,6) DEFAULT NULL COMMENT '优惠金额' after change_amount; \ No newline at end of file +alter table jsh_account_head add discount_money decimal(24,6) DEFAULT NULL COMMENT '优惠金额' after change_amount; + +-- -------------------------------------------------------- +-- 时间 2021年7月1日 +-- by jishenghua +-- 给商品表增加附件名称字段 +-- -------------------------------------------------------- +alter table jsh_material add img_name varchar(500) DEFAULT NULL COMMENT '图片名称' after remark; \ No newline at end of file diff --git a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/Material.java b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/Material.java index 361be174..ebd0397d 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/Material.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/Material.java @@ -23,6 +23,8 @@ public class Material { private String remark; + private String imgName; + private Long unitId; private Boolean enabled; @@ -119,6 +121,14 @@ public class Material { this.remark = remark == null ? null : remark.trim(); } + public String getImgName() { + return imgName; + } + + public void setImgName(String imgName) { + this.imgName = imgName == null ? null : imgName.trim(); + } + public Long getUnitId() { return unitId; } diff --git a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/MaterialExample.java b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/MaterialExample.java index d6338401..4b0a6865 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/MaterialExample.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/MaterialExample.java @@ -775,6 +775,76 @@ public class MaterialExample { return (Criteria) this; } + public Criteria andImgNameIsNull() { + addCriterion("img_name is null"); + return (Criteria) this; + } + + public Criteria andImgNameIsNotNull() { + addCriterion("img_name is not null"); + return (Criteria) this; + } + + public Criteria andImgNameEqualTo(String value) { + addCriterion("img_name =", value, "imgName"); + return (Criteria) this; + } + + public Criteria andImgNameNotEqualTo(String value) { + addCriterion("img_name <>", value, "imgName"); + return (Criteria) this; + } + + public Criteria andImgNameGreaterThan(String value) { + addCriterion("img_name >", value, "imgName"); + return (Criteria) this; + } + + public Criteria andImgNameGreaterThanOrEqualTo(String value) { + addCriterion("img_name >=", value, "imgName"); + return (Criteria) this; + } + + public Criteria andImgNameLessThan(String value) { + addCriterion("img_name <", value, "imgName"); + return (Criteria) this; + } + + public Criteria andImgNameLessThanOrEqualTo(String value) { + addCriterion("img_name <=", value, "imgName"); + return (Criteria) this; + } + + public Criteria andImgNameLike(String value) { + addCriterion("img_name like", value, "imgName"); + return (Criteria) this; + } + + public Criteria andImgNameNotLike(String value) { + addCriterion("img_name not like", value, "imgName"); + return (Criteria) this; + } + + public Criteria andImgNameIn(List values) { + addCriterion("img_name in", values, "imgName"); + return (Criteria) this; + } + + public Criteria andImgNameNotIn(List values) { + addCriterion("img_name not in", values, "imgName"); + return (Criteria) this; + } + + public Criteria andImgNameBetween(String value1, String value2) { + addCriterion("img_name between", value1, value2, "imgName"); + return (Criteria) this; + } + + public Criteria andImgNameNotBetween(String value1, String value2) { + addCriterion("img_name not between", value1, value2, "imgName"); + return (Criteria) this; + } + public Criteria andUnitIdIsNull() { addCriterion("unit_id is null"); return (Criteria) this; diff --git a/jshERP-boot/src/main/java/com/jsh/erp/service/accountHead/AccountHeadService.java b/jshERP-boot/src/main/java/com/jsh/erp/service/accountHead/AccountHeadService.java index 33a6a281..f8fcb2d1 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/service/accountHead/AccountHeadService.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/service/accountHead/AccountHeadService.java @@ -18,7 +18,6 @@ import com.jsh.erp.utils.StringUtil; import com.jsh.erp.utils.Tools; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.context.request.RequestContextHolder; @@ -50,8 +49,6 @@ public class AccountHeadService { private LogService logService; @Resource private AccountItemMapperEx accountItemMapperEx; - @Value(value="${file.path}") - private String filePath; public AccountHead getAccountHead(long id) throws Exception { AccountHead result=null; diff --git a/jshERP-boot/src/main/java/com/jsh/erp/service/accountItem/AccountItemService.java b/jshERP-boot/src/main/java/com/jsh/erp/service/accountItem/AccountItemService.java index 42218f06..3957e629 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/service/accountItem/AccountItemService.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/service/accountItem/AccountItemService.java @@ -257,6 +257,6 @@ public class AccountItemService { } public BigDecimal getEachAmountByBillId(Long billId) { - return accountItemMapperEx.getEachAmountByBillId(billId); + return accountItemMapperEx.getEachAmountByBillId(billId).abs(); } } diff --git a/jshERP-boot/src/main/resources/mapper_xml/MaterialMapper.xml b/jshERP-boot/src/main/resources/mapper_xml/MaterialMapper.xml index d2227d5f..9b3b32f5 100644 --- a/jshERP-boot/src/main/resources/mapper_xml/MaterialMapper.xml +++ b/jshERP-boot/src/main/resources/mapper_xml/MaterialMapper.xml @@ -12,6 +12,7 @@ + @@ -81,7 +82,7 @@ id, category_id, name, mfrs, safety_stock, model, standard, color, unit, remark, - unit_id, enabled, other_field1, other_field2, other_field3, enable_serial_number, + img_name, unit_id, enabled, other_field1, other_field2, other_field3, enable_serial_number, tenant_id, delete_flag