包头 2024-09-02
This commit is contained in:
parent
5a063ae282
commit
28a463193a
@ -138,9 +138,9 @@ public class CivilEngineeringQualityInspectionOrder implements Serializable {
|
|||||||
@Excel(name = "监理见证人", width = 15)
|
@Excel(name = "监理见证人", width = 15)
|
||||||
@ApiModelProperty(value="监理见证人")
|
@ApiModelProperty(value="监理见证人")
|
||||||
private java.lang.Long supervisingWitnessUser ;
|
private java.lang.Long supervisingWitnessUser ;
|
||||||
/**委托方电话*/
|
/**委托人电话*/
|
||||||
@Excel(name = "委托方电话", width = 15)
|
@Excel(name = "委托人电话", width = 15)
|
||||||
@ApiModelProperty(value="委托方电话")
|
@ApiModelProperty(value="委托人电话")
|
||||||
private java.lang.String clientPhoneNumber ;
|
private java.lang.String clientPhoneNumber ;
|
||||||
/**见证记录*/
|
/**见证记录*/
|
||||||
@Excel(name = "见证记录", width = 15)
|
@Excel(name = "见证记录", width = 15)
|
||||||
|
|||||||
@ -19,4 +19,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
public interface FirstExampleManageMapper extends BaseMapper<FirstExampleManage> {
|
public interface FirstExampleManageMapper extends BaseMapper<FirstExampleManage> {
|
||||||
|
|
||||||
IPage<FirstExampleManage> queryList(Page<FirstExampleManage> page,@Param(Constants.WRAPPER) QueryWrapper<FirstExampleManage> queryWrapper);
|
IPage<FirstExampleManage> queryList(Page<FirstExampleManage> page,@Param(Constants.WRAPPER) QueryWrapper<FirstExampleManage> queryWrapper);
|
||||||
|
|
||||||
|
FirstExampleManage getById(String id);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,4 +20,23 @@
|
|||||||
left join enterprise_info ei3 on ei3.id=t.construction_unit_id) t
|
left join enterprise_info ei3 on ei3.id=t.construction_unit_id) t
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getById" resultType="com.zhgd.xmgl.modules.baotou.entity.FirstExampleManage">
|
||||||
|
select * from (select
|
||||||
|
t.* ,
|
||||||
|
du.device_unit_name,
|
||||||
|
du.device_unit_no,
|
||||||
|
pg.project_group_name,
|
||||||
|
ei.enterprise_name as epc_contractor_name,
|
||||||
|
ei2.enterprise_name as supervising_unit_name,
|
||||||
|
ei3.enterprise_name as construction_unit_name
|
||||||
|
from
|
||||||
|
first_example_manage t
|
||||||
|
join device_unit du on t.device_unit_id = du.id
|
||||||
|
join project_group pg on pg.id = t.project_group_id
|
||||||
|
left join enterprise_info ei on ei.id=t.epc_contractor_id
|
||||||
|
left join enterprise_info ei2 on ei2.id=t.supervising_unit_id
|
||||||
|
left join enterprise_info ei3 on ei3.id=t.construction_unit_id) t
|
||||||
|
where t.id = #{id}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -9,12 +9,12 @@
|
|||||||
ei.enterprise_name as commissioning_unit_name,
|
ei.enterprise_name as commissioning_unit_name,
|
||||||
ei1.enterprise_name as construction_unit_name,
|
ei1.enterprise_name as construction_unit_name,
|
||||||
wi1.real_name as quality_charge_person_signature_name,
|
wi1.real_name as quality_charge_person_signature_name,
|
||||||
ei1.enterprise_name as epc_contractor_name,
|
ei2.enterprise_name as epc_contractor_name,
|
||||||
wi1.real_name as professional_engineer_signature_name,
|
wi2.real_name as professional_engineer_signature_name,
|
||||||
ei1.enterprise_name as supervising_unit_name,
|
ei3.enterprise_name as supervising_unit_name,
|
||||||
wi1.real_name as supervising_engineer_signature_name,
|
wi3.real_name as supervising_engineer_signature_name,
|
||||||
ei1.enterprise_name as testing_unit_name,
|
ei4.enterprise_name as testing_unit_name,
|
||||||
wi1.real_name as testing_unit_charge_person_signature_name
|
wi4.real_name as testing_unit_charge_person_signature_name
|
||||||
from nondestructive_test_order_ticket t
|
from nondestructive_test_order_ticket t
|
||||||
left join device_unit du on t.device_unit_id = du.id
|
left join device_unit du on t.device_unit_id = du.id
|
||||||
left join enterprise_info ei on ei.id=t.commissioning_unit
|
left join enterprise_info ei on ei.id=t.commissioning_unit
|
||||||
@ -38,12 +38,12 @@
|
|||||||
ei.enterprise_name as commissioning_unit_name,
|
ei.enterprise_name as commissioning_unit_name,
|
||||||
ei1.enterprise_name as construction_unit_name,
|
ei1.enterprise_name as construction_unit_name,
|
||||||
wi1.real_name as quality_charge_person_signature_name,
|
wi1.real_name as quality_charge_person_signature_name,
|
||||||
ei1.enterprise_name as epc_contractor_name,
|
ei2.enterprise_name as epc_contractor_name,
|
||||||
wi1.real_name as professional_engineer_signature_name,
|
wi2.real_name as professional_engineer_signature_name,
|
||||||
ei1.enterprise_name as supervising_unit_name,
|
ei3.enterprise_name as supervising_unit_name,
|
||||||
wi1.real_name as supervising_engineer_signature_name,
|
wi3.real_name as supervising_engineer_signature_name,
|
||||||
ei1.enterprise_name as testing_unit_name,
|
ei4.enterprise_name as testing_unit_name,
|
||||||
wi1.real_name as testing_unit_charge_person_signature_name
|
wi4.real_name as testing_unit_charge_person_signature_name
|
||||||
from nondestructive_test_order_ticket t
|
from nondestructive_test_order_ticket t
|
||||||
left join device_unit du on t.device_unit_id = du.id
|
left join device_unit du on t.device_unit_id = du.id
|
||||||
left join enterprise_info ei on ei.id=t.commissioning_unit
|
left join enterprise_info ei on ei.id=t.commissioning_unit
|
||||||
|
|||||||
@ -77,7 +77,7 @@ public class FirstExampleManageServiceImpl extends ServiceImpl<FirstExampleManag
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FirstExampleManage queryById(String id) {
|
public FirstExampleManage queryById(String id) {
|
||||||
FirstExampleManage entity = getById(id);
|
FirstExampleManage entity = baseMapper.getById(id);
|
||||||
if (entity == null) {
|
if (entity == null) {
|
||||||
throw new OpenAlertException("未找到对应实体");
|
throw new OpenAlertException("未找到对应实体");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,16 +1,28 @@
|
|||||||
package com.zhgd.xmgl.modules.project.controller;
|
package com.zhgd.xmgl.modules.project.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.gexin.fastjson.JSON;
|
||||||
import com.zhgd.annotation.OperLog;
|
import com.zhgd.annotation.OperLog;
|
||||||
import com.zhgd.jeecg.common.api.vo.Result;
|
import com.zhgd.jeecg.common.api.vo.Result;
|
||||||
|
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||||
import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
|
import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
|
||||||
import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService;
|
import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService;
|
||||||
|
import com.zhgd.xmgl.modules.basicdata.service.impl.NoticeServiceImpl;
|
||||||
import com.zhgd.xmgl.modules.project.entity.ProjectEnterprise;
|
import com.zhgd.xmgl.modules.project.entity.ProjectEnterprise;
|
||||||
import com.zhgd.xmgl.modules.project.service.IProjectEnterpriseService;
|
import com.zhgd.xmgl.modules.project.service.IProjectEnterpriseService;
|
||||||
import com.zhgd.xmgl.modules.worker.entity.EnterpriseInfo;
|
import com.zhgd.xmgl.modules.worker.entity.EnterpriseInfo;
|
||||||
|
import com.zhgd.xmgl.modules.worker.entity.EnterpriseQualification;
|
||||||
import com.zhgd.xmgl.modules.worker.entity.WorkerInfo;
|
import com.zhgd.xmgl.modules.worker.entity.WorkerInfo;
|
||||||
|
import com.zhgd.xmgl.modules.worker.service.IEnterpriseInfoService;
|
||||||
|
import com.zhgd.xmgl.modules.worker.service.IEnterpriseQualificationService;
|
||||||
import com.zhgd.xmgl.modules.worker.service.IWorkerInfoService;
|
import com.zhgd.xmgl.modules.worker.service.IWorkerInfoService;
|
||||||
|
import com.zhgd.xmgl.util.EmailUtils;
|
||||||
|
import com.zhgd.xmgl.util.FlowUtil;
|
||||||
import com.zhgd.xmgl.util.MessageUtil;
|
import com.zhgd.xmgl.util.MessageUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
@ -19,7 +31,11 @@ import io.swagger.annotations.ApiOperation;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections.MapUtils;
|
import org.apache.commons.collections.MapUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.context.annotation.Lazy;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@ -29,7 +45,7 @@ import java.util.stream.Collectors;
|
|||||||
* @Title: Controller
|
* @Title: Controller
|
||||||
* @Description: 项目劳务公司关联
|
* @Description: 项目劳务公司关联
|
||||||
* @author: pds
|
* @author: pds
|
||||||
* @date: 2020-08-13
|
* @date: 2020-08-13
|
||||||
* @version: V1.0
|
* @version: V1.0
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@ -37,14 +53,27 @@ import java.util.stream.Collectors;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Api(tags = "项目劳务公司关联")
|
@Api(tags = "项目劳务公司关联")
|
||||||
public class ProjectEnterpriseController {
|
public class ProjectEnterpriseController {
|
||||||
|
@Lazy
|
||||||
|
@Autowired
|
||||||
|
NoticeServiceImpl noticeService;
|
||||||
|
@Lazy
|
||||||
@Autowired
|
@Autowired
|
||||||
private IProjectEnterpriseService projectEnterpriseService;
|
private IProjectEnterpriseService projectEnterpriseService;
|
||||||
|
@Lazy
|
||||||
|
@Autowired
|
||||||
|
private IEnterpriseQualificationService enterpriseQualificationService;
|
||||||
|
@Lazy
|
||||||
|
@Autowired
|
||||||
|
private IEnterpriseInfoService enterpriseInfoService;
|
||||||
|
@Lazy
|
||||||
@Autowired
|
@Autowired
|
||||||
private IWorkerInfoService workerInfoService;
|
private IWorkerInfoService workerInfoService;
|
||||||
|
@Lazy
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISystemUserService systemUserService;
|
private ISystemUserService systemUserService;
|
||||||
|
@Lazy
|
||||||
|
@Autowired
|
||||||
|
private EmailUtils emailUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
@ -73,7 +102,7 @@ public class ProjectEnterpriseController {
|
|||||||
@ApiImplicitParam(name = "sn", value = "项目sn或企业sn", paramType = "body", required = true, dataType = "String"),
|
@ApiImplicitParam(name = "sn", value = "项目sn或企业sn", paramType = "body", required = true, dataType = "String"),
|
||||||
})
|
})
|
||||||
@PostMapping(value = "/selectList")
|
@PostMapping(value = "/selectList")
|
||||||
public Result<List<EntityMap>> selectProjectEnterpriseList(@RequestBody Map<String,Object> map) {
|
public Result<List<EntityMap>> selectProjectEnterpriseList(@RequestBody Map<String, Object> map) {
|
||||||
List<EntityMap> pageList = projectEnterpriseService.selectProjectEnterpriseList(map);
|
List<EntityMap> pageList = projectEnterpriseService.selectProjectEnterpriseList(map);
|
||||||
return Result.success(pageList);
|
return Result.success(pageList);
|
||||||
}
|
}
|
||||||
@ -84,7 +113,7 @@ public class ProjectEnterpriseController {
|
|||||||
@ApiImplicitParam(name = "sn", value = "项目sn或企业sn", paramType = "body", required = true, dataType = "String"),
|
@ApiImplicitParam(name = "sn", value = "项目sn或企业sn", paramType = "body", required = true, dataType = "String"),
|
||||||
})
|
})
|
||||||
@PostMapping(value = "/selectDetailList")
|
@PostMapping(value = "/selectDetailList")
|
||||||
public Result<List<Map<String, Object>>> selectDetailList(@RequestBody Map<String,Object> map) {
|
public Result<List<Map<String, Object>>> selectDetailList(@RequestBody Map<String, Object> map) {
|
||||||
map.put("pageNo", -1);
|
map.put("pageNo", -1);
|
||||||
map.put("pageSize", 10);
|
map.put("pageSize", 10);
|
||||||
IPage<EnterpriseInfo> pageList = projectEnterpriseService.selectProjectEnterprisePage(map);
|
IPage<EnterpriseInfo> pageList = projectEnterpriseService.selectProjectEnterprisePage(map);
|
||||||
@ -109,7 +138,8 @@ public class ProjectEnterpriseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加
|
* 添加
|
||||||
|
*
|
||||||
* @param projectEnterprise
|
* @param projectEnterprise
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -122,12 +152,13 @@ public class ProjectEnterpriseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑
|
* 编辑
|
||||||
|
*
|
||||||
* @param projectEnterprise
|
* @param projectEnterprise
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@OperLog(operModul = "合作单位管理",operType = "编辑合作的劳务公司",operDesc = "编辑合作的劳务公司")
|
@OperLog(operModul = "合作单位管理", operType = "编辑合作的劳务公司", operDesc = "编辑合作的劳务公司")
|
||||||
@ApiOperation(value = "编辑项目劳务公司关联信息", notes = "编辑项目劳务公司关联信息" , httpMethod="POST")
|
@ApiOperation(value = "编辑项目劳务公司关联信息", notes = "编辑项目劳务公司关联信息", httpMethod = "POST")
|
||||||
@PostMapping(value = "/edit")
|
@PostMapping(value = "/edit")
|
||||||
public Result<ProjectEnterprise> edit(@RequestBody ProjectEnterprise projectEnterprise) {
|
public Result<ProjectEnterprise> edit(@RequestBody ProjectEnterprise projectEnterprise) {
|
||||||
projectEnterpriseService.editProjectEnterprise(projectEnterprise);
|
projectEnterpriseService.editProjectEnterprise(projectEnterprise);
|
||||||
@ -135,64 +166,197 @@ public class ProjectEnterpriseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@OperLog(operModul = "合作单位管理",operType = "删除合作的劳务公司",operDesc = "删除合作的劳务公司")
|
@OperLog(operModul = "合作单位管理", operType = "删除合作的劳务公司", operDesc = "删除合作的劳务公司")
|
||||||
@ApiOperation(value = "删除项目劳务公司关联信息", notes = "删除项目劳务公司关联信息", httpMethod = "POST")
|
@ApiOperation(value = "删除项目劳务公司关联信息", notes = "删除项目劳务公司关联信息", httpMethod = "POST")
|
||||||
@ApiImplicitParam(name = "id", value = "项目劳务公司关联ID", paramType = "body", required = true, dataType = "Integer")
|
@ApiImplicitParam(name = "id", value = "项目劳务公司关联ID", paramType = "body", required = true, dataType = "Integer")
|
||||||
@PostMapping(value = "/delete")
|
@PostMapping(value = "/delete")
|
||||||
public Result<ProjectEnterprise> delete(@RequestBody Map<String,Object> map) {
|
public Result<ProjectEnterprise> delete(@RequestBody Map<String, Object> map) {
|
||||||
String id = MapUtils.getString(map, "id");
|
String id = MapUtils.getString(map, "id");
|
||||||
projectEnterpriseService.delete(id);
|
projectEnterpriseService.delete(id);
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@OperLog(operModul = "合作单位管理",operType = "批量删除合作的劳务公司",operDesc = "批量删除合作的劳务公司")
|
@OperLog(operModul = "合作单位管理", operType = "批量删除合作的劳务公司", operDesc = "批量删除合作的劳务公司")
|
||||||
@ApiOperation(value = "批量删除项目劳务公司关联信息", notes = "批量删除项目劳务公司关联信息", httpMethod = "POST")
|
@ApiOperation(value = "批量删除项目劳务公司关联信息", notes = "批量删除项目劳务公司关联信息", httpMethod = "POST")
|
||||||
@ApiImplicitParam(name = "ids", value = "项目劳务公司关联ID字符串", paramType = "body", required = true, dataType = "String")
|
@ApiImplicitParam(name = "ids", value = "项目劳务公司关联ID字符串", paramType = "body", required = true, dataType = "String")
|
||||||
@PostMapping(value = "/deleteBatch")
|
@PostMapping(value = "/deleteBatch")
|
||||||
public Result<ProjectEnterprise> deleteBatch(@RequestBody Map<String,Object> map) {
|
public Result<ProjectEnterprise> deleteBatch(@RequestBody Map<String, Object> map) {
|
||||||
projectEnterpriseService.deleteBatch(map);
|
projectEnterpriseService.deleteBatch(map);
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id查询
|
* 通过id查询
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "通过id查询项目劳务公司关联信息", notes = "通过id查询项目劳务公司关联信息", httpMethod = "POST")
|
@ApiOperation(value = "通过id查询项目劳务公司关联信息", notes = "通过id查询项目劳务公司关联信息", httpMethod = "POST")
|
||||||
@ApiImplicitParam(name = "id", value = "项目劳务公司关联ID", paramType = "body", required = true, dataType = "Integer")
|
@ApiImplicitParam(name = "id", value = "项目劳务公司关联ID", paramType = "body", required = true, dataType = "Integer")
|
||||||
@PostMapping(value = "/queryById")
|
@PostMapping(value = "/queryById")
|
||||||
public Result<ProjectEnterprise> queryById(@RequestBody Map<String,Object> map) {
|
public Result<ProjectEnterprise> queryById(@RequestBody Map<String, Object> map) {
|
||||||
Result<ProjectEnterprise> result = new Result<ProjectEnterprise>();
|
Result<ProjectEnterprise> result = new Result<ProjectEnterprise>();
|
||||||
ProjectEnterprise projectEnterprise = projectEnterpriseService.getById(MapUtils.getString(map,"id"));
|
ProjectEnterprise projectEnterprise = projectEnterpriseService.getById(MapUtils.getString(map, "id"));
|
||||||
if(projectEnterprise==null) {
|
if (projectEnterprise == null) {
|
||||||
result.error500(MessageUtil.get("notFindErr"));
|
result.error500(MessageUtil.get("notFindErr"));
|
||||||
}else {
|
} else {
|
||||||
result.setResult(projectEnterprise);
|
result.setResult(projectEnterprise);
|
||||||
result.setSuccess(true);
|
result.setSuccess(true);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "修改项目下劳务公司企业类型", notes = "修改项目下劳务公司企业类型" , httpMethod="POST")
|
@ApiOperation(value = "修改项目下劳务公司企业类型", notes = "修改项目下劳务公司企业类型", httpMethod = "POST")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "enterpriseTypeId", value = "企业类型ID", paramType = "body", required = true, dataType = "String"),
|
@ApiImplicitParam(name = "enterpriseTypeId", value = "企业类型ID", paramType = "body", required = true, dataType = "String"),
|
||||||
@ApiImplicitParam(name = "ids", value = "项目劳务公司关联ID,多个逗号分隔", paramType = "body", required = true, dataType = "Integer")
|
@ApiImplicitParam(name = "ids", value = "项目劳务公司关联ID,多个逗号分隔", paramType = "body", required = true, dataType = "Integer")
|
||||||
})
|
})
|
||||||
@PostMapping(value = "/updateEnterpriseType")
|
@PostMapping(value = "/updateEnterpriseType")
|
||||||
public Result<ProjectEnterprise> updateEnterpriseType(@RequestBody Map<String,Object> map) {
|
public Result<ProjectEnterprise> updateEnterpriseType(@RequestBody Map<String, Object> map) {
|
||||||
projectEnterpriseService.updateEnterpriseType(map);
|
projectEnterpriseService.updateEnterpriseType(map);
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperLog(operModul = "合作单位管理", operType = "", operDesc = "工作流承包商入场")
|
||||||
|
@ApiOperation(value = "工作流承包商入场", notes = "工作流承包商入场", httpMethod = "POST")
|
||||||
|
@PostMapping(value = "/flow/add")
|
||||||
|
public Result<ProjectEnterprise> addFromFlow(@RequestBody Map<String, Object> map) {
|
||||||
|
log.info("工作流承包商入场:{}", JSON.toJSONString(map));
|
||||||
|
String title = "承包商入场申请";
|
||||||
|
String enterpriseName = FlowUtil.getString(map, "enterpriseName");
|
||||||
|
String description = FlowUtil.getString(map, "description");
|
||||||
|
String enterpriseAddress = FlowUtil.getString(map, "enterpriseAddress");
|
||||||
|
String enterpriseLegalPerson = FlowUtil.getString(map, "enterpriseLegalPerson");
|
||||||
|
String legalPersonIdCard = FlowUtil.getString(map, "legalPersonIdCard");
|
||||||
|
String enterpriseSafeAllow = FlowUtil.getString(map, "enterpriseSafeAllow");
|
||||||
|
String legalPersonTel = FlowUtil.getString(map, "legalPersonTel");
|
||||||
|
String socialCode = FlowUtil.getString(map, "socialCode");
|
||||||
|
String businessNumber = FlowUtil.getString(map, "businessNumber");
|
||||||
|
String qualificationNumber = FlowUtil.getString(map, "qualificationNumber");
|
||||||
|
String enterpriseEmail = FlowUtil.getString(map, "enterpriseEmail");
|
||||||
|
String registeredCapital = FlowUtil.getString(map, "registeredCapital");
|
||||||
|
String bankname = FlowUtil.getString(map, "bankname");
|
||||||
|
String bankcardnumber = FlowUtil.getString(map, "bankcardnumber");
|
||||||
|
String bankcode = FlowUtil.getString(map, "bankcode");
|
||||||
|
String enterpriseQualificationUrl = FlowUtil.getString(map, "enterpriseQualificationUrl");
|
||||||
|
String businessLicenseEndDate = FlowUtil.getString(map, "businessLicenseEndDate");
|
||||||
|
String registerPersonName = FlowUtil.getString(map, "registerPersonName");
|
||||||
|
String registerPersonPhoneTel = FlowUtil.getString(map, "registerPersonPhoneTel");
|
||||||
|
String enterpriseSn = FlowUtil.getString(map, "enterpriseSn");
|
||||||
|
String logo = FlowUtil.getString(map, "logo");
|
||||||
|
String projectSn = FlowUtil.getString(map, "projectSn");
|
||||||
|
String registDate = FlowUtil.getString(map, "registDate");
|
||||||
|
String businessLicenseUrl = FlowUtil.getString(map, "businessLicenseUrl");
|
||||||
|
String projectDirectorName = FlowUtil.getString(map, "projectDirectorName");
|
||||||
|
String projectDirectorPhone = FlowUtil.getString(map, "projectDirectorPhone");
|
||||||
|
Long parentEnterpriseId = FlowUtil.getPullDownLong(map, "parentEnterpriseId");
|
||||||
|
Long enterpriseTypeId = FlowUtil.getPullDownLong(map, "enterpriseTypeId");
|
||||||
|
EnterpriseInfo enterpriseInfo = new EnterpriseInfo();
|
||||||
|
enterpriseInfo.setEnterpriseName(enterpriseName);
|
||||||
|
enterpriseInfo.setDescription(description);
|
||||||
|
enterpriseInfo.setEnterpriseAddress(enterpriseAddress);
|
||||||
|
enterpriseInfo.setEnterpriseLegalPerson(enterpriseLegalPerson);
|
||||||
|
enterpriseInfo.setLegalPersonIdCard(legalPersonIdCard);
|
||||||
|
enterpriseInfo.setEnterpriseSafeAllow(enterpriseSafeAllow);
|
||||||
|
// enterpriseInfo.setEnterpriseProperty(0);
|
||||||
|
enterpriseInfo.setLegalPersonTel(legalPersonTel);
|
||||||
|
enterpriseInfo.setSocialCode(socialCode);
|
||||||
|
enterpriseInfo.setBusinessNumber(businessNumber);
|
||||||
|
// enterpriseInfo.setQualificationNumber(qualificationNumber);
|
||||||
|
// enterpriseInfo.setEnterpriseEmail(enterpriseEmail);
|
||||||
|
// enterpriseInfo.setRegisteredCapital(registeredCapital);
|
||||||
|
// enterpriseInfo.setBankname(bankname);
|
||||||
|
// enterpriseInfo.setBankcardnumber(bankcardnumber);
|
||||||
|
// enterpriseInfo.setBankcode(bankcode);
|
||||||
|
enterpriseInfo.setEnterpriseQualificationUrl(enterpriseQualificationUrl);
|
||||||
|
enterpriseInfo.setBusinessLicenseEndDate(businessLicenseEndDate);
|
||||||
|
enterpriseInfo.setRegisterPersonName(registerPersonName);
|
||||||
|
enterpriseInfo.setRegisterPersonPhoneTel(registerPersonPhoneTel);
|
||||||
|
enterpriseInfo.setEnterpriseSn(enterpriseSn);
|
||||||
|
// enterpriseInfo.setLogo(logo);
|
||||||
|
enterpriseInfo.setRegistDate(registDate);
|
||||||
|
enterpriseInfo.setBusinessLicenseUrl(businessLicenseUrl);
|
||||||
|
enterpriseInfo.setParentEnterpriseId(parentEnterpriseId);
|
||||||
|
enterpriseInfo.setEnterpriseTypeId(enterpriseTypeId);
|
||||||
|
enterpriseInfo.setProjectDirectorName(projectDirectorName);
|
||||||
|
enterpriseInfo.setProjectDirectorPhone(projectDirectorPhone);
|
||||||
|
enterpriseInfo.setProjectSn(projectSn);
|
||||||
|
String sub = enterpriseName + "(信用代码:" + socialCode + ")";
|
||||||
|
EnterpriseInfo existEnterpriseInfo = enterpriseInfoService.getOne(new LambdaQueryWrapper<EnterpriseInfo>().eq(EnterpriseInfo::getSocialCode, socialCode));
|
||||||
|
if (existEnterpriseInfo != null) {
|
||||||
|
List<ProjectEnterprise> projectEnterpriseList = projectEnterpriseService.list(new LambdaQueryWrapper<ProjectEnterprise>()
|
||||||
|
.eq(ProjectEnterprise::getEnterpriseId, existEnterpriseInfo.getId())
|
||||||
|
.eq(ProjectEnterprise::getProjectSn, projectSn));
|
||||||
|
if (CollUtil.isNotEmpty(projectEnterpriseList)) {
|
||||||
|
String msg = sub + "已存在";
|
||||||
|
noticeService.addProjectLevelNotice(projectSn, title, msg, "1", null);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
List enterpriseQualifications = Optional.ofNullable(map.get("enterpriseQualifications")).map(o -> ((List) o)).orElse(null);
|
||||||
|
if (CollUtil.isEmpty(enterpriseQualifications)) {
|
||||||
|
throw new OpenAlertException("企业资质不能为空");
|
||||||
|
}
|
||||||
|
HashSet<Integer> haveQualificationTypes = new HashSet<>();
|
||||||
|
if (Objects.equals(enterpriseTypeId, 6)) {
|
||||||
|
//专业分包
|
||||||
|
haveQualificationTypes.add(1);
|
||||||
|
haveQualificationTypes.add(3);
|
||||||
|
haveQualificationTypes.add(4);
|
||||||
|
haveQualificationTypes.add(5);
|
||||||
|
haveQualificationTypes.add(6);
|
||||||
|
haveQualificationTypes.add(7);
|
||||||
|
} else {
|
||||||
|
haveQualificationTypes.add(1);
|
||||||
|
haveQualificationTypes.add(2);
|
||||||
|
}
|
||||||
|
ArrayList<EnterpriseQualification> qualificationList = new ArrayList<>();
|
||||||
|
for (Object qr : enterpriseQualifications) {
|
||||||
|
Map map1 = (Map) qr;
|
||||||
|
String fileName = MapUtils.getString(map1, "field3157982972904");
|
||||||
|
String fileNumber = MapUtils.getString(map1, "field1097582981600");
|
||||||
|
String fileUrl = FlowUtil.getFileUrl(map1, "field9706683030062");
|
||||||
|
String remarks = MapUtils.getString(map1, "field8724783057283");
|
||||||
|
String originFileName = FlowUtil.getFileOriginFileName(map1, "field9706683030062");
|
||||||
|
Integer qualificationType = Optional.ofNullable(map1.get("field6906058457282")).map(o -> Convert.toInt(((List) o).get(0))).orElse(null);
|
||||||
|
Date qualificationStartTime = FlowUtil.getStartDate(map1, "field8056482998908");
|
||||||
|
Date qualificationEndTime = FlowUtil.getEndDate(map1, "field8056482998908");
|
||||||
|
haveQualificationTypes.remove(qualificationType);
|
||||||
|
EnterpriseQualification qualification = new EnterpriseQualification();
|
||||||
|
// qualification.setEnterpriseId(0L);
|
||||||
|
qualification.setFileName(fileName);
|
||||||
|
qualification.setFileNumber(fileNumber);
|
||||||
|
qualification.setFileUrl(fileUrl);
|
||||||
|
qualification.setRemarks(remarks);
|
||||||
|
qualification.setOriginFileName(originFileName);
|
||||||
|
qualification.setQualificationType(qualificationType);
|
||||||
|
qualification.setQualificationStartTime(qualificationStartTime);
|
||||||
|
qualification.setQualificationEndTime(qualificationEndTime);
|
||||||
|
qualificationList.add(qualification);
|
||||||
|
}
|
||||||
|
if (CollUtil.isNotEmpty(haveQualificationTypes)) {
|
||||||
|
if (Objects.equals(enterpriseTypeId, 6)) {
|
||||||
|
throw new OpenAlertException("需要上传营业执照、企业资质、设计资质(设计专业提供)、安全生产许可证、职业健康安全管理体系认证证书、环境管理体系认证证书");
|
||||||
|
} else {
|
||||||
|
throw new OpenAlertException("需要上传营业执照、资质证书");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
enterpriseInfoService.saveEnterpriseInfo(enterpriseInfo);
|
||||||
|
for (EnterpriseQualification qualification : qualificationList) {
|
||||||
|
qualification.setEnterpriseId(enterpriseInfo.getId());
|
||||||
|
}
|
||||||
|
enterpriseQualificationService.saveBatch(qualificationList);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -75,6 +75,22 @@ public class EnterpriseQualification implements Serializable {
|
|||||||
@Excel(name = "资质类型(字典)", width = 15)
|
@Excel(name = "资质类型(字典)", width = 15)
|
||||||
@ApiModelProperty(value = "资质类型(字典)")
|
@ApiModelProperty(value = "资质类型(字典)")
|
||||||
private java.lang.Integer qualificationType;
|
private java.lang.Integer qualificationType;
|
||||||
|
/**
|
||||||
|
* 资质开始时间
|
||||||
|
*/
|
||||||
|
@Excel(name = "资质开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "资质开始时间")
|
||||||
|
private java.util.Date qualificationStartTime;
|
||||||
|
/**
|
||||||
|
* 资质结束时间
|
||||||
|
*/
|
||||||
|
@Excel(name = "资质结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "资质结束时间")
|
||||||
|
private java.util.Date qualificationEndTime;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Long userId;
|
private Long userId;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
|||||||
@ -80,6 +80,9 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
|
|
||||||
http.authorizeRequests()
|
http.authorizeRequests()
|
||||||
//请求路径允许访问
|
//请求路径允许访问
|
||||||
|
.antMatchers("/xmgl/projectEnterprise/flow/add").permitAll()
|
||||||
|
.antMatchers("/xmgl/flowExceptionLog/flow/add").permitAll()
|
||||||
|
.antMatchers("/xmgl/flowExceptionLog/add").permitAll()
|
||||||
.antMatchers("/xmgl/civilEngineeringQualityInspectionOrder/flow/add").permitAll()
|
.antMatchers("/xmgl/civilEngineeringQualityInspectionOrder/flow/add").permitAll()
|
||||||
.antMatchers("/xmgl/nondestructiveTestOrderTicket/flow/add").permitAll()
|
.antMatchers("/xmgl/nondestructiveTestOrderTicket/flow/add").permitAll()
|
||||||
.antMatchers("/xmgl/constructionEquipmentTool/flow/add").permitAll()
|
.antMatchers("/xmgl/constructionEquipmentTool/flow/add").permitAll()
|
||||||
|
|||||||
@ -62,6 +62,14 @@ public class FlowUtil {
|
|||||||
return Optional.ofNullable(map.get(key)).map(o -> DateUtil.parse(o.toString())).orElse(null);
|
return Optional.ofNullable(map.get(key)).map(o -> DateUtil.parse(o.toString())).orElse(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Date getStartDate(Map<String, Object> map, String key) {
|
||||||
|
return Optional.ofNullable(map.get(key)).map(o -> DateUtil.parse(Convert.toStr(((List) o).get(0)))).orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Date getEndDate(Map<String, Object> map, String key) {
|
||||||
|
return Optional.ofNullable(map.get(key)).map(o -> DateUtil.parse(Convert.toStr(((List) o).get(1)))).orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
public static String getJSONString(Map<String, Object> map, String key) {
|
public static String getJSONString(Map<String, Object> map, String key) {
|
||||||
return Optional.ofNullable(map.get(key)).map(JSON::toJSONString).orElse(null);
|
return Optional.ofNullable(map.get(key)).map(JSON::toJSONString).orElse(null);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user