Commit 9b81ca6f authored by zhengjuzi's avatar zhengjuzi

Merge branch 'developer' of http://39.98.45.134:8090/moa/amos-boot-biz into developer

# Conflicts: # amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/VerifyMapper.xml
parents 80cc1813 c72c4ae1
...@@ -43,7 +43,7 @@ public class RectifyMsgDto extends BaseDto { ...@@ -43,7 +43,7 @@ public class RectifyMsgDto extends BaseDto {
private String generateStage; private String generateStage;
@ApiModelProperty(value = "质量问题描述") @ApiModelProperty(value = "质量问题描述")
private String desc; private String problemDescribe;
@ApiModelProperty(value = "项目名称") @ApiModelProperty(value = "项目名称")
private String name; private String name;
......
...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.ugp.api.mapper; ...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.ugp.api.mapper;
import com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto; import com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.Attachment; import com.yeejoin.amos.boot.module.ugp.api.entity.Attachment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
/** /**
...@@ -19,4 +20,6 @@ public interface AttachmentMapper extends BaseMapper<Attachment> { ...@@ -19,4 +20,6 @@ public interface AttachmentMapper extends BaseMapper<Attachment> {
//根据source_id查询附件 //根据source_id查询附件
AttachmentDto selectAttBySeq(Long sourceId); AttachmentDto selectAttBySeq(Long sourceId);
@Select("select info from tz_ugp_attachment where source_id =#{sourceId}")
AttachmentDto getAttachment(Long sourceId);
} }
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<if test="constructionUnit != '' and constructionUnit != null"> <if test="constructionUnit != '' and constructionUnit != null">
and a.construction_unit LIKE concat("%",#{constructionUnit},"%") and a.construction_unit LIKE concat("%",#{constructionUnit},"%")
</if> </if>
<if test="ids != null" > <if test="ids != null and ids.size > 0 " >
and a.project_id in and a.project_id in
<foreach collection="ids" item = "item" index="index" open="(" separator="," close=")"> <foreach collection="ids" item = "item" index="index" open="(" separator="," close=")">
#{item} #{item}
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<if test="roleName == '设计单位'"> <if test="roleName == '设计单位'">
and design_unit_id = #{companyId} and design_unit_id = #{companyId}
</if> </if>
<if test="codes != null "> <if test="codes != null and codes.size > 0">
<if test="roleName == '监察部门' or roleName == '监检机构'"> <if test="roleName == '监察部门' or roleName == '监检机构'">
and install_region_code in and install_region_code in
<foreach collection="codes" item = "item" index="index" open="(" separator="," close=")"> <foreach collection="codes" item = "item" index="index" open="(" separator="," close=")">
......
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
<if test="roleName == '设计单位'"> <if test="roleName == '设计单位'">
and design_unit_id = #{companyId} and design_unit_id = #{companyId}
</if> </if>
<if test="codes != null "> <if test="codes != null and codes.size > 0">
<if test="roleName == '监察部门' or roleName == '监检机构'"> <if test="roleName == '监察部门' or roleName == '监检机构'">
and install_region_code in and install_region_code in
<foreach collection="codes" item = "item" index="index" open="(" separator="," close=")"> <foreach collection="codes" item = "item" index="index" open="(" separator="," close=")">
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
LEFT JOIN tz_ugp_project AS project ON project.sequence_nbr = resource.project_id LEFT JOIN tz_ugp_project AS project ON project.sequence_nbr = resource.project_id
<where> <where>
resource.type = #{type} resource.type = #{type}
<if test="projectResourceDto !=null"> <if test="projectResourceDto != null">
<if test="projectResourceDto.name !=null and projectResourceDto.name != ''"> <if test="projectResourceDto.name !=null and projectResourceDto.name != ''">
and material.`name` LIKE CONCAT("%",#{projectResourceDto.name},"%") and material.`name` LIKE CONCAT("%",#{projectResourceDto.name},"%")
</if> </if>
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
and project.`name` LIKE CONCAT("%",#{projectResourceDto.projectName},"%") and project.`name` LIKE CONCAT("%",#{projectResourceDto.projectName},"%")
</if> </if>
</if> </if>
<if test="codes !=null"> <if test="codes !=null and codes.size > 0">
AND resource.project_id in AND resource.project_id in
<foreach collection="codes" item = "item" index="index" open="(" separator="," close=")"> <foreach collection="codes" item = "item" index="index" open="(" separator="," close=")">
#{item} #{item}
...@@ -187,7 +187,10 @@ ...@@ -187,7 +187,10 @@
LEFT JOIN tz_ugp_project AS project ON project.sequence_nbr = resource.project_id LEFT JOIN tz_ugp_project AS project ON project.sequence_nbr = resource.project_id
LEFT JOIN tz_ugp_equipment AS equipment ON equipment.sequence_nbr = resource.resource_id LEFT JOIN tz_ugp_equipment AS equipment ON equipment.sequence_nbr = resource.resource_id
<where> <where>
<if test="type!=null and type!=''">
resource.type = #{type} resource.type = #{type}
</if>
<if test="projectResourceDto !=null"> <if test="projectResourceDto !=null">
<if test="projectResourceDto.name !=null and projectResourceDto.name != ''"> <if test="projectResourceDto.name !=null and projectResourceDto.name != ''">
and equipment.`name` LIKE CONCAT("%",#{projectResourceDto.name},"%") and equipment.`name` LIKE CONCAT("%",#{projectResourceDto.name},"%")
...@@ -196,7 +199,7 @@ ...@@ -196,7 +199,7 @@
and project.`name` LIKE CONCAT("%",#{projectResourceDto.projectName},"%") and project.`name` LIKE CONCAT("%",#{projectResourceDto.projectName},"%")
</if> </if>
</if> </if>
<if test="codes !=null"> <if test="codes !=null and codes.size > 0">
AND resource.project_id in AND resource.project_id in
<foreach collection="codes" item="item" index="index" open="(" separator="," close=")"> <foreach collection="codes" item="item" index="index" open="(" separator="," close=")">
#{item} #{item}
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<if test="qualityProblemDto.code != '' and qualityProblemDto.code != null"> <if test="qualityProblemDto.code != '' and qualityProblemDto.code != null">
and qi.`code` like concat("%",#{qualityProblemDto.code},"%") and qi.`code` like concat("%",#{qualityProblemDto.code},"%")
</if> </if>
<if test="projectIds != null"> <if test="projectIds != null and projectIds.size > 0">
and qi.project_id in and qi.project_id in
<foreach collection="projectIds" index="index" item="item" open="(" close=")" separator=","> <foreach collection="projectIds" index="index" item="item" open="(" close=")" separator=",">
#{item} #{item}
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
order by vf.verify_time desc ORDER BY vf.verify_time DESC
</select> </select>
......
...@@ -293,7 +293,7 @@ public class ProjectResourceController extends BaseController { ...@@ -293,7 +293,7 @@ public class ProjectResourceController extends BaseController {
@ApiOperation(httpMethod = "get",value = "根据当前登录人获取登录人参与的项目列表", notes = "根据当前登录人获取登录人参与的项目列表") @ApiOperation(httpMethod = "get",value = "根据当前登录人获取登录人参与的项目列表", notes = "根据当前登录人获取登录人参与的项目列表")
public ResponseModel<List<Project>> selectByUserId(){ public ResponseModel<List<Project>> selectByUserId(){
List<Project> projectList = projectResourceServiceImpl.getProjectList(); List<Project> projectList = projectResourceServiceImpl.getProjectList();
projectList = projectList.stream().filter(r -> r.getStatus().equals(ProjectInitiationEnum.流程结束.getName())).collect(Collectors.toList()); projectList = projectList.stream().filter(r -> ProjectInitiationEnum.流程结束.getName().equals(r.getStatus())).collect(Collectors.toList());
return ResponseHelper.buildResponse(projectList); return ResponseHelper.buildResponse(projectList);
} }
} }
...@@ -12,6 +12,8 @@ import com.yeejoin.amos.boot.module.ugp.api.mapper.AttachmentMapper; ...@@ -12,6 +12,8 @@ import com.yeejoin.amos.boot.module.ugp.api.mapper.AttachmentMapper;
import com.yeejoin.amos.boot.module.ugp.api.service.IAttachmentService; import com.yeejoin.amos.boot.module.ugp.api.service.IAttachmentService;
import com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto; import com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto;
import com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify; import com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify;
import org.apache.commons.lang.StringUtils;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
...@@ -38,6 +40,8 @@ public class AttachmentServiceImpl extends BaseService<AttachmentDto,Attachment, ...@@ -38,6 +40,8 @@ public class AttachmentServiceImpl extends BaseService<AttachmentDto,Attachment,
@Autowired @Autowired
OrgUsrServiceImpl orgUsrService; OrgUsrServiceImpl orgUsrService;
@Autowired
private AttachmentMapper attachmentMapper;
/** /**
* 分页查询 * 分页查询
*/ */
...@@ -97,4 +101,14 @@ public class AttachmentServiceImpl extends BaseService<AttachmentDto,Attachment, ...@@ -97,4 +101,14 @@ public class AttachmentServiceImpl extends BaseService<AttachmentDto,Attachment,
return map; return map;
} }
//source_id和附件类型查询数据
public AttachmentDto getAttachment(Long sourceId){
if (sourceId == null ) {
return new AttachmentDto();
}
return attachmentMapper.getAttachment(sourceId);
}
} }
\ No newline at end of file
...@@ -228,4 +228,9 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E ...@@ -228,4 +228,9 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
} }
public Equipment getEquipment(Long e){
return equipmentMapper.selectById(e);
}
} }
\ No newline at end of file
...@@ -71,6 +71,11 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta ...@@ -71,6 +71,11 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
String id = String.valueOf(project.getSequenceNbr()); String id = String.valueOf(project.getSequenceNbr());
ids.add(id); ids.add(id);
} }
if(ValidationUtil.isEmpty(ids)){
return page;
}
Page<InstallNoticePageDto> installNoticePage = installNoticeMapper.installNoticePage(page,name,constructionUnit,ids); Page<InstallNoticePageDto> installNoticePage = installNoticeMapper.installNoticePage(page,name,constructionUnit,ids);
List<InstallNoticePageDto> installNoticePageDtos = installNoticePage.getRecords(); List<InstallNoticePageDto> installNoticePageDtos = installNoticePage.getRecords();
for(InstallNoticePageDto installNoticePageDto:installNoticePageDtos){ for(InstallNoticePageDto installNoticePageDto:installNoticePageDtos){
......
...@@ -15,6 +15,7 @@ import com.yeejoin.amos.boot.module.ugp.api.mapper.AttachmentMapper; ...@@ -15,6 +15,7 @@ import com.yeejoin.amos.boot.module.ugp.api.mapper.AttachmentMapper;
import com.yeejoin.amos.boot.module.ugp.api.mapper.MaterialMapper; import com.yeejoin.amos.boot.module.ugp.api.mapper.MaterialMapper;
import com.yeejoin.amos.boot.module.ugp.api.service.IMaterialService; import com.yeejoin.amos.boot.module.ugp.api.service.IMaterialService;
import com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify; import com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
...@@ -39,6 +40,8 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate ...@@ -39,6 +40,8 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
AttachmentMapper attachmentMapper; AttachmentMapper attachmentMapper;
@Autowired @Autowired
OrgServiceImpl orgService; OrgServiceImpl orgService;
@Autowired
MaterialMapper materialMapper;
/** /**
* 分页查询 * 分页查询
*/ */
...@@ -165,4 +168,9 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate ...@@ -165,4 +168,9 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
} }
return jsonObject; return jsonObject;
} }
public Material getMaterial(Long materialId){
Material material = materialMapper.selectById(materialId);
return material;
}
} }
\ No newline at end of file
...@@ -80,7 +80,9 @@ public class OrgServiceImpl { ...@@ -80,7 +80,9 @@ public class OrgServiceImpl {
dynamicFormInstance.setFormColumnId(dynamicFormColumn.getSequenceNbr()); dynamicFormInstance.setFormColumnId(dynamicFormColumn.getSequenceNbr());
//通过字段名去拿到表单传来的值 //通过字段名去拿到表单传来的值
if("image".equals(dynamicFormColumn.getFieldCode())){ if("image".equals(dynamicFormColumn.getFieldCode())){
if(!ValidationUtil.isEmpty(jsonObject.getJSONArray(dynamicFormInstance.getFieldCode()))){
dynamicFormInstance.setFieldValue(JSON.toJSONString(jsonObject.getJSONArray(dynamicFormInstance.getFieldCode()))); dynamicFormInstance.setFieldValue(JSON.toJSONString(jsonObject.getJSONArray(dynamicFormInstance.getFieldCode())));
}
}else{ }else{
dynamicFormInstance.setFieldValue(jsonObject.getString(dynamicFormInstance.getFieldCode())); dynamicFormInstance.setFieldValue(jsonObject.getString(dynamicFormInstance.getFieldCode()));
} }
...@@ -270,7 +272,7 @@ public class OrgServiceImpl { ...@@ -270,7 +272,7 @@ public class OrgServiceImpl {
map.put("sequenceNbr",sequenceNbr); map.put("sequenceNbr",sequenceNbr);
for (DynamicFormInstance dynamicFormInstance : dynamicFormInstanceList) { for (DynamicFormInstance dynamicFormInstance : dynamicFormInstanceList) {
if("image".equals(dynamicFormInstance.getFieldCode())){ if("image".equals(dynamicFormInstance.getFieldCode())){
if(!ValidationUtil.isEmpty(dynamicFormInstance.getFieldValue())){ if(!ValidationUtil.isEmpty(dynamicFormInstance.getFieldValue()) || !"null".equals(dynamicFormInstance.getFieldValue())){
map.put(dynamicFormInstance.getFieldCode(),JSON.parseArray(dynamicFormInstance.getFieldValue())); map.put(dynamicFormInstance.getFieldCode(),JSON.parseArray(dynamicFormInstance.getFieldValue()));
} }
} else { } else {
......
...@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.ugp.api.mapper.QualityProblemMapper; ...@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.ugp.api.mapper.QualityProblemMapper;
import com.yeejoin.amos.boot.module.ugp.api.service.IQualityProblemService; import com.yeejoin.amos.boot.module.ugp.api.service.IQualityProblemService;
import com.yeejoin.amos.boot.module.ugp.api.dto.QualityProblemDto; import com.yeejoin.amos.boot.module.ugp.api.dto.QualityProblemDto;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...@@ -64,9 +65,21 @@ public class QualityProblemServiceImpl extends BaseService<QualityProblemDto,Qua ...@@ -64,9 +65,21 @@ public class QualityProblemServiceImpl extends BaseService<QualityProblemDto,Qua
page = qualityProblemMapper.getItems(page,qualityProblemDto,projectIds); page = qualityProblemMapper.getItems(page,qualityProblemDto,projectIds);
List<QualityProblemDto> qualityProblemDtoList = page.getRecords(); List<QualityProblemDto> qualityProblemDtoList = page.getRecords();
for (QualityProblemDto qualityProblemDto1 : qualityProblemDtoList) { for (QualityProblemDto qualityProblemDto1 : qualityProblemDtoList) {
if(!ValidationUtil.isEmpty(qualityProblemDto1.getChargerPersonId())){
if(!ValidationUtil.isEmpty(orgService.getOrgUsrById(qualityProblemDto1.getChargerPersonId()))){
qualityProblemDto1.setChargerPersonName(orgService.getOrgUsrById(qualityProblemDto1.getChargerPersonId()).getBizOrgName()); qualityProblemDto1.setChargerPersonName(orgService.getOrgUsrById(qualityProblemDto1.getChargerPersonId()).getBizOrgName());
}
}
if(!ValidationUtil.isEmpty(qualityProblemDto1.getInspectorId())){
if(!ValidationUtil.isEmpty(orgService.getOrgUsrById(qualityProblemDto1.getInspectorId()))){
qualityProblemDto1.setInspectorName(orgService.getOrgUsrById(qualityProblemDto1.getInspectorId()).getBizOrgName()); qualityProblemDto1.setInspectorName(orgService.getOrgUsrById(qualityProblemDto1.getInspectorId()).getBizOrgName());
}
}
if (!ValidationUtil.isEmpty(qualityProblemDto1.getVerifyUnitId())) {
if(!ValidationUtil.isEmpty(orgService.getOrgUsrById(qualityProblemDto1.getVerifyUnitId()))){
qualityProblemDto1.setVerifyUnitName(orgService.getOrgUsrById(qualityProblemDto1.getVerifyUnitId()).getBizOrgName()); qualityProblemDto1.setVerifyUnitName(orgService.getOrgUsrById(qualityProblemDto1.getVerifyUnitId()).getBizOrgName());
}
}
list.add(qualityProblemDto1); list.add(qualityProblemDto1);
} }
page.setRecords(list); page.setRecords(list);
......
...@@ -86,7 +86,9 @@ public class WelderServiceImpl { ...@@ -86,7 +86,9 @@ public class WelderServiceImpl {
@BusinessIdentify @BusinessIdentify
public OrgUsrDto savePerson(JSONObject jsonObject, String bizOrgType, String sequenceNbr){ public OrgUsrDto savePerson(JSONObject jsonObject, String bizOrgType, String sequenceNbr){
if(ValidationUtil.isEmpty(sequenceNbr)){ if(ValidationUtil.isEmpty(sequenceNbr)){
Long companyId = orgService.getReginParams().getCompany().getSequenceNbr(); Long companyId= orgService.getReginParams().getCompany().getSequenceNbr();
Long companyUserId = orgService.getReginParams().getBusinessInfo().getCompanySequenceNbr();
String orgexpand = orgService.getOrgUsrById(String.valueOf(companyUserId)).getOrgExpandAttr1();
Set<String> roleNameSet = new HashSet<>(); Set<String> roleNameSet = new HashSet<>();
List<RoleModel> userRoleList = new ArrayList<>(); List<RoleModel> userRoleList = new ArrayList<>();
List<Long> roleIds = new ArrayList<>(); List<Long> roleIds = new ArrayList<>();
...@@ -104,7 +106,24 @@ public class WelderServiceImpl { ...@@ -104,7 +106,24 @@ public class WelderServiceImpl {
agencyUserModel.setRePassword(DesUtil.encode(jsonObject.getString("phone"), secretKey)); agencyUserModel.setRePassword(DesUtil.encode(jsonObject.getString("phone"), secretKey));
//用户角色信息 //用户角色信息
List<RoleModel> allRoleList = Privilege.roleClient.queryRoleList(null,null).getResult(); List<RoleModel> allRoleList = Privilege.roleClient.queryRoleList(null,null).getResult();
if(orgexpand.equals(OrgEnum.安装单位.getKey())){
if(jsonObject.getString("isWelder").equals("1")){
roleNameSet.add(OrgEnum.普通人员.getName()); roleNameSet.add(OrgEnum.普通人员.getName());
}else{
roleNameSet.add(OrgEnum.安装单位.getName());
}
}else if(orgexpand.equals(OrgEnum.建设单位.getKey())){
roleNameSet.add(OrgEnum.建设单位.getName());
}else if(orgexpand.equals(OrgEnum.监察部门.getKey())){
roleNameSet.add(OrgEnum.监察部门.getName());
}else if(orgexpand.equals(OrgEnum.监检机构.getKey())){
roleNameSet.add(OrgEnum.监检机构.getName());
}else if(orgexpand.equals(OrgEnum.设计单位.getKey())){
roleNameSet.add(OrgEnum.设计单位.getName());
}
//给登录人身份配置 //给登录人身份配置
userRoleList = allRoleList.stream().filter(r -> { userRoleList = allRoleList.stream().filter(r -> {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment