Просмотр исходного кода

1.劳务对接审核
2.企业、用户审核BUG

jz.kai 4 лет назад
Родитель
Сommit
b5e2c57d50

+ 1 - 0
common/src/main/java/com/jpsoft/employment/modules/job/entity/JobUser.java

@@ -80,6 +80,7 @@ public class JobUser {
 
 	@ApiModelProperty(value = "身份证照片")
 	private String idCardUrl;
+	private String[] idCardUrlArray;
 
 	@ApiModelProperty(value = "工作状态")
 	private String jobStatus;

+ 17 - 6
web/src/main/java/com/jpsoft/employment/modules/base/controller/CompanyController.java

@@ -3,7 +3,9 @@ package com.jpsoft.employment.modules.base.controller;
 import com.github.pagehelper.Page;
 import com.jpsoft.employment.modules.base.entity.City;
 import com.jpsoft.employment.modules.base.entity.Company;
+import com.jpsoft.employment.modules.base.entity.EnterpriseCertificationApprove;
 import com.jpsoft.employment.modules.base.service.CompanyService;
+import com.jpsoft.employment.modules.base.service.EnterpriseCertificationApproveService;
 import com.jpsoft.employment.modules.common.dto.MessageResult;
 import com.jpsoft.employment.modules.common.dto.Sort;
 import com.jpsoft.employment.modules.common.utils.PojoUtils;
@@ -32,6 +34,8 @@ public class CompanyController {
     private DataDictionaryService dataDictionaryService;
     @Autowired
     private CompanyService companyService;
+    @Autowired
+    private EnterpriseCertificationApproveService enterpriseCertificationApproveService;
 
     @ApiOperation(value="创建空记录")
     @GetMapping("create")
@@ -297,18 +301,25 @@ public class CompanyController {
 
     @ApiOperation(value="更新用户")
     @PostMapping("checked")
-    public MessageResult<Company> checked(String id,@RequestAttribute String subject){
+    public MessageResult<Company> checked(String id,String cid,@RequestAttribute String subject){
         MessageResult<Company> msgResult = new MessageResult<>();
 
         try {
-            Company company = companyService.get(id);
-            company.setIsCertification("2");
-            company.setUpdateBy(subject);
-            company.setUpdateTime(new Date());
+            EnterpriseCertificationApprove enterpriseCertificationApprove = enterpriseCertificationApproveService.get(id);
+            enterpriseCertificationApprove.setApprovePersonId(subject);
+            enterpriseCertificationApprove.setApproveTime(new Date());
+            enterpriseCertificationApprove.setUpdateBy(subject);
+            enterpriseCertificationApprove.setUpdateTime(new Date());
 
-            int affectCount = companyService.update(company);
+            int affectCount = enterpriseCertificationApproveService.update(enterpriseCertificationApprove);
 
             if (affectCount > 0) {
+                Company company = companyService.get(cid);
+                company.setIsCertification("2");
+                company.setUpdateBy(subject);
+                company.setUpdateTime(new Date());
+                companyService.update(company);
+
                 msgResult.setResult(true);
                 msgResult.setData(company);
             } else {

+ 0 - 4
web/src/main/java/com/jpsoft/employment/modules/base/controller/EnterpriseCertificationApproveController.java

@@ -268,10 +268,6 @@ public class EnterpriseCertificationApproveController {
             @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
             @RequestParam(value="pageSize",defaultValue="20") int pageSize,
             @RequestAttribute String subject){
-
-        //当前用户ID
-        System.out.println(subject);
-
         MessageResult<Map> msgResult = new MessageResult<>();
 
         Map<String,Object> searchParams = new HashMap<>();

+ 74 - 1
web/src/main/java/com/jpsoft/employment/modules/base/controller/LabourServicesController.java

@@ -1,7 +1,11 @@
 package com.jpsoft.employment.modules.base.controller;
 
 import com.github.pagehelper.Page;
+import com.jpsoft.employment.modules.base.entity.Company;
+import com.jpsoft.employment.modules.base.entity.EnterpriseCertificationApprove;
 import com.jpsoft.employment.modules.base.entity.LabourServices;
+import com.jpsoft.employment.modules.base.entity.LabourServicesApprove;
+import com.jpsoft.employment.modules.base.service.LabourServicesApproveService;
 import com.jpsoft.employment.modules.base.service.LabourServicesService;
 import com.jpsoft.employment.modules.common.dto.MessageResult;
 import com.jpsoft.employment.modules.common.dto.Sort;
@@ -29,7 +33,8 @@ public class LabourServicesController {
 
     @Autowired
     private LabourServicesService labourServicesService;
-
+    @Autowired
+    private LabourServicesApproveService labourServicesApproveService;
     @Autowired
     private DataDictionaryService dataDictionaryService;
 
@@ -277,4 +282,72 @@ public class LabourServicesController {
 
         return msgResult;
     }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("editChecked/{id}")
+    public MessageResult<LabourServices> editChecked(@PathVariable("id") String id, @RequestAttribute String subject){
+        MessageResult<LabourServices> msgResult = new MessageResult<>();
+
+        try {
+            LabourServices labourServices = labourServicesService.get(id);
+            switch (labourServices.getType()){
+                case "1": labourServices.setTypeN("我要用工人");break;
+                case "2": labourServices.setTypeN("我有工人");break;
+            }
+
+            if (labourServices != null) {
+                msgResult.setResult(true);
+                msgResult.setData(labourServices);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="审核")
+    @PostMapping("checked")
+    public MessageResult<LabourServices> checked(String id,String cid,@RequestAttribute String subject){
+        MessageResult<LabourServices> msgResult = new MessageResult<>();
+
+        try {
+            LabourServicesApprove labourServicesApprove = labourServicesApproveService.get(id);
+            labourServicesApprove.setApprovePersonId(subject);
+            labourServicesApprove.setApproveTime(new Date());
+            labourServicesApprove.setUpdateBy(subject);
+            labourServicesApprove.setUpdateTime(new Date());
+
+            int affectCount = labourServicesApproveService.update(labourServicesApprove);
+
+            if (affectCount > 0) {
+                LabourServices labourServices = labourServicesService.get(cid);
+                labourServices.setApprovalStatus("2");
+                labourServices.setUpdateBy(subject);
+                labourServices.setUpdateTime(new Date());
+                labourServicesService.update(labourServices);
+
+                msgResult.setResult(true);
+                msgResult.setData(labourServices);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
 }

+ 2 - 0
web/src/main/java/com/jpsoft/employment/modules/base/controller/UserAuthenticationApproveController.java

@@ -249,6 +249,8 @@ public class UserAuthenticationApproveController {
 
         try {
             UserAuthenticationApprove userAuthenticationApprove = userAuthenticationApproveService.get(id);
+            userAuthenticationApprove.setApprovePersonId(subject);
+            userAuthenticationApprove.setApproveTime(new Date());
             userAuthenticationApprove.setApprovalStatus("2");
             userAuthenticationApprove.setUpdateBy(subject);
             userAuthenticationApprove.setUpdateTime(new Date());

+ 3 - 0
web/src/main/java/com/jpsoft/employment/modules/job/controller/JobUserController.java

@@ -981,6 +981,9 @@ public class JobUserController {
 
         try {
             JobUser jobUser = jobUserService.get(id);
+            if(StringUtils.isNotEmpty(jobUser.getIdCardUrl())){
+                jobUser.setIdCardUrlArray(jobUser.getIdCardUrl().split(","));
+            }
 
             if (jobUser != null) {
                 msgResult.setResult(true);

+ 1 - 1
web/src/main/resources/application-dev.yml

@@ -12,7 +12,7 @@ spring:
      password: jpsoft2016
 
     #测试环境
-#     url: jdbc:log4jdbc:mysql://47.92.161.104:3336/jp_housekeeper_2.0?autoReconnect=true&characterEncoding=utf8&serverTimezone=GMT%2B8
+#     url: jdbc:log4jdbc:mysql://121.37.187.149:8100/jp-employment?autoReconnect=true&characterEncoding=utf8&serverTimezone=GMT%2B8
 #     username: root
 #     password: jpsoft8121234