ソースを参照

ユーザ管理

quyx@nextosd.com 2 ヶ月 前
コミット
08751c604b

+ 49 - 6
new-react-admin-ui/src/adapters/ruoyiDataProvider.ts

@@ -1,4 +1,4 @@
-import { DataProvider, GetListParams, GetListResult, GetOneParams, GetOneResult, CreateParams, CreateResult, UpdateParams, UpdateResult, DeleteParams, DeleteResult, GetManyParams, GetManyResult } from 'react-admin';
+import { DataProvider, GetListParams, GetListResult, GetOneParams, GetOneResult, CreateParams, CreateResult, UpdateParams, UpdateResult, DeleteParams, DeleteResult, GetManyParams, GetManyResult,DeleteManyParams,DeleteManyResult } from 'react-admin';
 import { 
   UserPageResult, 
   RolePageResult, 
@@ -286,6 +286,31 @@ export const ruoyiDataProvider: RuoyiDataProvider = {
           total: data.total,
         };
       }
+
+      case 'generations': {
+        const data = await request<any>(`/label/generations/list?${queryParams}`);
+        const formattedData = data.rows.map((item: any) => ({
+          ...item,
+          id: item.id
+        }));
+        return {
+          data: formattedData,
+          total: data.total,
+        };
+      }
+
+       case 'usermanagements': {
+        const data = await request<UserPageResult>(`/label/user/list?${queryParams}`);
+        // 将userId映射为id,以满足React Admin的数据格式要求
+        const formattedData = data.rows.map((item: any) => ({
+          ...item,
+          id: item.userId
+        }));
+        return {
+          data: formattedData,
+          total: data.total,
+        };
+      }
       
       default:
         throw new Error(`Resource ${resource} not supported`);
@@ -404,7 +429,7 @@ export const ruoyiDataProvider: RuoyiDataProvider = {
         const requestData = {
           ...params.data,
         };
-        const data = await request<Result>(`/system/user`, {
+        const data = await request<Result>(`/label/user`, {
           method: 'POST',
           body: JSON.stringify(requestData),
         });
@@ -473,7 +498,7 @@ export const ruoyiDataProvider: RuoyiDataProvider = {
         const requestData = {
           ...params.data,
         };
-        await request<Result>(`/system/user`, {
+        await request<Result>(`/label/user`, {
           method: 'PUT',
           body: JSON.stringify(requestData),
         });
@@ -527,6 +552,15 @@ export const ruoyiDataProvider: RuoyiDataProvider = {
           data: params.previousData,
         };
       }
+
+      case 'usermanagements': {
+        await request<Result>(`/label/user/${params.id}`, {
+          method: 'DELETE',
+        });
+        return {
+          data: params.previousData,
+        };
+      }
       
 
       
@@ -611,9 +645,18 @@ export const ruoyiDataProvider: RuoyiDataProvider = {
     throw new Error('updateMany not implemented');
   },
 
-  deleteMany: async () => {
-    throw new Error('deleteMany not implemented');
-  },
+  deleteMany: async (resource: string, params: DeleteManyParams): Promise<DeleteManyResult> => {
+    switch (resource) {
+     case 'generations':
+      await request<Result>(`/label/generations/${params.ids.join(',')}`, {
+        method: 'DELETE'
+      });
+      return { data: params.ids };
+    
+    default:
+     throw new Error('deleteMany not implemented');
+  }
+},
 
   // 自定义方法 - 获取字典数据
   getDictData: async (dictType: string) => {

+ 15 - 23
new-react-admin-ui/src/pages/generations/LabelGenerationList.tsx

@@ -163,14 +163,6 @@ export const LabelGenerationList = () => {
        padding: 5px 20px;
        cursor: pointer;
      }
-     .search-btn {
-       background-color: #000;
-       color: #fff;
-       border: none;
-       padding: 5px 40px;
-       cursor: pointer;
-       margin-left: 0;
-     }
      .cancel-btn {
        background-color: #000;
        color: #fff;
@@ -225,7 +217,8 @@ export const LabelGenerationList = () => {
         creationDate: formatDateForBackend() 
       };
 
-      const response = await dataProvider.getList('label/generations', {
+      const response = await dataProvider.getList('generations', {
+        pagination: { page: 1, perPage: 100 }, 
         filter: queryParams
       });
 
@@ -256,6 +249,15 @@ export const LabelGenerationList = () => {
     fetchData();
   }, []);
 
+  // 监听所有查询条件变化,自动触发检索(添加300ms延迟防止频繁请求)
+  useEffect(() => {
+    const timer = setTimeout(() => {
+      fetchData();
+    }, 300);
+
+    return () => clearTimeout(timer);
+  }, [selectedDept, selectedArea, selectedHour, baseCode, baseName, creationDate]);
+
   // 构建列定义
   const columnDefs: (ColDef | ColGroupDef)[] = useMemo(() => {
     const baseColumns: ColDef[] = [
@@ -366,7 +368,7 @@ export const LabelGenerationList = () => {
               setSelectedRows(prev => 
                 e.target.checked 
                   ? [...prev, currentRow] 
-                  : prev.filter(row => row!== currentRow)
+                  : prev.filter(row => row !== currentRow)
               );
             };
 
@@ -404,9 +406,9 @@ export const LabelGenerationList = () => {
 
     try {
       const ids = selectedRows.map(row => row.id);
-      await dataProvider.deleteMany('label/generations', { ids });
+      await dataProvider.deleteMany('generations', { ids });
       
-      setRowData(prev => prev.filter(row =>!selectedRows.includes(row)));
+      setRowData(prev => prev.filter(row => !selectedRows.includes(row)));
       setSelectedRows([]);
       alert(`${selectedRows.length}件のデータを削除しました`);
     } catch (error) {
@@ -489,16 +491,6 @@ export const LabelGenerationList = () => {
               <span>時台</span>
             </div>
           </div>
-          
-          <div className="form-row">
-            <button 
-              type="button" 
-              className="search-btn"
-              onClick={fetchData}
-            >
-              検索
-            </button>
-          </div>
         </form>
       </div>
       
@@ -508,7 +500,7 @@ export const LabelGenerationList = () => {
         <button 
           className="correction-btn" 
           onClick={() => setIsEditMode(true)}
-          style={{ display: isEditMode? 'none' : 'block', marginLeft: 'auto' }}
+          style={{ display: isEditMode ? 'none' : 'block', marginLeft: 'auto' }}
         >
           実績値修正
         </button>

+ 40 - 29
new-react-admin-ui/src/pages/usermanagements/UserManagementsList.tsx

@@ -163,15 +163,15 @@ export const usermanagementsList = () => {
   const fetchUserList = async () => {
     setLoading(true);
     try {
-      const response = await dataProvider.getList('users', {
+      const response = await dataProvider.getList('usermanagements', {
+        pagination: { page: 1, perPage: 9999 },
         filter: {}
       });
       
       const formattedData = response.data.map((user: any) => ({
         userId: user.userId || '',
         password: user.password || '',
-        userName: user.userName || '',
-        id: user.id || user.userId 
+        userNm: user.userNm || '',
       }));
       
       setRowData(formattedData);
@@ -200,7 +200,7 @@ export const usermanagementsList = () => {
     setIsEditing(false);
     setEditingData({
       userId: '',
-      userName: '',
+      userNm: '',
       password: ''
     });
   };
@@ -209,11 +209,11 @@ export const usermanagementsList = () => {
   const handleDelete = async (data: any) => {
     if (isDeleting) return; 
     
-    if (window.confirm(`确定要删除用户 ${data.userName} (${data.userId}) 吗?`)) {
+    if (window.confirm(`确定要删除用户 ${data.userNm} (${data.userId}) 吗?`)) {
       setIsDeleting(true);
       try {
-        await dataProvider.delete('users', {
-          id: data.id || data.userId,
+        await dataProvider.delete('usermanagements', {
+          id: data.userId,
           previousData: data
         });
         setRowData(prev => prev.filter(row => row.userId !== data.userId));
@@ -247,7 +247,7 @@ export const usermanagementsList = () => {
       const updateParams = {
         ...originalUser, 
         ...editingData,
-        id: originalUser.id || originalUser.userId
+        id: originalUser.userId
       };
 
       await dataProvider.update('usermanagements', {
@@ -268,26 +268,26 @@ export const usermanagementsList = () => {
   // 保存新增用户
   const handleAddSave = async () => {
     try {
-      if (!editingData.userId || !editingData.userName || !editingData.password) {
+
+       if (!editingData.userId || !editingData.userNm || !editingData.password) {
         alert("ユーザID、ユーザ名及びパスワードは必須です");
         return;
       }
+      
+      // 验证ユーザID是否为正整数
+      if (!/^\d+$/.test(editingData.userId) || parseInt(editingData.userId) <= 0) {
+        alert("ユーザIDは正の整数で入力してください");
+        return;
+      }
 
       const newUser = {
         ...editingData,
-        nickName: editingData.userName,
-        userType: '0',
-        email: '',
-        phonenumber: '',
-        sex: '0',
-        avatar: '',
-        status: '0',
-        delFlag: '0',
-        loginIp: '',
-        createBy: '',
-        updateBy: '',
-        remark: '',
-        id: editingData.userId
+        haisiFlg: '0',
+        haisiDt: '',
+        insSyainCd: '',
+        insPgId: '',
+        updSyainCd: '',
+        updPgId: '',
       };
 
       await dataProvider.create('usermanagements', {
@@ -303,6 +303,12 @@ export const usermanagementsList = () => {
     }
   };
 
+  // 处理ユーザID输入变化,只允许输入数字
+  const handleUserIdChange = (e: React.ChangeEvent<HTMLInputElement>) => {
+    const value = e.target.value.replace(/\D/g, '');
+    setEditingData({...editingData, userId: value});
+  };
+
   // 表格列定义
    const columnDefs: ColDef[] = [
     {
@@ -316,7 +322,7 @@ export const usermanagementsList = () => {
       minWidth: 100,
     },
     {
-      field: "userName",
+      field: "userNm",
       headerClass: "header-center",
       headerName: "ユーザ名",
       cellRenderer: (params: ICellRendererParams) => (
@@ -381,14 +387,15 @@ export const usermanagementsList = () => {
               type="text" 
               value={editingData.userId || ''}
               onChange={(e) => setEditingData({...editingData, userId: e.target.value})}
-              disabled={!!editingData.userId}
+              disabled
             />
           <br/>
           <label>ユーザ名</label>
           <input 
               type="text" 
-              value={editingData.userName || ''}
-              onChange={(e) => setEditingData({...editingData, userName: e.target.value})}
+              value={editingData.userNm || ''}
+              onChange={(e) => setEditingData({...editingData, userNm: e.target.value})}
+              maxLength={50}
             />
           <br/>
           <label>パスワード</label>
@@ -396,6 +403,7 @@ export const usermanagementsList = () => {
               type="password" 
               value={editingData.password || ''}
               onChange={(e) => setEditingData({...editingData, password: e.target.value})}
+              maxLength={8}
             />
           <button className="issue-button" style={{ marginLeft: '30px' }}>発行</button>
           <div className="user-edit-buttons">
@@ -413,16 +421,18 @@ export const usermanagementsList = () => {
           <input 
               type="text" 
               value={editingData.userId || ''}
-              onChange={(e) => setEditingData({...editingData, userId: e.target.value})}
+              onChange={handleUserIdChange}
               placeholder=""
+              maxLength={6}
             />
           <br/>
           <label>ユーザ名</label>
           <input 
               type="text" 
-              value={editingData.userName || ''}
-              onChange={(e) => setEditingData({...editingData, userName: e.target.value})}
+              value={editingData.userNm || ''}
+              onChange={(e) => setEditingData({...editingData, userNm: e.target.value})}
               placeholder=""
+              maxLength={50}
             />
           <br/>
           <label>パスワード</label>
@@ -431,6 +441,7 @@ export const usermanagementsList = () => {
               value={editingData.password || ''}
               onChange={(e) => setEditingData({...editingData, password: e.target.value})}
               placeholder=""
+              maxLength={8}
             />
           <button className="issue-button" style={{ marginLeft: '30px' }}>発行</button>
           <div className="user-edit-buttons">

+ 73 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TUserController.java

@@ -0,0 +1,73 @@
+package com.ruoyi.web.controller.system;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.system.domain.TUser;
+import com.ruoyi.system.service.ITUserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 用户信息
+ * 
+ * @author ruoyi
+ */
+@RestController
+@RequestMapping("/label/user")
+public class TUserController extends BaseController
+{
+    @Autowired
+    private ITUserService userService;
+
+    /**
+     * 获取用户列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(TUser user)
+    {
+        startPage();
+        List<TUser> list = userService.selectUserList(user);
+        return getDataTable(list);
+    }
+
+    /**
+     * 新增用户
+     */
+    @Log(title = "ユーザ管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated @RequestBody TUser user)
+    {
+        user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
+        return toAjax(userService.insertUser(user));
+    }
+
+    /**
+     * 修改用户
+     */
+    @Log(title = "ユーザ管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody TUser user)
+    {
+        user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
+        return toAjax(userService.updateUser(user));
+    }
+
+    /**
+     * 删除用户
+     */
+    @Log(title = "ユーザ管理", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{userIds}")
+    public AjaxResult remove(@PathVariable String[] userIds)
+    {
+        return toAjax(userService.deleteUserByIds(userIds));
+    }
+
+
+}

+ 49 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/YmdfSurveyController.java

@@ -0,0 +1,49 @@
+package com.ruoyi.web.controller.system;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.domain.YmdfSurvey;
+import com.ruoyi.system.service.IYmdfSurveyService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 調査アンケート主(時間制御と状態管理を含む)Controller
+ * 
+ * @author ruoyi
+ * @date 2025-06-27
+ */
+@RestController
+@RequestMapping("/label/generations")
+public class YmdfSurveyController extends BaseController
+{
+    @Autowired
+    private  IYmdfSurveyService ymdfSurveyService;
+    /**
+     * 查询調査アンケート主(時間制御と状態管理を含む)列表
+     */
+    @PreAuthorize("@ss.hasPermi('label:generation:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(YmdfSurvey ymdfSurvey)
+    {
+        startPage();
+        List<YmdfSurvey> list = ymdfSurveyService.selectYmdfSurveyList(ymdfSurvey);
+        return getDataTable(list);
+    }
+    /**
+     * 删除調査アンケート主(時間制御と状態管理を含む)
+     */
+    @PreAuthorize("@ss.hasPermi('system:survey:remove')")
+    @Log(title = "調査アンケート主(時間制御と状態管理を含む)", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable String[] ids)
+    {
+        return toAjax(ymdfSurveyService.deleteYmdfSurveyByIds(ids));
+    }
+}

+ 5 - 0
ruoyi-system/pom.xml

@@ -22,6 +22,11 @@
             <groupId>com.ruoyi</groupId>
             <artifactId>ruoyi-common</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <scope>provided</scope>
+        </dependency>
 
     </dependencies>
 

+ 64 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/TUser.java

@@ -0,0 +1,64 @@
+package com.ruoyi.system.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.core.domain.BaseEntity;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serial;
+import java.util.Date;
+
+
+/**
+ * 調査アンケート主(時間制御と状態管理を含む)对象 t_user
+ *
+ * @author ruoyi
+ * @date 2025-11-26
+ */
+@EqualsAndHashCode(callSuper = true)
+@Getter
+@Setter
+public class TUser extends BaseEntity
+{
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /** ユーザID */
+    private String userId;
+
+    /** ユーザ名 */
+    private String userNm;
+
+    /** パスワード */
+    private String password;
+
+    /** 廃止フラグ */
+    private String haisiFlg;
+
+    /** 廃止日 */
+    private String haisiDt;
+
+    /** 登録日時 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date insDt;
+
+    /** 登録社員コード */
+    private String insSyainCd;
+
+    /**登録プログラムID */
+    private String insPgId;
+
+    /** 更新日時 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date updDt;
+
+    /** 更新社員コード */
+    private String updSyainCd;
+
+    /** 更新プログラムID */
+    private String updPgId;
+}

+ 59 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/YmdfSurvey.java

@@ -0,0 +1,59 @@
+package com.ruoyi.system.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.core.domain.BaseEntity;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serial;
+import java.util.Date;
+
+
+/**
+ * 調査アンケート主(時間制御と状態管理を含む)对象 ymdf_survey
+ *
+ * @author ruoyi
+ * @date 2025-06-27
+ */
+@EqualsAndHashCode(callSuper = true)
+@Getter
+@Setter
+public class YmdfSurvey extends BaseEntity
+{
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /** 部名ID */
+    private Long id;
+
+    /** 部名 */
+    private String depName;
+
+    /** 地区名 */
+    private String regName;
+
+    /** 拠点コード */
+    private String baseCode;
+
+    /** 拠点名 */
+    private String baseName;
+
+    /** 郵便番号 */
+    private String zipCode;
+
+    /** 送り状番号 */
+    private String inNumber;
+
+    /** 生成日時 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date creationDate;
+
+    /**実施者 */
+    private String implementation;
+
+    /** 仕分け番号(ヤマト運輸) */
+    private String classNumber;
+}

+ 47 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TUserMapper.java

@@ -0,0 +1,47 @@
+package com.ruoyi.system.mapper;
+
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.system.domain.TUser;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 用户表 数据层
+ * 
+ * @author ruoyi
+ */
+public interface TUserMapper
+{
+    /**
+     * 根据条件分页查询用户列表
+     * 
+     * @param tUser 用户信息
+     * @return 用户信息集合信息
+     */
+    public List<TUser> selectUserList(TUser tUser);
+
+    /**
+     * 新增用户信息
+     * 
+     * @param user 用户信息
+     * @return 结果
+     */
+    public int insertUser(TUser user);
+
+    /**
+     * 修改用户信息
+     * 
+     * @param user 用户信息
+     * @return 结果
+     */
+    public int updateUser(TUser user);
+
+    /**
+     * 批量删除用户信息
+     *
+     * @param userIds 需要删除的用户ID
+     * @return 结果
+     */
+    public int deleteUserByIds(String[] userIds);
+}

+ 33 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/YmdfSurveyMapper.java

@@ -0,0 +1,33 @@
+package com.ruoyi.system.mapper;
+
+import com.ruoyi.system.domain.*;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 調査アンケート主(時間制御と状態管理を含む)Mapper接口
+ *
+ * @author yamada-denki
+ * @date 2025-06-27
+ */
+@Mapper
+public interface YmdfSurveyMapper
+{
+
+    /**
+     * 查询調査アンケート主(時間制御と状態管理を含む)列表
+     *
+     * @param ymdfSurvey 調査アンケート主(時間制御と状態管理を含む)
+     * @return 調査アンケート主(時間制御と状態管理を含む)集合
+     */
+     List<YmdfSurvey> selectYmdfSurveyList(YmdfSurvey ymdfSurvey);
+
+    /**
+     * 批量删除調査アンケート主(時間制御と状態管理を含む)
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteYmdfSurveyByIds(String[] ids);
+}

+ 46 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/ITUserService.java

@@ -0,0 +1,46 @@
+package com.ruoyi.system.service;
+
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.system.domain.TUser;
+
+import java.util.List;
+
+/**
+ * 用户 业务层
+ * 
+ * @author ruoyi
+ */
+public interface ITUserService
+{
+    /**
+     * 根据条件分页查询用户列表
+     * 
+     * @param user 用户信息
+     * @return 用户信息集合信息
+     */
+    public List<TUser> selectUserList(TUser user);
+
+    /**
+     * 新增用户信息
+     * 
+     * @param user 用户信息
+     * @return 结果
+     */
+    public int insertUser(TUser user);
+
+    /**
+     * 修改用户信息
+     * 
+     * @param user 用户信息
+     * @return 结果
+     */
+    public int updateUser(TUser user);
+
+    /**
+     * 批量删除用户信息
+     *
+     * @param userIds 需要删除的用户ID
+     * @return 结果
+     */
+    public int deleteUserByIds(String[] userIds);
+}

+ 32 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IYmdfSurveyService.java

@@ -0,0 +1,32 @@
+package com.ruoyi.system.service;
+
+import com.ruoyi.system.domain.YmdfSurvey;
+
+import java.util.List;
+
+/**
+ * 調査アンケート主(時間制御と状態管理を含む)Service接口
+ * 
+ * @author ruoyi
+ * @date 2025-06-27
+ */
+public interface IYmdfSurveyService 
+{
+
+    /**
+     * 查询調査アンケート主(時間制御と状態管理を含む)列表
+     * 
+     * @param ymdfSurvey 調査アンケート主(時間制御と状態管理を含む)
+     * @return 調査アンケート主(時間制御と状態管理を含む)集合
+     */
+    public List<YmdfSurvey> selectYmdfSurveyList(YmdfSurvey ymdfSurvey);
+
+    /**
+     * 批量删除調査アンケート主(時間制御と状態管理を含む)
+     *
+     * @param ids 需要删除的調査アンケート主(時間制御と状態管理を含む)主键集合
+     * @return 结果
+     */
+    public int deleteYmdfSurveyByIds(String[] ids);
+}
+

+ 108 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TUserServiceImpl.java

@@ -0,0 +1,108 @@
+package com.ruoyi.system.service.impl;
+
+import com.ruoyi.common.annotation.DataScope;
+import com.ruoyi.common.constant.UserConstants;
+import com.ruoyi.common.core.domain.entity.SysRole;
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.exception.ServiceException;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.bean.BeanValidators;
+import com.ruoyi.common.utils.spring.SpringUtils;
+import com.ruoyi.system.domain.SysUserRole;
+import com.ruoyi.system.domain.TUser;
+import com.ruoyi.system.mapper.SysRoleMapper;
+import com.ruoyi.system.mapper.SysUserMapper;
+import com.ruoyi.system.mapper.SysUserRoleMapper;
+import com.ruoyi.system.mapper.TUserMapper;
+import com.ruoyi.system.service.ISysConfigService;
+import com.ruoyi.system.service.ISysUserService;
+import com.ruoyi.system.service.ITUserService;
+import jakarta.validation.Validator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 用户 业务层处理
+ * 
+ * @author ruoyi
+ */
+@Service
+public class TUserServiceImpl implements ITUserService
+{
+    private static final Logger log = LoggerFactory.getLogger(TUserServiceImpl.class);
+
+    @Autowired
+    private TUserMapper userMapper;
+
+    @Autowired
+    private SysRoleMapper roleMapper;
+
+    @Autowired
+    private SysUserRoleMapper userRoleMapper;
+
+    @Autowired
+    private ISysConfigService configService;
+
+    @Autowired
+    protected Validator validator;
+
+    /**
+     * 根据条件分页查询用户列表
+     * 
+     * @param user 用户信息
+     * @return 用户信息集合信息
+     */
+    @Override
+    public List<TUser> selectUserList(TUser user)
+    {
+        return userMapper.selectUserList(user);
+    }
+
+    /**
+     * 新增保存用户信息
+     * 
+     * @param user 用户信息
+     * @return 结果
+     */
+    @Override
+    @Transactional
+    public int insertUser(TUser user)
+    {
+        return userMapper.insertUser(user);
+    }
+
+    /**
+     * 修改保存用户信息
+     * 
+     * @param user 用户信息
+     * @return 结果
+     */
+    @Override
+    @Transactional
+    public int updateUser(TUser user)
+    {
+        return userMapper.updateUser(user);
+    }
+
+    /**
+     * 批量删除用户信息
+     *
+     * @param userIds 需要删除的用户ID
+     * @return 结果
+     */
+    @Override
+    @Transactional
+    public int deleteUserByIds(String[] userIds)
+    {
+        return userMapper.deleteUserByIds(userIds);
+    }
+}

+ 45 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/YmdfSurveyServiceImpl.java

@@ -0,0 +1,45 @@
+package com.ruoyi.system.service.impl;
+import com.ruoyi.system.domain.*;
+import com.ruoyi.system.mapper.YmdfSurveyMapper;
+import com.ruoyi.system.service.IYmdfSurveyService;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 調査アンケート主(時間制御と状態管理を含む)Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2025-06-27
+ */
+@Service
+@RequiredArgsConstructor
+public class YmdfSurveyServiceImpl implements IYmdfSurveyService
+{
+    private final YmdfSurveyMapper ymdfSurveyMapper;
+
+    /**
+     * 查询調査アンケート主(時間制御と状態管理を含む)列表
+     *
+     * @param ymdfSurvey 調査アンケート主(時間制御と状態管理を含む)
+     * @return 調査アンケート主(時間制御と状態管理を含む)
+     */
+    @Override
+    public List<YmdfSurvey> selectYmdfSurveyList(YmdfSurvey ymdfSurvey)
+    {
+        return ymdfSurveyMapper.selectYmdfSurveyList(ymdfSurvey);
+    }
+
+    /**
+     * 批量删除調査アンケート主(時間制御と状態管理を含む)
+     *
+     * @param ids 需要删除的調査アンケート主(時間制御と状態管理を含む)主键
+     * @return 结果
+     */
+    @Override
+    public int deleteYmdfSurveyByIds(String[] ids)
+    {
+        return ymdfSurveyMapper.deleteYmdfSurveyByIds(ids);
+    }
+}

+ 85 - 0
ruoyi-system/src/main/resources/mapper/system/TUserMapper.xml

@@ -0,0 +1,85 @@
+<?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.ruoyi.system.mapper.TUserMapper">
+
+    <resultMap type="TUser" id="TUserResult">
+        <id     property="userId"       column="user_id"      />
+        <result property="userNm"     column="user_nm"    />
+        <result property="password"     column="password"     />
+        <result property="haisiFlg"       column="haisi_flg"       />
+        <result property="haisiDt"      column="haisi_dt"     />
+        <result property="insDt"      column="ins_dt"     />
+        <result property="insSyainCd"    column="ins_syain_cd"   />
+        <result property="insPgId"     column="ins_pg_id"    />
+        <result property="updDt"   column="upd_dt"  />
+        <result property="updSyainCd"     column="upd_syain_cd"    />
+        <result property="updPgId"   column="upd_pg_id"  />
+    </resultMap>
+
+	<sql id="selectUserVo">
+		select t.user_id, t.user_nm, t.password, t.haisi_flg, t.haisi_dt, t.ins_dt, t.ins_syain_cd, t.ins_pg_id, t.upd_dt, t.upd_syain_cd, t.upd_pg_id from t_user t
+	</sql>
+    
+    <select id="selectUserList" parameterType="TUser" resultMap="TUserResult">
+		<include refid="selectUserVo"/>
+		where t.haisi_flg = '0'
+		ORDER BY t.user_id ASC
+	</select>
+
+	<insert id="insertUser" parameterType="TUser" useGeneratedKeys="true" keyProperty="userId">
+		insert into t_user(
+		<if test="userId != null and userId != 0">user_id,</if>
+		<if test="userNm != null and userNm != ''">user_nm,</if>
+		<if test="password != null and password != ''">password,</if>
+		<if test="haisiFlg != null and haisiFlg != ''">haisi_flg,</if>
+		<if test="haisiDt != null and haisiDt != ''">haisi_dt,</if>
+		ins_dt,
+		<if test="insSyainCd != null and insSyainCd != ''">ins_syain_cd,</if>
+		<if test="insPgId != null and insPgId != ''">ins_pg_id,</if>
+		upd_dt
+		<if test="updSyainCd != null and updSyainCd != ''">,upd_syain_cd</if>
+		<if test="updPgId != null and updPgId != ''">,upd_pg_id</if>
+		)values(
+		<if test="userId != null and userId != ''">#{userId},</if>
+		<if test="userNm != null and userNm != ''">#{userNm},</if>
+		<if test="password != null and password != ''">#{password},</if>
+		<if test="haisiFlg != null and haisiFlg != ''">#{haisiFlg},</if>
+		<if test="haisiDt != null and haisiDt != ''">#{haisiDt},</if>
+		now(),
+		<if test="insSyainCd != null and insSyainCd != ''">#{insSyainCd},</if>
+		<if test="insPgId != null and insPgId != ''">#{insPgId},</if>
+		now()
+		<if test="updSyainCd != null and updSyainCd != ''">,#{updSyainCd}</if>
+		<if test="updPgId != null and updPgId != ''">,#{updPgId}</if>
+		)
+	</insert>
+	
+	<update id="updateUser" parameterType="TUser">
+ 		update t_user
+ 		<set>
+ 			<if test="userNm != null and userNm != ''">user_nm = #{userNm},</if>
+ 			<if test="password != null and password != ''">password = #{password},</if>
+			<if test="haisiFlg != null and haisiFlg != ''">haisi_flg = #{haisiFlg},</if>
+			<if test="haisiDt != null and haisiDt != ''">haisi_dt = #{haisiDt},</if>
+			<if test="insSyainCd != null and insSyainCd != ''">ins_syain_cd = #{insSyainCd},</if>
+			<if test="insPgId != null and insPgId != ''">ins_pg_id = #{insPgId},</if>
+			upd_dt = now(),
+			<if test="updSyainCd != null and updSyainCd != ''">upd_syain_cd = #{updSyainCd},</if>
+			<if test="updPgId != null and updPgId != ''">upd_pg_id = #{updPgId},</if>
+		</set>
+		where user_id = #{userId}
+	</update>
+
+	<delete id="deleteUserByIds" parameterType="String">
+		update t_user
+		set haisi_flg = '1',
+		haisi_dt = TO_CHAR(NOW(), 'YYYYMMDD')
+		where user_id in
+		<foreach collection="array" item="userId" open="(" separator="," close=")">
+			#{userId}
+		</foreach>
+	</delete>
+	
+</mapper>

+ 51 - 0
ruoyi-system/src/main/resources/mapper/system/YmdfSurveyMapper.xml

@@ -0,0 +1,51 @@
+<?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.ruoyi.system.mapper.YmdfSurveyMapper">
+
+    <resultMap type="YmdfSurvey" id="YmdfSurveyResult">
+        <result property="id"    column="id"    />
+        <result property="depName"    column="dep_name"    />
+        <result property="regName"    column="reg_name"    />
+        <result property="baseCode"    column="base_code"    />
+        <result property="baseName"    column="base_name"    />
+        <result property="zipCode"    column="zip_code"    />
+        <result property="inNumber"    column="in_number"    />
+        <result property="classNumber"    column="class_number"    />
+        <result property="creationDate"    column="creation_date"    />
+        <result property="implementation" column="implementation"/>
+    </resultMap>
+
+    <sql id="selectYmdfSurveyVo">
+        select id, dep_name, reg_name, base_code, base_name, zip_code, in_number, class_number, creation_date, implementation from hn_label_generation_list
+    </sql>
+
+    <select id="selectYmdfSurveyList" parameterType="YmdfSurvey" resultMap="YmdfSurveyResult">
+        <include refid="selectYmdfSurveyVo"/>
+        <where>
+            <if test="depName != null and depName != ''">
+                AND dep_name = #{depName}
+            </if>
+            <if test="regName != null and regName != ''">
+                AND reg_name = #{regName}
+            </if>
+            <if test="baseCode != null and baseCode != ''">
+                AND base_code = #{baseCode}
+            </if>
+            <if test="baseName != null and baseName != ''">
+                AND base_name = #{baseName}
+            </if>
+            <if test="creationDate != null">
+                AND creation_date = #{creationDate}
+            </if>
+        </where>
+    </select>
+
+    <delete id="deleteYmdfSurveyByIds" parameterType="String">
+        delete from hn_label_generation_list where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>