Browse Source

Merge branch 'master' of http://39.98.153.250:9080/bowintek/EmploymentSite

82064491C07A712AE32B5B57EC6EF136 3 months ago
parent
commit
aba1933934

+ 59 - 1
doc/已更新脚本

@@ -1462,4 +1462,62 @@ UPDATE sys_function_code SET FunctionName = '就业驿站数据地图' WHERE Fun
 # 删除数据大屏原菜单
 DELETE FROM sys_menu WHERE MenuNo = 'T011004';
 DELETE FROM sys_function_code WHERE FunctionCode = 'T011004';
-DELETE FROM sys_role_sys_function_code WHERE FunctionCode = 'T011004';
+DELETE FROM sys_role_sys_function_code WHERE FunctionCode = 'T011004';
+
+-- 2024.8.6
+create table pc_signin
+(
+   SigninId             varchar(50) not null comment '唯一标识',
+   SiteID               varchar(50) comment '所属驿站',
+   SigninType           int comment '打卡类型,字典:SigninType',
+   CompanyID            varchar(50) comment '走访企业',
+   JobuserID            varchar(50) comment '走访人员',
+   SigninTime           datetime comment '打卡时间',
+   Content              text comment '服务内容',
+   Longitude            varchar(50) comment '经度',
+   Latitude             varchar(50) comment '纬度',
+   RecordStatus         int comment '状态',
+   CreateUserID         varchar(50) comment '创建人',
+   CreateTime           datetime comment '创建时间',
+   ModifyUserID         varchar(50) comment '修改人',
+   ModifyTime           datetime comment '修改时间',
+   primary key (SigninId)
+);
+
+alter table pc_signin add constraint FK_Pc_Signin_Ref_Company foreign key (CompanyID)
+      references pc_company (CompanyID) on delete restrict on update restrict;
+
+alter table pc_signin add constraint FK_Pc_Signin_Ref_JobUser foreign key (JobuserID)
+      references pc_jobuser (JobuserID) on delete restrict on update restrict;
+
+alter table pc_signin add constraint FK_Pc_Signin_Ref_Site foreign key (SiteID)
+      references pc_site (SiteID) on delete restrict on update restrict;
+
+
+ INSERT INTO `sys_dictionary` (`DictionaryCode`, `Name`, `OrderNo`, `RecordStatus`) VALUES
+ ('SigninType', '打卡类型', 200, 1);
+ INSERT INTO `sys_dictionary_item` (`DictionaryItemID`, `Code`, `DictionaryCode`, `Value`, `Name`, `OrderNo`, `RecordStatus`, `IsEditable`) VALUES
+ ('ac93ede5-538d-11ef-8d63-7085c2a9999e', '', 'SigninType', 1, '走访企业', 1, 1, 0),
+ ('b100cbf2-538d-11ef-8d63-7085c2a9999e', '', 'SigninType', 2, '走访人员', 2, 1, 0),
+ ('b4ec8c51-538d-11ef-8d63-7085c2a9999e', '', 'SigninType', 3, '其他外联事项', 3, 1, 0);
+
+ -- 2024-08-06 驿站工作人员外出地图菜单
+ INSERT INTO sys_function_code VALUES ('T011004', '驿站工作人员外出地图', 'T0110', 4);
+ INSERT INTO `sys_menu` VALUES ('T011004', 4, '驿站工作人员外出地图', NULL, 'views/dataMap/siteUserWorkDataMap', '/siteUserWorkDataMap', 'T0110', NULL, 0, 1, 1, 'T011004', 1, NULL, 1);
+ insert into sys_role_sys_function_code (`RoleID`, `FunctionCode`) values('20afde90-a81a-11ed-a6c5-7085c2a9999e','T011004');
+
+
+
+INSERT INTO  `sys_function_code` (`FunctionCode`, `FunctionName`, `ParentFunctionCode`, `OrderNo`) VALUES ('T010305', '外出服务管理', 'T0103', 5); INSERT INTO  `sys_function_code` (`FunctionCode`, `FunctionName`, `ParentFunctionCode`, `OrderNo`) VALUES ('T01030501', '查看', 'T010305', 1);
+INSERT INTO  `sys_function_code` (`FunctionCode`, `FunctionName`, `ParentFunctionCode`, `OrderNo`) VALUES ('T01030502', '编辑', 'T010305', 2);
+INSERT INTO  `sys_function_code` (`FunctionCode`, `FunctionName`, `ParentFunctionCode`, `OrderNo`) VALUES ('T01030503', '删除', 'T010305', 3);
+INSERT INTO  `sys_function_code` (`FunctionCode`, `FunctionName`, `ParentFunctionCode`, `OrderNo`) VALUES ('T01030504', '跟进', 'T010305', 4);
+
+
+INSERT INTO  `sys_menu` (`MenuNo`, `OrderNo`, `MenuName`, `Icon`, `ViewPath`, `Url`, `ParentMenuNo`, `Description`, `IsTopMenu`, `IsVisible`, `IsLeaf`, `FunctionCode`, `RecordStatus`, `ShortcutIcon`, `IsBlank`) VALUES ('T010305', 5, '外出服务管理', NULL, '', '/signinMgt', 'T0103', '外出服务管理', 0, 1, 1, 'T010305', 1, NULL, NULL);
+INSERT INTO  `sys_menu` (`MenuNo`, `OrderNo`, `MenuName`, `Icon`, `ViewPath`, `Url`, `ParentMenuNo`, `Description`, `IsTopMenu`, `IsVisible`, `IsLeaf`, `FunctionCode`, `RecordStatus`, `ShortcutIcon`, `IsBlank`) VALUES ('T01030501', 1, '外出服务信息', NULL, 'views/jobusermgr/signinMgt/index', '/index', 'T010305', '', 0, 0, 1, 'T010305', 1, NULL, NULL);
+INSERT INTO  `sys_menu` (`MenuNo`, `OrderNo`, `MenuName`, `Icon`, `ViewPath`, `Url`, `ParentMenuNo`, `Description`, `IsTopMenu`, `IsVisible`, `IsLeaf`, `FunctionCode`, `RecordStatus`, `ShortcutIcon`, `IsBlank`) VALUES ('T01030502', 1, '编辑外出服务', NULL, 'views/jobusermgr/signinMgt/edit', '/edit', 'T010305', '', 0, 0, 1, 'T010305', 1, NULL, NULL);
+insert into sys_role_sys_function_code (`RoleID`, `FunctionCode`) values('20afde90-a81a-11ed-a6c5-7085c2a9999e','T010305');
+
+--求职意向表其他信息字段长度扩展
+alter table pc_jobhunt modify  OtherDemand varchar(5000)

+ 0 - 52
doc/待更新脚本.txt

@@ -1,53 +0,0 @@
-create table pc_signin
-(
-   SigninId             varchar(50) not null comment '唯一标识',
-   SiteID               varchar(50) comment '所属驿站',
-   SigninType           int comment '打卡类型,字典:SigninType',
-   CompanyID            varchar(50) comment '走访企业',
-   JobuserID            varchar(50) comment '走访人员',
-   SigninTime           datetime comment '打卡时间',
-   Content              text comment '服务内容',
-   Longitude            varchar(50) comment '经度',
-   Latitude             varchar(50) comment '纬度',
-   RecordStatus         int comment '状态',
-   CreateUserID         varchar(50) comment '创建人',
-   CreateTime           datetime comment '创建时间',
-   ModifyUserID         varchar(50) comment '修改人',
-   ModifyTime           datetime comment '修改时间',
-   primary key (SigninId)
-);
-
-alter table pc_signin add constraint FK_Pc_Signin_Ref_Company foreign key (CompanyID)
-      references pc_company (CompanyID) on delete restrict on update restrict;
-
-alter table pc_signin add constraint FK_Pc_Signin_Ref_JobUser foreign key (JobuserID)
-      references pc_jobuser (JobuserID) on delete restrict on update restrict;
-
-alter table pc_signin add constraint FK_Pc_Signin_Ref_Site foreign key (SiteID)
-      references pc_site (SiteID) on delete restrict on update restrict;
-
-
- INSERT INTO `sys_dictionary` (`DictionaryCode`, `Name`, `OrderNo`, `RecordStatus`) VALUES
- ('SigninType', '打卡类型', 200, 1);
- INSERT INTO `sys_dictionary_item` (`DictionaryItemID`, `Code`, `DictionaryCode`, `Value`, `Name`, `OrderNo`, `RecordStatus`, `IsEditable`) VALUES
- ('ac93ede5-538d-11ef-8d63-7085c2a9999e', '', 'SigninType', 1, '走访企业', 1, 1, 0),
- ('b100cbf2-538d-11ef-8d63-7085c2a9999e', '', 'SigninType', 2, '走访人员', 2, 1, 0),
- ('b4ec8c51-538d-11ef-8d63-7085c2a9999e', '', 'SigninType', 3, '其他外联事项', 3, 1, 0);
-
- -- 2024-08-06 驿站工作人员外出地图菜单
- INSERT INTO sys_function_code VALUES ('T011004', '驿站工作人员外出地图', 'T0110', 4);
- INSERT INTO `sys_menu` VALUES ('T011004', 4, '驿站工作人员外出地图', NULL, 'views/dataMap/siteUserWorkDataMap', '/siteUserWorkDataMap', 'T0110', NULL, 0, 1, 1, 'T011004', 1, NULL, 1);
- insert into sys_role_sys_function_code (`RoleID`, `FunctionCode`) values('20afde90-a81a-11ed-a6c5-7085c2a9999e','T011004');
-
-
-
-INSERT INTO  `sys_function_code` (`FunctionCode`, `FunctionName`, `ParentFunctionCode`, `OrderNo`) VALUES ('T010305', '外出服务管理', 'T0103', 5); INSERT INTO  `sys_function_code` (`FunctionCode`, `FunctionName`, `ParentFunctionCode`, `OrderNo`) VALUES ('T01030501', '查看', 'T010305', 1);
-INSERT INTO  `sys_function_code` (`FunctionCode`, `FunctionName`, `ParentFunctionCode`, `OrderNo`) VALUES ('T01030502', '编辑', 'T010305', 2);
-INSERT INTO  `sys_function_code` (`FunctionCode`, `FunctionName`, `ParentFunctionCode`, `OrderNo`) VALUES ('T01030503', '删除', 'T010305', 3);
-INSERT INTO  `sys_function_code` (`FunctionCode`, `FunctionName`, `ParentFunctionCode`, `OrderNo`) VALUES ('T01030504', '跟进', 'T010305', 4);
-
-
-INSERT INTO  `sys_menu` (`MenuNo`, `OrderNo`, `MenuName`, `Icon`, `ViewPath`, `Url`, `ParentMenuNo`, `Description`, `IsTopMenu`, `IsVisible`, `IsLeaf`, `FunctionCode`, `RecordStatus`, `ShortcutIcon`, `IsBlank`) VALUES ('T010305', 5, '外出服务管理', NULL, '', '/signinMgt', 'T0103', '外出服务管理', 0, 1, 1, 'T010305', 1, NULL, NULL);
-INSERT INTO  `sys_menu` (`MenuNo`, `OrderNo`, `MenuName`, `Icon`, `ViewPath`, `Url`, `ParentMenuNo`, `Description`, `IsTopMenu`, `IsVisible`, `IsLeaf`, `FunctionCode`, `RecordStatus`, `ShortcutIcon`, `IsBlank`) VALUES ('T01030501', 1, '外出服务信息', NULL, 'views/jobusermgr/signinMgt/index', '/index', 'T010305', '', 0, 0, 1, 'T010305', 1, NULL, NULL);
-INSERT INTO  `sys_menu` (`MenuNo`, `OrderNo`, `MenuName`, `Icon`, `ViewPath`, `Url`, `ParentMenuNo`, `Description`, `IsTopMenu`, `IsVisible`, `IsLeaf`, `FunctionCode`, `RecordStatus`, `ShortcutIcon`, `IsBlank`) VALUES ('T01030502', 1, '编辑外出服务', NULL, 'views/jobusermgr/signinMgt/edit', '/edit', 'T010305', '', 0, 0, 1, 'T010305', 1, NULL, NULL);

+ 19 - 11
src/main/java/com/hz/employmentsite/services/impl/companyService/CompanyServiceImpl.java

@@ -61,6 +61,9 @@ public class CompanyServiceImpl implements CompanyService {
     @Autowired
     private PcPostMapper pcPostMapper;
 
+    @Autowired
+    private PcSigninMapper pcSigninMapper;
+
     @Autowired
     private PcSiteUserMapper pcSiteUserMapper;
 
@@ -322,18 +325,23 @@ public class CompanyServiceImpl implements CompanyService {
             var curCompanyPostList = pcPostMapper.selectByExample(pcPostExp).stream().toList();
             if( curCompanyPostList != null && curCompanyPostList.size() > 0){
                 throw new BaseException("10004","所选企业已有关联岗位信息,不允许删除!");
-            }else{
-                PcCompanyWithBLOBs company = pcCompanyMapper.selectByPrimaryKey(curCompanyID);
-                int count = pcCompanyMapper.deleteByPrimaryKey(curCompanyID);
-                if(count>0){
-                    PcLabelCompanyExample labelEmp = new PcLabelCompanyExample();
-                    labelEmp.or().andCompanyIDEqualTo(curCompanyID);
-                    pcLabelCompanyMapper.deleteByExample(labelEmp);
-                    // 记录被删除的企业信息
-                    delInfo += company.getCompanyName() + ",";
-                }
-                result+=count;
             }
+            PcSigninExample pcSigninExample = new PcSigninExample();
+            pcSigninExample.or().andCompanyIDEqualTo(curCompanyID);
+            List<PcSignin> pcSignins = pcSigninMapper.selectByExample(pcSigninExample).stream().toList();
+            if (pcSignins != null && pcSignins.size() > 0) {
+                throw new BaseException("10004","所选企业已有关联的外出工作走访记录信息,暂时无法删除!");
+            }
+            PcCompanyWithBLOBs company = pcCompanyMapper.selectByPrimaryKey(curCompanyID);
+            int count = pcCompanyMapper.deleteByPrimaryKey(curCompanyID);
+            if(count>0){
+                PcLabelCompanyExample labelEmp = new PcLabelCompanyExample();
+                labelEmp.or().andCompanyIDEqualTo(curCompanyID);
+                pcLabelCompanyMapper.deleteByExample(labelEmp);
+                // 记录被删除的企业信息
+                delInfo += company.getCompanyName() + ",";
+            }
+            result+=count;
         }
         if (result > 0) {
             SysLog sysLog = new SysLog();

+ 20 - 12
src/main/java/com/hz/employmentsite/services/impl/jobUserManager/JobUserServiceImpl.java

@@ -87,6 +87,9 @@ public class JobUserServiceImpl implements JobUserService {
     @Autowired
     private HonorService honorService;
 
+    @Autowired
+    private PcSigninMapper pcSigninMapper;
+
     @Override
     public PageInfo<JobUserVo> getList(Integer pageIndex, Integer pageSize,
                                        List<String> jobUserIDList, String name,
@@ -275,19 +278,24 @@ public class JobUserServiceImpl implements JobUserService {
             var curJobUserHuntList = pcJobhuntMapper.selectByExample(jobHuntExample).stream().toList();
             if( curJobUserHuntList != null && curJobUserHuntList.size()>0){
                 throw new BaseException("10004","所选求职人员已有关联的求职意向,不允许删除!");
-            }else{
-                PcJobuser pcJobuser = pcJobuserMapper.selectByPrimaryKey(curJobUserID);
-                int count = pcJobuserMapper.deleteByPrimaryKey(curJobUserID);
-                if(count>0){
-                    // 记录被删除的求职人员信息
-                    delInfo += pcJobuser.getName() + ",";
-                    // 删除求职人员标签
-                    PcLabelJobuserExample labelEmp = new PcLabelJobuserExample();
-                    labelEmp.or().andJobuserIDEqualTo(curJobUserID);
-                    pcLabelJobuserMapper.deleteByExample(labelEmp);
-                }
-                result+=count;
             }
+            PcSigninExample pcSigninExample = new PcSigninExample();
+            pcSigninExample.or().andJobuserIDEqualTo(curJobUserID);
+            List<PcSignin> pcSignins = pcSigninMapper.selectByExample(pcSigninExample).stream().toList();
+            if (pcSignins != null && pcSignins.size() > 0) {
+                throw new BaseException("10004","所选企业已有关联的外出工作走访记录信息,暂时无法删除!");
+            }
+            PcJobuser pcJobuser = pcJobuserMapper.selectByPrimaryKey(curJobUserID);
+            int count = pcJobuserMapper.deleteByPrimaryKey(curJobUserID);
+            if(count>0){
+                // 记录被删除的求职人员信息
+                delInfo += pcJobuser.getName() + ",";
+                // 删除求职人员标签
+                PcLabelJobuserExample labelEmp = new PcLabelJobuserExample();
+                labelEmp.or().andJobuserIDEqualTo(curJobUserID);
+                pcLabelJobuserMapper.deleteByExample(labelEmp);
+            }
+            result+=count;
         }
         if (result > 0) {
             SysLog sysLog = new SysLog();