Commit b9a2e146 authored by wanglong's avatar wanglong

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

parents b48501de 7c5bb785
...@@ -95,9 +95,9 @@ public class ControllerAop { ...@@ -95,9 +95,9 @@ public class ControllerAop {
// 不需要校验token的接口直接返回 // 不需要校验token的接口直接返回
if (joinPoint.getSignature() instanceof MethodSignature) { if (joinPoint.getSignature() instanceof MethodSignature) {
if (!((MethodSignature) joinPoint.getSignature()).getMethod().getAnnotation(TycloudOperation.class).needAuth() && !request.getParameterMap().containsKey("token") && ValidationUtil.isEmpty(token)) { // if (!((MethodSignature) joinPoint.getSignature()).getMethod().getAnnotation(TycloudOperation.class).needAuth() && !request.getParameterMap().containsKey("token") && ValidationUtil.isEmpty(token)) {
return; return;
} // }
} }
// 平台studio配置的下载接口token从url里取 // 平台studio配置的下载接口token从url里取
......
package com.yeejoin.amos.boot.module.ugp.api.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 项目安装告知短信记录表
*
* @author system_generator
* @date 2022-10-7
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="InstallNoticeMsgPageDto", description="项目安装告知短信通知记录表")
public class InstallNoticeMsgPageDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "项目名称")
private String name;
@ApiModelProperty(value = "项目安装区域")
private String installRegion;
@ApiModelProperty(value = "项目开工日期")
private Date startDate;
@ApiModelProperty(value = "建设单位")
private String constructionUnit;
@ApiModelProperty(value = "安装单位")
private String installationUnit;
@ApiModelProperty(value = "项目告知处理进度")
private String progressStatus;
@ApiModelProperty(value = "短信通知单位")
private Long targetUnitId;
@ApiModelProperty(value = "短信接收人")
private Long targetPersonId;
@ApiModelProperty(value = "短信通知内容")
private String content;
@ApiModelProperty(value = "短信发送日期")
private Date sendTime;
}
package com.yeejoin.amos.boot.module.ugp.api.dto; package com.yeejoin.amos.boot.module.ugp.api.dto;
import com.sun.corba.se.spi.presentation.rmi.IDLNameTranslator;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto; import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
...@@ -39,4 +40,5 @@ public class SuperviseRuleDto extends BaseDto { ...@@ -39,4 +40,5 @@ public class SuperviseRuleDto extends BaseDto {
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
private Date createDate; private Date createDate;
} }
package com.yeejoin.amos.boot.module.ugp.api.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.aspectj.weaver.ast.Test;
import org.springframework.web.multipart.MultipartFile;
import java.util.Date;
/**
* 焊机设备表
*
* @author system_generator
* @date 2022-10-8
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="WelderEquipmentDto", description="焊机设备表")
public class WelderEquipmentDto extends BaseDto{
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "设备名称")
private String name;
@ApiModelProperty(value = "设备编号")
private String code;
@ApiModelProperty(value = "设备类型")
private String type;
@ApiModelProperty(value = "项目ID")
private Long projectId;
@ApiModelProperty(value = "项目名称")
private String projectName;
@ApiModelProperty(value = "生产厂家")
private String manufacturer;
@ApiModelProperty(value = "出厂日期")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date manufactureDate;
@ApiModelProperty(value = "使用年限")
private String serviceLife;
@ApiModelProperty(value = "校验日期")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date inspectionDate;
@ApiModelProperty(value = "使用状态")
private String useStatus;
@ApiModelProperty(value = "检定状态")
private String verifyStatus;
@ApiModelProperty(value = "附件信息")
private String info;
@ApiModelProperty(value = "资源id")
private String projectResourceId;
@ApiModelProperty(value = "附件")
private MultipartFile[] files;
}
...@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; ...@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.util.Date; import java.util.Date;
/** /**
...@@ -25,109 +26,109 @@ public class Project extends BaseEntity { ...@@ -25,109 +26,109 @@ public class Project extends BaseEntity {
/** /**
* 项目名称 * 项目名称
*/ */
@TableField("name") @TableField("name")
private String name; private String name;
/** /**
* 项目编号 * 项目编号
*/ */
@TableField("code") @TableField("code")
private String code; private String code;
/** /**
* 项目进度 * 项目进度
*/ */
@TableField("progress_status") @TableField("progress_status")
private String progressStatus; private String progressStatus;
/** /**
* 项目地点 * 项目地点
*/ */
@TableField("address") @TableField("address")
private String address; private String address;
/** /**
* 项目开工日期 * 项目开工日期
*/ */
@TableField("start_date") @TableField("start_date")
private Date startDate; private Date startDate;
/** /**
* 项目安装区域代码 * 项目安装区域代码
*/ */
@TableField("install_region_code") @TableField("install_region_code")
private String installRegionCode; private String installRegionCode;
/** /**
* 项目安装区域 * 项目安装区域
*/ */
@TableField("install_region") @TableField("install_region")
private String installRegion; private String installRegion;
/** /**
* 建设单位id * 建设单位id
*/ */
@TableField("construction_unit_id") @TableField("construction_unit_id")
private Long constructionUnitId; private Long constructionUnitId;
/** /**
* 建设单位名称 * 建设单位名称
*/ */
@TableField("construction_unit") @TableField("construction_unit")
private String constructionUnit; private String constructionUnit;
/** /**
* 项目设计单位 * 项目设计单位
*/ */
@TableField("design_unit") @TableField("design_unit")
private String designUnit; private String designUnit;
/** /**
* 项目设计单位id * 项目设计单位id
*/ */
@TableField("design_unit_id") @TableField("design_unit_id")
private Long designUnitId; private Long designUnitId;
/** /**
* 安装单位id * 安装单位id
*/ */
@TableField("installation_unit_id") @TableField("installation_unit_id")
private Long installationUnitId; private Long installationUnitId;
/** /**
* 安装单位名称 * 安装单位名称
*/ */
@TableField("installation_unit") @TableField("installation_unit")
private String installationUnit; private String installationUnit;
/** /**
* 企业id * 企业id
*/ */
@TableField("company_id") @TableField("company_id")
private Long companyId; private Long companyId;
/** /**
* 建设单位负责人id * 建设单位负责人id
*/ */
@TableField("charge_person_id") @TableField("charge_person_id")
private Long chargePersonId; private Long chargePersonId;
/** /**
* 建设单位负责人名称 * 建设单位负责人名称
*/ */
@TableField("charge_person") @TableField("charge_person")
private String chargePerson; private String chargePerson;
/** /**
* 组织机构代码 * 组织机构代码
*/ */
@TableField("org_code") @TableField("org_code")
private String orgCode; private String orgCode;
/** /**
* 项目提交日期 * 项目提交日期
*/ */
@TableField("submit_date") @TableField("submit_date")
private Date submitDate; private Date submitDate;
/** /**
...@@ -145,7 +146,7 @@ public class Project extends BaseEntity { ...@@ -145,7 +146,7 @@ public class Project extends BaseEntity {
/** /**
* 备注 * 备注
*/ */
@TableField("remark") @TableField("remark")
private String remark; private String remark;
} }
package com.yeejoin.amos.boot.module.ugp.api.mapper; 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.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;
...@@ -11,4 +12,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -11,4 +12,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/ */
public interface AttachmentMapper extends BaseMapper<Attachment> { public interface AttachmentMapper extends BaseMapper<Attachment> {
//根据source_id删除附件
void deleteBySourceId(Long sourceId);
//根据source_id查询附件
AttachmentDto selectAttBySeq(Long sourceId);
} }
...@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.ugp.api.mapper; ...@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.ugp.api.mapper;
import com.yeejoin.amos.boot.module.ugp.api.entity.Equipment; import com.yeejoin.amos.boot.module.ugp.api.entity.Equipment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/** /**
* 设备信息表 Mapper 接口 * 设备信息表 Mapper 接口
...@@ -9,6 +10,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -9,6 +10,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author system_generator * @author system_generator
* @date 2022-09-22 * @date 2022-09-22
*/ */
@Mapper
public interface EquipmentMapper extends BaseMapper<Equipment> { public interface EquipmentMapper extends BaseMapper<Equipment> {
} }
package com.yeejoin.amos.boot.module.ugp.api.mapper; package com.yeejoin.amos.boot.module.ugp.api.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgPageDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.InstallNoticeMsg; import com.yeejoin.amos.boot.module.ugp.api.entity.InstallNoticeMsg;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/** /**
* 项目安装告知短信记录表 Mapper 接口 * 项目安装告知短信记录表 Mapper 接口
* *
* @author system_generator * @author system_generator
* @date 2022-09-22 * @date 2022-10-8
*/ */
@Mapper
public interface InstallNoticeMsgMapper extends BaseMapper<InstallNoticeMsg> { public interface InstallNoticeMsgMapper extends BaseMapper<InstallNoticeMsg> {
//安装告知申请页面分页列表
Page<InstallNoticeMsgPageDto> InstallNoticeMsgPage(IPage<InstallNoticeMsgPageDto> page, @Param("name") String name, @Param("installationUnit") String installationUnit );
Page<InstallNoticeMsgPageDto> selectByName(Page<InstallNoticeMsgPageDto> page, @Param("name") String name, @Param("unit") String unit);
InstallNoticeMsgPageDto customSelectById(@Param("sequenceNbr") Long sequenceNbr);
} }
package com.yeejoin.amos.boot.module.ugp.api.mapper; package com.yeejoin.amos.boot.module.ugp.api.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgPageDto;
import com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.ProjectResource; import com.yeejoin.amos.boot.module.ugp.api.entity.ProjectResource;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.aspectj.weaver.ast.Test;
/** /**
* 项目资源表(包括焊工、管材、设备) Mapper 接口 * 项目资源表(包括焊工、管材、设备) Mapper 接口
...@@ -9,6 +16,16 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -9,6 +16,16 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author system_generator * @author system_generator
* @date 2022-09-22 * @date 2022-09-22
*/ */
@Mapper
public interface ProjectResourceMapper extends BaseMapper<ProjectResource> { public interface ProjectResourceMapper extends BaseMapper<ProjectResource> {
//焊机设备表
Page<WelderEquipmentDto> WelderEquipment(IPage<WelderEquipmentDto> page, @Param("name") String name, @Param("type") String type);
Page<WelderEquipmentDto> selectByName(Page<WelderEquipmentDto> page, @Param("name") String name, @Param("unit") String unit);
Page<WelderEquipmentDto> selectByInfo(Page<WelderEquipmentDto> page, @Param("info") Test info, @Param("unit") String unit);
WelderEquipmentDto customSelectById(@Param("sequenceNbr") Long sequenceNbr);
} }
package com.yeejoin.amos.boot.module.ugp.api.service; package com.yeejoin.amos.boot.module.ugp.api.service;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.ugp.api.dto.EquipmentDto;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 设备信息表接口类 * 设备信息表接口类
* *
...@@ -8,5 +15,8 @@ package com.yeejoin.amos.boot.module.ugp.api.service; ...@@ -8,5 +15,8 @@ package com.yeejoin.amos.boot.module.ugp.api.service;
* @date 2022-09-22 * @date 2022-09-22
*/ */
public interface IEquipmentService { public interface IEquipmentService {
//添加设备+附件
EquipmentDto saveEI(JSONObject object);
} }
package com.yeejoin.amos.boot.module.ugp.api.service; package com.yeejoin.amos.boot.module.ugp.api.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgPageDto;
/** /**
* 项目安装告知短信记录表接口类 * 项目安装告知短信记录表接口类
* *
* @author system_generator * @author system_generator
* @date 2022-09-22 * @date 2022-10-8
*/ */
public interface IInstallNoticeMsgService { public interface IInstallNoticeMsgService {
//安装告知页面列表
Page<InstallNoticeMsgPageDto> installNoticeMsgList(Page<InstallNoticeMsgPageDto> page, String name, String installationUnit);
//安装告知页面分页查询
Page<InstallNoticeMsgPageDto> selectByName(Page<InstallNoticeMsgPageDto> page, String name ,String unit);
//根据sequenceNbr查询列表数据
InstallNoticeMsgPageDto customSelectById(Long sequenceNbr);
} }
package com.yeejoin.amos.boot.module.ugp.api.service; package com.yeejoin.amos.boot.module.ugp.api.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto;
import org.aspectj.weaver.ast.Test;
/** /**
* 项目资源表(包括焊工、管材、设备)接口类 * 项目资源表(包括焊工、管材、设备)接口类
* *
...@@ -9,4 +13,13 @@ package com.yeejoin.amos.boot.module.ugp.api.service; ...@@ -9,4 +13,13 @@ package com.yeejoin.amos.boot.module.ugp.api.service;
*/ */
public interface IProjectResourceService { public interface IProjectResourceService {
//焊机设备表
Page<WelderEquipmentDto> installNoticeMsgList(Page<WelderEquipmentDto> page, String name, String type);
//焊机设备页面分页查询
Page<WelderEquipmentDto> selectByName(Page<WelderEquipmentDto> page, String name ,String unit);
Page<WelderEquipmentDto> selectByInfo(Page<WelderEquipmentDto> page, Test info , String unit);
//根据sequenceNbr查询列表数据
WelderEquipmentDto customSelectById(Long sequenceNbr);
} }
...@@ -2,4 +2,14 @@ ...@@ -2,4 +2,14 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.ugp.api.mapper.AttachmentMapper"> <mapper namespace="com.yeejoin.amos.boot.module.ugp.api.mapper.AttachmentMapper">
<!-- //根据source_id删除附件-->
<delete id="deleteBySourceId">
delete FROM tz_ugp_attachment where source_id=#{sourceId}
</delete>
<!-- //根据source_id查询附件-->
<select id="selectAttBySeq" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto">
select * from tz_ugp_attachment where source_id=#{sourceId}
</select>
</mapper> </mapper>
...@@ -2,4 +2,69 @@ ...@@ -2,4 +2,69 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.ugp.api.mapper.InstallNoticeMsgMapper"> <mapper namespace="com.yeejoin.amos.boot.module.ugp.api.mapper.InstallNoticeMsgMapper">
<select id="InstallNoticeMsgPage" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgPageDto">
SELECT name,
install_region,
start_date,
construction_unit,
installation_unit,
progress_status,
target_unit_id,
target_person_id,
content,
send_time
FROM tz_ugp_project,
tz_ugp_install_notice_msg,
tz_ugp_install_notice
where tz_ugp_project.sequence_nbr = tz_ugp_install_notice.project_id
and tz_ugp_install_notice_msg.install_notice_id = tz_ugp_install_notice.sequence_nbr
<if test="name != null and name != ''">
and tz_ugp_project.name = #{name}
</if>
<if test="installationUnit != null and installationUnit != ''">
and tz_ugp_project.installationUnit = #{installationUnit}
</if>
</select>
<select id="selectByName" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgPageDto">
SELECT name,
install_region,
start_date,
construction_unit,
installation_unit,
progress_status,
target_unit_id,
target_person_id,
content,
send_time
FROM tz_ugp_project,
tz_ugp_install_notice_msg,
tz_ugp_install_notice
where tz_ugp_project.sequence_nbr = tz_ugp_install_notice.project_id
and tz_ugp_install_notice_msg.install_notice_id = tz_ugp_install_notice.sequence_nbr
<if test="name != null and name != ''">
and tz_ugp_project.name = #{name}
</if>
<if test="unit != null and unit != ''">
and tz_ugp_project.construction_unit_id = #{unit}
</if>
</select>
<select id="customSelectById"
resultType="com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgPageDto">
SELECT name,
install_region,
start_date,
construction_unit,
installation_unit,
progress_status,
target_unit_id,
target_person_id,
content,
send_time
FROM tz_ugp_project,
tz_ugp_install_notice_msg,
tz_ugp_install_notice
where tz_ugp_project.sequence_nbr = tz_ugp_install_notice.project_id
and tz_ugp_install_notice_msg.install_notice_id = tz_ugp_install_notice.sequence_nbr
and tz_ugp_project.sequence_nbr = #{sequenceNbr}
</select>
</mapper> </mapper>
...@@ -2,4 +2,101 @@ ...@@ -2,4 +2,101 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectResourceMapper"> <mapper namespace="com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectResourceMapper">
<select id="WelderEquipment" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto">
SELECT tz_ugp_equipment.name,
tz_ugp_equipment.code,
tz_ugp_equipment.type,
tz_ugp_project.name AS projectName,
tz_ugp_project.sequence_nbr AS projectId,
tz_ugp_equipment.manufacturer,
tz_ugp_equipment.manufacture_date,
tz_ugp_equipment.service_life,
tz_ugp_equipment.verify_status,
info,
tz_ugp_project_resource.sequence_nbr as project_resource_id
FROM tz_ugp_project
inner join tz_ugp_project_resource on tz_ugp_project.sequence_nbr = tz_ugp_project_resource.project_id
and tz_ugp_project_resource.type = 'equipment'
inner join tz_ugp_equipment on tz_ugp_project_resource.resource_id = tz_ugp_equipment.sequence_nbr
left join tz_ugp_attachment on tz_ugp_equipment.sequence_nbr = tz_ugp_attachment.source_id and
tz_ugp_attachment.type = 'enuipment'
<where>
<if test="name != null and name != ''">
and tz_ugp_equipment.name = #{name}
</if>
<if test="type != null and type != ''">
and tz_ugp_equipment.type = #{type}
</if>
</where>
</select>
<select id="selectByName" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto">
SELECT tz_ugp_equipment.name,
tz_ugp_equipment.code,
tz_ugp_equipment.type,
tz_ugp_project.name as project_Name,
tz_ugp_equipment.manufacturer,
tz_ugp_equipment.manufacture_date,
tz_ugp_equipment.service_life,
tz_ugp_equipment.verify_status,
info
FROM tz_ugp_project
inner join tz_ugp_project_resource on tz_ugp_project.sequence_nbr = tz_ugp_project_resource.project_id
and tz_ugp_project_resource.type = 'equipment'
inner join tz_ugp_equipment on tz_ugp_project_resource.resource_id = tz_ugp_equipment.sequence_nbr
left join tz_ugp_attachment on tz_ugp_equipment.sequence_nbr = tz_ugp_attachment.source_id and
tz_ugp_attachment.type = 'enuipment'
<where>
<if test="name != null and name != ''">
and tz_ugp_project.name = #{name}
</if>
<if test="unit != null and unit != ''">
and tz_ugp_project.construction_unit_id = #{unit}
</if>
</where>
</select>
<select id="selectByInfo" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto">
SELECT tz_ugp_equipment.name,
tz_ugp_equipment.code,
tz_ugp_equipment.type,
tz_ugp_project.name AS project_Name,
tz_ugp_equipment.manufacturer,
tz_ugp_equipment.manufacture_date,
tz_ugp_equipment.service_life,
tz_ugp_equipment.verify_status,
info
FROM tz_ugp_project
inner join tz_ugp_project_resource on tz_ugp_project.sequence_nbr = tz_ugp_project_resource.project_id
and tz_ugp_project_resource.type = 'equipment'
inner join tz_ugp_equipment on tz_ugp_project_resource.resource_id = tz_ugp_equipment.sequence_nbr
left join tz_ugp_attachment on tz_ugp_equipment.sequence_nbr = tz_ugp_attachment.source_id and
tz_ugp_attachment.type = 'enuipment'
<where>
<if test="info != null and info != ''">
and tz_ugp_attachment.info = #{info}
</if>
<if test="unit != null and unit != ''">
and tz_ugp_attachment.company_id = #{unit}
</if>
</where>
</select>
<select id="customSelectById"
resultType="com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto">
SELECT tz_ugp_equipment.name,
tz_ugp_equipment.code,
tz_ugp_equipment.type,
tz_ugp_project.name AS project_Name,
tz_ugp_equipment.manufacturer,
tz_ugp_equipment.manufacture_date,
tz_ugp_equipment.service_life,
tz_ugp_equipment.verify_status,
info
FROM tz_ugp_project
inner join tz_ugp_project_resource on tz_ugp_project.sequence_nbr = tz_ugp_project_resource.project_id
and tz_ugp_project_resource.type = 'equipment'
inner join tz_ugp_equipment on tz_ugp_project_resource.resource_id = tz_ugp_equipment.sequence_nbr
left join tz_ugp_attachment on tz_ugp_equipment.sequence_nbr = tz_ugp_attachment.source_id and
tz_ugp_attachment.type = 'enuipment'
where tz_ugp_equipment.sequence_nbr = #{sequenceNbr}
</select>
</mapper> </mapper>
...@@ -137,7 +137,7 @@ public class CompanyController extends BaseController { ...@@ -137,7 +137,7 @@ public class CompanyController extends BaseController {
* *
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth=false)
@ApiOperation(httpMethod = "GET",value = "企业信息表列表全部数据查询", notes = "企业信息表列表全部数据查询") @ApiOperation(httpMethod = "GET",value = "企业信息表列表全部数据查询", notes = "企业信息表列表全部数据查询")
@GetMapping(value = "/list") @GetMapping(value = "/list")
public ResponseModel<List<CompanyDto>> selectForList() { public ResponseModel<List<CompanyDto>> selectForList() {
......
package com.yeejoin.amos.boot.module.ugp.biz.controller; package com.yeejoin.amos.boot.module.ugp.biz.controller;
import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgPageDto;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -36,7 +37,7 @@ public class InstallNoticeMsgController extends BaseController { ...@@ -36,7 +37,7 @@ public class InstallNoticeMsgController extends BaseController {
* *
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@PostMapping(value = "/save") @PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增项目安装告知短信记录表", notes = "新增项目安装告知短信记录表") @ApiOperation(httpMethod = "POST", value = "新增项目安装告知短信记录表", notes = "新增项目安装告知短信记录表")
public ResponseModel<InstallNoticeMsgDto> save(@RequestBody InstallNoticeMsgDto model) { public ResponseModel<InstallNoticeMsgDto> save(@RequestBody InstallNoticeMsgDto model) {
...@@ -50,7 +51,7 @@ public class InstallNoticeMsgController extends BaseController { ...@@ -50,7 +51,7 @@ public class InstallNoticeMsgController extends BaseController {
* @param sequenceNbr 主键 * @param sequenceNbr 主键
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@PutMapping(value = "/{sequenceNbr}") @PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新项目安装告知短信记录表", notes = "根据sequenceNbr更新项目安装告知短信记录表") @ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新项目安装告知短信记录表", notes = "根据sequenceNbr更新项目安装告知短信记录表")
public ResponseModel<InstallNoticeMsgDto> updateBySequenceNbrInstallNoticeMsg(@RequestBody InstallNoticeMsgDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) { public ResponseModel<InstallNoticeMsgDto> updateBySequenceNbrInstallNoticeMsg(@RequestBody InstallNoticeMsgDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
...@@ -64,7 +65,7 @@ public class InstallNoticeMsgController extends BaseController { ...@@ -64,7 +65,7 @@ public class InstallNoticeMsgController extends BaseController {
* @param sequenceNbr 主键 * @param sequenceNbr 主键
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@DeleteMapping(value = "/{sequenceNbr}") @DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除项目安装告知短信记录表", notes = "根据sequenceNbr删除项目安装告知短信记录表") @ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除项目安装告知短信记录表", notes = "根据sequenceNbr删除项目安装告知短信记录表")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){ public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){
...@@ -77,7 +78,7 @@ public class InstallNoticeMsgController extends BaseController { ...@@ -77,7 +78,7 @@ public class InstallNoticeMsgController extends BaseController {
* @param sequenceNbr 主键 * @param sequenceNbr 主键
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/{sequenceNbr}") @GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个项目安装告知短信记录表", notes = "根据sequenceNbr查询单个项目安装告知短信记录表") @ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个项目安装告知短信记录表", notes = "根据sequenceNbr查询单个项目安装告知短信记录表")
public ResponseModel<InstallNoticeMsgDto> selectOne(@PathVariable Long sequenceNbr) { public ResponseModel<InstallNoticeMsgDto> selectOne(@PathVariable Long sequenceNbr) {
...@@ -91,7 +92,7 @@ public class InstallNoticeMsgController extends BaseController { ...@@ -91,7 +92,7 @@ public class InstallNoticeMsgController extends BaseController {
* @param current 每页大小 * @param current 每页大小
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/page") @GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "项目安装告知短信记录表分页查询", notes = "项目安装告知短信记录表分页查询") @ApiOperation(httpMethod = "GET",value = "项目安装告知短信记录表分页查询", notes = "项目安装告知短信记录表分页查询")
public ResponseModel<Page<InstallNoticeMsgDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam public ResponseModel<Page<InstallNoticeMsgDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
...@@ -107,10 +108,32 @@ public class InstallNoticeMsgController extends BaseController { ...@@ -107,10 +108,32 @@ public class InstallNoticeMsgController extends BaseController {
* *
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@ApiOperation(httpMethod = "GET",value = "项目安装告知短信记录表列表全部数据查询", notes = "项目安装告知短信记录表列表全部数据查询") @ApiOperation(httpMethod = "GET",value = "项目安装告知短信记录表列表全部数据查询", notes = "项目安装告知短信记录表列表全部数据查询")
@GetMapping(value = "/list") @GetMapping(value = "/list")
public ResponseModel<List<InstallNoticeMsgDto>> selectForList() { public ResponseModel<List<InstallNoticeMsgDto>> selectForList() {
return ResponseHelper.buildResponse(installNoticeMsgServiceImpl.queryForInstallNoticeMsgList()); return ResponseHelper.buildResponse(installNoticeMsgServiceImpl.queryForInstallNoticeMsgList());
} }
/**
* 安装告知短信通知记录列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/msgpage")
@ApiOperation(httpMethod = "GET",value = "安装告知短信记录表分页查询", notes = "项目安装告知短信记录表分页查询")
public ResponseModel<Page<InstallNoticeMsgPageDto>> queryForMsgPage(
@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size,
@RequestParam(value = "name", required = false) String name,
@RequestParam(value = "installationUnit", required = false) String installationUnit
){
Page<InstallNoticeMsgPageDto> page = new Page<InstallNoticeMsgPageDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(installNoticeMsgServiceImpl.installNoticeMsgList(page, name, installationUnit));
}
} }
...@@ -112,12 +112,15 @@ public class ProjectController extends BaseController { ...@@ -112,12 +112,15 @@ public class ProjectController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page") @GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "项目信息表分页查询", notes = "项目信息表分页查询") @ApiOperation(httpMethod = "GET",value = "项目信息表分页查询", notes = "项目信息表分页查询")
public ResponseModel<Page<ProjectDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam public ResponseModel<Page<ProjectDto>> queryForPage(
(value = "size") int size) { @RequestParam(value = "current") int current,
@RequestParam(value = "size") int size,
@RequestParam(value = "name",required = false) String name,
@RequestParam(value = "constructionUnit",required = false) String constructionUnit) {
Page<ProjectDto> page = new Page<ProjectDto>(); Page<ProjectDto> page = new Page<ProjectDto>();
page.setCurrent(current); page.setCurrent(current);
page.setSize(size); page.setSize(size);
return ResponseHelper.buildResponse(projectServiceImpl.queryForProjectPage(page)); return ResponseHelper.buildResponse(projectServiceImpl.queryForProjectPage(page, name, constructionUnit));
} }
/** /**
......
package com.yeejoin.amos.boot.module.ugp.biz.controller; package com.yeejoin.amos.boot.module.ugp.biz.controller;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.sql.SQLIntegrityConstraintViolationException;
import java.util.Arrays;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.TreeSet;
import java.util.stream.Collectors;
import com.yeejoin.amos.boot.module.ugp.biz.service.impl.SuperviseRuleServiceImpl; import com.yeejoin.amos.boot.module.ugp.biz.service.impl.SuperviseRuleServiceImpl;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -36,10 +47,11 @@ public class SuperviseRuleController extends BaseController { ...@@ -36,10 +47,11 @@ public class SuperviseRuleController extends BaseController {
* *
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@PostMapping(value = "/save") @PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增监管区域规则表", notes = "新增监管区域规则表") @ApiOperation(httpMethod = "POST", value = "新增监管区域规则表", notes = "新增监管区域规则表")
public ResponseModel<SuperviseRuleDto> save(@RequestBody SuperviseRuleDto model) { public ResponseModel<SuperviseRuleDto> save(@RequestBody SuperviseRuleDto model) {
model.setCreateDate(new Date());
model = superviseRuleServiceImpl.createWithModel(model); model = superviseRuleServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model); return ResponseHelper.buildResponse(model);
} }
...@@ -50,10 +62,11 @@ public class SuperviseRuleController extends BaseController { ...@@ -50,10 +62,11 @@ public class SuperviseRuleController extends BaseController {
* @param sequenceNbr 主键 * @param sequenceNbr 主键
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@PutMapping(value = "/{sequenceNbr}") @PutMapping(value = "")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新监管区域规则表", notes = "根据sequenceNbr更新监管区域规则表") @ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新监管区域规则表", notes = "根据sequenceNbr更新监管区域规则表")
public ResponseModel<SuperviseRuleDto> updateBySequenceNbrSuperviseRule(@RequestBody SuperviseRuleDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) { public ResponseModel<SuperviseRuleDto> updateBySequenceNbrSuperviseRule(@RequestBody SuperviseRuleDto model,@RequestParam(value = "sequenceNbr") Long sequenceNbr) {
model.setRecDate(new Date());
model.setSequenceNbr(sequenceNbr); model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(superviseRuleServiceImpl.updateWithModel(model)); return ResponseHelper.buildResponse(superviseRuleServiceImpl.updateWithModel(model));
} }
...@@ -64,11 +77,16 @@ public class SuperviseRuleController extends BaseController { ...@@ -64,11 +77,16 @@ public class SuperviseRuleController extends BaseController {
* @param sequenceNbr 主键 * @param sequenceNbr 主键
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@DeleteMapping(value = "/{sequenceNbr}") @DeleteMapping(value = "")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除监管区域规则表", notes = "根据sequenceNbr删除监管区域规则表") @ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除监管区域规则表", notes = "根据sequenceNbr删除监管区域规则表")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){ public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @RequestParam(value = "sequenceNbr") String sequenceNbr){
return ResponseHelper.buildResponse(superviseRuleServiceImpl.removeById(sequenceNbr)); List<Long> ids = Arrays.stream(sequenceNbr.split(",")).map(Long::valueOf).collect(Collectors.toList());
try{
return ResponseHelper.buildResponse(superviseRuleServiceImpl.removeByIds(ids));
} catch (Exception e){
return ResponseHelper.buildResponse(false);
}
} }
/** /**
...@@ -77,10 +95,10 @@ public class SuperviseRuleController extends BaseController { ...@@ -77,10 +95,10 @@ public class SuperviseRuleController extends BaseController {
* @param sequenceNbr 主键 * @param sequenceNbr 主键
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/{sequenceNbr}") @GetMapping(value = "")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个监管区域规则表", notes = "根据sequenceNbr查询单个监管区域规则表") @ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个监管区域规则表", notes = "根据sequenceNbr查询单个监管区域规则表")
public ResponseModel<SuperviseRuleDto> selectOne(@PathVariable Long sequenceNbr) { public ResponseModel<SuperviseRuleDto> selectOne(@RequestParam("sequenceNbr") Long sequenceNbr) {
return ResponseHelper.buildResponse(superviseRuleServiceImpl.queryBySeq(sequenceNbr)); return ResponseHelper.buildResponse(superviseRuleServiceImpl.queryBySeq(sequenceNbr));
} }
...@@ -91,15 +109,20 @@ public class SuperviseRuleController extends BaseController { ...@@ -91,15 +109,20 @@ public class SuperviseRuleController extends BaseController {
* @param current 每页大小 * @param current 每页大小
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/page") @GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "监管区域规则表分页查询", notes = "监管区域规则表分页查询") @ApiOperation(httpMethod = "GET",value = "监管区域规则表分页查询", notes = "监管区域规则表分页查询")
public ResponseModel<Page<SuperviseRuleDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam public ResponseModel<Page<SuperviseRuleDto>> queryForPage(
(value = "size") int size) { @RequestParam(value = "current") int current,
@RequestParam(value = "size") int size,
int adminRegionCode,
@RequestParam(value = "superviseDeptId", required = false) Long superviseDeptId,
@RequestParam(value = "inspectionUnitId", required = false) Long inspectionUnitId
) {
Page<SuperviseRuleDto> page = new Page<SuperviseRuleDto>(); Page<SuperviseRuleDto> page = new Page<SuperviseRuleDto>();
page.setCurrent(current); page.setCurrent(current);
page.setSize(size); page.setSize(size);
return ResponseHelper.buildResponse(superviseRuleServiceImpl.queryForSuperviseRulePage(page)); return ResponseHelper.buildResponse(superviseRuleServiceImpl.queryForSuperviseRulePage(page, superviseDeptId, inspectionUnitId));
} }
/** /**
......
...@@ -2,11 +2,17 @@ package com.yeejoin.amos.boot.module.ugp.biz.service.impl; ...@@ -2,11 +2,17 @@ package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.Equipment; import com.yeejoin.amos.boot.module.ugp.api.entity.Equipment;
import com.yeejoin.amos.boot.module.ugp.api.mapper.EquipmentMapper; import com.yeejoin.amos.boot.module.ugp.api.mapper.EquipmentMapper;
import com.yeejoin.amos.boot.module.ugp.api.service.IEquipmentService; import com.yeejoin.amos.boot.module.ugp.api.service.IEquipmentService;
import com.yeejoin.amos.boot.module.ugp.api.dto.EquipmentDto; import com.yeejoin.amos.boot.module.ugp.api.dto.EquipmentDto;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
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;
...@@ -26,18 +32,24 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E ...@@ -26,18 +32,24 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
@Autowired @Autowired
EquipmentMapper equipmentMapper; EquipmentMapper equipmentMapper;
@Autowired
AttachmentServiceImpl attachmentServiceImpl;
/** /**
* 分页查询 * 分页查询
*/ */
public Page<EquipmentDto> queryForEquipmentPage(Page<EquipmentDto> page) { public Page<EquipmentDto> queryForEquipmentPage(Page<EquipmentDto> page, String name, String code, String verifyStatus) {
return this.queryForPage(page, null, false); return this.queryForPage(page, null, false,name,code,verifyStatus);
} }
/** /**
* 列表查询 示例 * 列表查询 示例
*/ */
public List<EquipmentDto> queryForEquipmentList() { public List<EquipmentDto> queryForEquipmentList() {
return this.queryForList("", false); return this.queryForList("" , false);
} }
/** /**
...@@ -62,4 +74,50 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E ...@@ -62,4 +74,50 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
return names; return names;
} }
/**
* 根据sourceId添加附件
* @param object
*/
public void saveAttachment(JSONObject object,Long SequenceNbr){
AttachmentDto attachmentDto = new AttachmentDto();
JSONArray subForm = object.getJSONArray("subForm");
for(Object o:subForm){
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(o));
jsonObject.getString("Symbol_key");
JSONArray jsonArray = jsonObject.getJSONArray("info");
for(Object j:jsonArray){
JSONObject info = JSON.parseObject(JSON.toJSONString(j));
String name = info.getString("name");
attachmentDto.setSourceId(SequenceNbr);
attachmentDto.setName(info.getString("name"));
// attachmentDto.setInfo("name: "+name+","+
// "type: "+name.substring(name.lastIndexOf(".")+1)+","+
// "path: "+info.getString("url")+","+
// "certCode: "+jsonObject.getString("certCode")+","+
// "certType: "+jsonObject.getString("certType"));
attachmentDto.setInfo(JSON.toJSONString(subForm));
attachmentDto.setType(name.substring(name.lastIndexOf(".")+1));
attachmentServiceImpl.createWithModel(attachmentDto);
break;
}
}
}
@Override
public EquipmentDto saveEI(JSONObject object) {
EquipmentDto model = new EquipmentDto();
model.setName(object.getString("name"));
model.setType(object.getString("type"));
model.setCode(object.getString("code"));
model.setManufacturer(object.getString("manufacturer"));
model.setManufactureDate(object.getDate("manufactureDate"));
model.setServiceLife(object.getString("serviceLife"));
model.setInspectionDate(object.getDate("inspectionDate"));
model.setUseStatus(object.getString("useStatus"));
model.setVerifyStatus(object.getString("verifyStatus"));
EquipmentDto result = this.createWithModel(model);
return result;
}
} }
\ No newline at end of file
package com.yeejoin.amos.boot.module.ugp.biz.service.impl; package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgPageDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.InstallNoticeMsg; import com.yeejoin.amos.boot.module.ugp.api.entity.InstallNoticeMsg;
import com.yeejoin.amos.boot.module.ugp.api.mapper.InstallNoticeMsgMapper; import com.yeejoin.amos.boot.module.ugp.api.mapper.InstallNoticeMsgMapper;
import com.yeejoin.amos.boot.module.ugp.api.service.IInstallNoticeMsgService; import com.yeejoin.amos.boot.module.ugp.api.service.IInstallNoticeMsgService;
import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgDto; import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgDto;
import org.springframework.beans.factory.annotation.Autowired;
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;
...@@ -17,6 +19,9 @@ import java.util.List; ...@@ -17,6 +19,9 @@ import java.util.List;
*/ */
@Service @Service
public class InstallNoticeMsgServiceImpl extends BaseService<InstallNoticeMsgDto,InstallNoticeMsg,InstallNoticeMsgMapper> implements IInstallNoticeMsgService { public class InstallNoticeMsgServiceImpl extends BaseService<InstallNoticeMsgDto,InstallNoticeMsg,InstallNoticeMsgMapper> implements IInstallNoticeMsgService {
@Autowired
InstallNoticeMsgMapper installNoticeMsgMapper;
/** /**
* 分页查询 * 分页查询
*/ */
...@@ -30,4 +35,22 @@ public class InstallNoticeMsgServiceImpl extends BaseService<InstallNoticeMsgDto ...@@ -30,4 +35,22 @@ public class InstallNoticeMsgServiceImpl extends BaseService<InstallNoticeMsgDto
public List<InstallNoticeMsgDto> queryForInstallNoticeMsgList() { public List<InstallNoticeMsgDto> queryForInstallNoticeMsgList() {
return this.queryForList("" , false); return this.queryForList("" , false);
} }
/**
* 项目安装告知短信通知记录分页查询
*/
@Override
public Page<InstallNoticeMsgPageDto> installNoticeMsgList(Page<InstallNoticeMsgPageDto> page, String name, String installationUnit){
return this.getBaseMapper().InstallNoticeMsgPage(page, name, installationUnit);
}
@Override
public Page<InstallNoticeMsgPageDto> selectByName(Page<InstallNoticeMsgPageDto> page, String name, String unit) {
return this.getBaseMapper().selectByName(page, name, unit);
}
@Override
public InstallNoticeMsgPageDto customSelectById(Long sequenceNbr) {
return this.getBaseMapper().customSelectById(sequenceNbr);
}
} }
\ No newline at end of file
package com.yeejoin.amos.boot.module.ugp.biz.service.impl; package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.Equipment;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
...@@ -9,13 +12,22 @@ import com.yeejoin.amos.boot.module.ugp.api.mapper.EquipmentMapper; ...@@ -9,13 +12,22 @@ import com.yeejoin.amos.boot.module.ugp.api.mapper.EquipmentMapper;
import com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectResourceMapper; import com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectResourceMapper;
import com.yeejoin.amos.boot.module.ugp.api.service.IProjectResourceService; import com.yeejoin.amos.boot.module.ugp.api.service.IProjectResourceService;
import com.yeejoin.amos.boot.module.ugp.api.dto.ProjectResourceDto; import com.yeejoin.amos.boot.module.ugp.api.dto.ProjectResourceDto;
import org.aspectj.weaver.ast.Test;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
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;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
import java.util.Map; import java.util.Map;
import static com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectResourceEnum.*; import static com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectResourceEnum.*;
...@@ -27,12 +39,13 @@ import static com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectResourceEnum.*; ...@@ -27,12 +39,13 @@ import static com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectResourceEnum.*;
* @date 2022-09-22 * @date 2022-09-22
*/ */
@Service @Service
public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto, ProjectResource, ProjectResourceMapper> implements IProjectResourceService { public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,ProjectResource,ProjectResourceMapper> implements IProjectResourceService {
@Autowired
EquipmentMapper equipmentMapper;
@Autowired @Autowired
ProjectResourceMapper projectResourceMapper; ProjectResourceMapper projectResourceMapper;
@Autowired
EquipmentMapper equipmentMapper;
/** /**
* 分页查询 * 分页查询
...@@ -48,6 +61,63 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto, ...@@ -48,6 +61,63 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,
return this.queryForList("", false); return this.queryForList("", false);
} }
@Override
public Page<WelderEquipmentDto> installNoticeMsgList(Page<WelderEquipmentDto> page, String name, String type) {
return this.projectResourceMapper.WelderEquipment(page, name, type);
}
@Override
public Page<WelderEquipmentDto> selectByName(Page<WelderEquipmentDto> page, String name, String unit) {
return null;
}
@Override
public Page<WelderEquipmentDto> selectByInfo(Page<WelderEquipmentDto> page, Test info, String unit) {
return null;
}
@Override
public WelderEquipmentDto customSelectById(Long sequenceNbr) {
return null;
}
/**
* 项目设备新增
*/
@Transactional()
public void welderSave(WelderEquipmentDto welderEquipmentDto) {
// 保存设备
Equipment equipment = new Equipment();
BeanUtils.copyProperties(welderEquipmentDto, equipment);
equipmentMapper.insert(equipment);
// 处理附件
MultipartFile[] files = welderEquipmentDto.getFiles();
// 保存项目与设备对应关系
ProjectResource projectResource = new ProjectResource();
projectResource.setProjectId(welderEquipmentDto.getProjectId());
projectResource.setName(equipment.getName());
projectResource.setType("equipment");
projectResource.setResourceId(equipment.getSequenceNbr());
projectResourceMapper.insert(projectResource);
}
/**
* 项目设备删除
* @param ids
*/
@Transactional
public void welderDelete(String ids) {
this.list(new QueryWrapper<ProjectResource>().lambda().in(
ProjectResource::getSequenceNbr,
Arrays.stream(ids.split(",")).map(Long::valueOf).collect(Collectors.toList()))
).forEach(item -> {
this.equipmentMapper.deleteById(item.getResourceId());
this.projectResourceMapper.deleteById(item.getSequenceNbr());
});
}
/** /**
* 存储项目设备关系 * 存储项目设备关系
*/ */
......
...@@ -20,8 +20,8 @@ public class SuperviseRuleServiceImpl extends BaseService<SuperviseRuleDto,Super ...@@ -20,8 +20,8 @@ public class SuperviseRuleServiceImpl extends BaseService<SuperviseRuleDto,Super
/** /**
* 分页查询 * 分页查询
*/ */
public Page<SuperviseRuleDto> queryForSuperviseRulePage(Page<SuperviseRuleDto> page) { public Page<SuperviseRuleDto> queryForSuperviseRulePage(Page<SuperviseRuleDto> page, Long superviseDeptId, Long inspectionUnitId) {
return this.queryForPage(page, null, false); return this.queryForPage(page, null, false, superviseDeptId, inspectionUnitId );
} }
/** /**
......
...@@ -23,11 +23,13 @@ redis.cache.failure.time=10800 ...@@ -23,11 +23,13 @@ redis.cache.failure.time=10800
## emqx properties: ## emqx properties:
emqx.clean-session=true emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]} emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.10.90:1883 emqx.broker=tcp://39.98.45.134:1883
emqx.user-name=super emqx.user-name=super
emqx.password=123456 emqx.password=123456
fire-rescue=123 fire-rescue=123
params.work.flow.processDefinitionKey=xiangmulixiangliucheng params.work.flow.processDefinitionKey=xiangmulixiangliucheng
amos.secret.key=ugp amos.secret.key=ugp
\ No newline at end of file
#logging.level.com.yeejoin.amos=error
\ No newline at end of file
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