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'); 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(); } 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();