From a692126618ac75f339110a7cba96fda78454e96f Mon Sep 17 00:00:00 2001 From: JiilingLee <462362@qq.com> Date: Sun, 8 Oct 2023 16:22:27 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=85=83=E6=95=B0=E6=8D=AE=E4=B8=8B?= =?UTF-8?q?=E8=BD=BDresponse=E7=8A=B6=E6=80=81=E5=80=BC=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../setting/service/passwords/PasswordsServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/service/passwords/PasswordsServiceImpl.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/service/passwords/PasswordsServiceImpl.java index b478d09f..9249406a 100644 --- a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/service/passwords/PasswordsServiceImpl.java +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/service/passwords/PasswordsServiceImpl.java @@ -65,7 +65,7 @@ public class PasswordsServiceImpl implements PasswordsService { JSONObject json2 = new JSONObject(); json2.put("code", "500"); json2.put("msg", "password is null!"); - httpResponse.setStatus(500); + httpResponse.setStatus(200); PrintWriter out = httpResponse.getWriter(); // 获取PrintWriter对象 out.println(json2.toString()); out.flush(); @@ -92,7 +92,7 @@ public class PasswordsServiceImpl implements PasswordsService { JSONObject json2 = new JSONObject(); json2.put("code", "500"); json2.put("msg", "passwordError!"); - httpResponse.setStatus(500); + httpResponse.setStatus(200); PrintWriter out = httpResponse.getWriter(); // 获取PrintWriter对象 out.println(json2.toString()); out.flush(); From f5aa78f655fbb99fd67a964091dffd16866fe50b Mon Sep 17 00:00:00 2001 From: JiilingLee <462362@qq.com> Date: Sun, 8 Oct 2023 16:52:15 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=87=AD=E8=AF=81=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=AD=97=E5=85=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/accounting20230920JilingLee.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sql/accounting20230920JilingLee.sql b/sql/accounting20230920JilingLee.sql index 94c93b81..75c9d63d 100644 --- a/sql/accounting20230920JilingLee.sql +++ b/sql/accounting20230920JilingLee.sql @@ -112,3 +112,13 @@ INSERT INTO `lyr-one`.`system_menu`(`id`, `name`, `permission`, `type`, `sort`, INSERT INTO `lyr-one`.`system_menu`(`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (NULL, '会计凭证更新', 'accounting:voucher:update', 3, 3, @menuId2, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-09-19 14:33:30', '', '2023-09-19 14:33:30', b'0'); INSERT INTO `lyr-one`.`system_menu`(`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (NULL, '会计凭证删除', 'accounting:voucher:delete', 3, 4, @menuId2, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-09-19 14:33:30', '', '2023-09-19 14:33:30', b'0'); INSERT INTO `lyr-one`.`system_menu`(`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (NULL, '会计凭证导出', 'accounting:voucher:export', 3, 5, @menuId2, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-09-19 14:33:30', '', '2023-09-19 14:33:30', b'0'); + + +-- 会计凭证类型字典 +INSERT INTO `lyr-one`.`system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (NULL, '会计凭证类型', 'accounting_voucher_type', 0, NULL, '', '2023-10-08 16:37:57', '', '2023-10-08 16:37:57', b'0', '1970-01-01 00:00:00'); + +INSERT INTO `lyr-one`.`system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (NULL, 0, '销售凭证', 'salesVoucher', 'accounting_voucher_type', 0, 'default', '', NULL, '', '2023-10-08 16:39:13', '', '2023-10-08 16:39:13', b'0'); +INSERT INTO `lyr-one`.`system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (NULL, 0, '总账凭证', 'generalVouchers', 'accounting_voucher_type', 0, 'default', '', NULL, '', '2023-10-08 16:41:27', '', '2023-10-08 16:41:27', b'0'); +INSERT INTO `lyr-one`.`system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (NULL, 0, '转账凭证', 'transferVoucher', 'accounting_voucher_type', 0, 'default', '', NULL, '', '2023-10-08 16:45:52', '', '2023-10-08 16:45:52', b'0'); +INSERT INTO `lyr-one`.`system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (NULL, 0, '付款凭证', 'paymentVoucher', 'accounting_voucher_type', 0, 'default', '', NULL, '', '2023-10-08 16:46:36', '', '2023-10-08 16:46:36', b'0'); +INSERT INTO `lyr-one`.`system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (NULL, 0, '收款凭证', 'receiptVoucher', 'accounting_voucher_type', 0, 'default', '', NULL, '', '2023-10-08 16:47:04', '', '2023-10-08 16:47:04', b'0'); From 21e3f430db8e40c47720416a38c10a455c854c43 Mon Sep 17 00:00:00 2001 From: JiilingLee <462362@qq.com> Date: Sun, 8 Oct 2023 17:51:48 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E7=AB=8B=E6=A1=A3=E5=8D=95=E4=BD=8D-?= =?UTF-8?q?=E5=BA=93=E6=88=BF-=E6=A1=A3=E6=A1=88=E6=9F=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../setting/dal/mysql/depot/DepotMapper.java | 2 +- .../organization/OrganizationMapper.java | 19 ++++++++----------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/dal/mysql/depot/DepotMapper.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/dal/mysql/depot/DepotMapper.java index 4995a773..bcf7517a 100644 --- a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/dal/mysql/depot/DepotMapper.java +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/dal/mysql/depot/DepotMapper.java @@ -60,7 +60,7 @@ public interface DepotMapper extends BaseMapperX { @Select("SELECT d.id AS depotId, d.name AS depotName, d.code AS depotCode, " + "c.id AS cabinetId, c.name AS cabinetName, c.code AS cabinetCode " + "FROM setting_depot d " + - "JOIN setting_depot_cabinet c ON d.id = c.depot_id " + + "LEFT JOIN setting_depot_cabinet c ON d.id = c.depot_id " + "WHERE d.organization_id = #{organizationId}") @Results({ @Result(property = "depotId", column = "depotId"), diff --git a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/dal/mysql/organization/OrganizationMapper.java b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/dal/mysql/organization/OrganizationMapper.java index 6b3ab6e3..e29d9c22 100644 --- a/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/dal/mysql/organization/OrganizationMapper.java +++ b/yudao-module-setting/yudao-module-setting-biz/src/main/java/cn/iocoder/yudao/module/setting/dal/mysql/organization/OrganizationMapper.java @@ -48,19 +48,16 @@ public interface OrganizationMapper extends BaseMapperX { .orderByDesc(OrganizationDO::getId)); } - @Select("SELECT o.id AS organizationId, o.organization_name AS organizationName, o.organization_code AS organizationCode, " + - "d.id AS depotId, d.name AS depotName, d.code AS depotCode, " + - "c.id AS cabinetId, c.name AS cabinetName, c.code AS cabinetCode " + - "FROM setting_organization o " + - "LEFT JOIN setting_depot d ON o.id = d.organization_id " + - "LEFT JOIN setting_depot_cabinet c ON d.id = c.depot_id ") - @Results({ - @Result(property = "organizationId", column = "organizationId"), + @Select("SELECT o.id AS organizationId, o.organization_name AS organizationName, o.organization_code AS organizationCode, " + + "d.id AS depotId, d.name AS depotName, d.code AS depotCode, " + + "IFNULL(c.id, '') AS cabinetId, IFNULL(c.name, '') AS cabinetName, IFNULL(c.code, '') AS cabinetCode " + + "FROM setting_organization o " + + "LEFT JOIN setting_depot d ON o.id = d.organization_id " + + "LEFT JOIN setting_depot_cabinet c ON d.id = c.depot_id ") + @Results({ @Result(property = "organizationId", column = "organizationId"), @Result(property = "organizationName", column = "organizationName"), @Result(property = "organizationCode", column = "organizationCode"), - @Result(property = "children", column = "organizationId",javaType = List.class, - many=@Many(select="cn.iocoder.yudao.module.setting.dal.mysql.depot.DepotMapper.getDepotCabinetByOrganization")) - }) + @Result(property = "children", column = "organizationId",javaType = List.class, many=@Many(select="cn.iocoder.yudao.module.setting.dal.mysql.depot.DepotMapper.getDepotCabinetByOrganization")) }) List getOrganizationDepotCabinets(); }