Commit 8593afa9 authored by maoying's avatar maoying

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

parents 8f6d1ed9 f16c54eb
......@@ -37,6 +37,7 @@ import java.util.Map;
/**
* controller层切面 用于用户数据缓存 供 sql自动填充使用
* (使用粒度过大的Aop会创建大量代理对象,影响性能,占用内存,考虑使用 WebMvcConfigurer#addInterceptors 添加拦截器 )
*
* @author Admin
*/
......@@ -54,9 +55,9 @@ public class ControllerAop {
private RedisUtils redisUtils;
@Pointcut("(execution(public * com.yeejoin.amos.boot.module..*.biz.controller..*(..))"
+ "|| execution(public * com.yeejoin.amos.*.business.controller..*(..))"
+ " && !@annotation(org.springframework.scheduling.annotation.Scheduled))"
+ "|| execution(public * com.yeejoin.equipmanage.controller..*.*(..))")
+ "|| execution(public * com.yeejoin.amos.*.business.controller..*(..))"
+ " && !@annotation(org.springframework.scheduling.annotation.Scheduled))"
+ "|| execution(public * com.yeejoin.equipmanage.controller..*.*(..))")
public void userCache() {
}
......@@ -69,8 +70,8 @@ public class ControllerAop {
String[] url = new String[]{"/api/user/save/curCompany", "/jcs/command/lookHtmlText",
"/jcs/common/duty-person/findByDutyAreaId", "/tzs/wechatBack", "/tzs/elevator/getElevatorInfo"};
// 获取请求路径
for(String uri : url) {
if(request.getRequestURI().indexOf(uri) != -1) {
for (String uri : url) {
if (request.getRequestURI().indexOf(uri) != -1) {
return;
}
}
......@@ -118,10 +119,10 @@ public class ControllerAop {
CompanyBo company = new CompanyBo();
DepartmentBo department = new DepartmentBo();
RoleBo role = new RoleBo();
CompanyModel companyM = user.getCompanys() != null ? user.getCompanys().get(0) : null ;
CompanyModel companyM = user.getCompanys() != null ? user.getCompanys().get(0) : null;
Bean.copyExistPropertis(companyM, company);
Map<Long, List<DepartmentModel>> mapDepartments = user.getCompanyDepartments();
DepartmentModel departmentM = companyM != null ? mapDepartments.get(companyM.getSequenceNbr()).get(0) : null ;
DepartmentModel departmentM = companyM != null ? mapDepartments.get(companyM.getSequenceNbr()).get(0) : null;
Bean.copyExistPropertis(departmentM, department);
Map<Long, List<RoleModel>> roles = user.getOrgRoles();
Long sequenceNbr;
......@@ -132,7 +133,7 @@ public class ControllerAop {
}
RoleModel roleM = null;
if (sequenceNbr == null) {
roleM = companyM != null ?roles.get(companyM.getSequenceNbr()).get(0) : null;
roleM = companyM != null ? roles.get(companyM.getSequenceNbr()).get(0) : null;
} else {
roleM = roles.get(sequenceNbr).get(0);
}
......
......@@ -21,7 +21,7 @@ public interface KeySiteMapper extends BaseMapper<KeySite> {
*/
public IPage<KeySiteDto> getPageList(Page<KeySiteDto> page, String name, Long buildingId, String fireEnduranceRate,
String useNature, String fireFacilitiesInfo, Long belongId);
String useNature, String fireFacilitiesInfo, Long belongId,String belongName);
/**
* 获取所有的重点部位数据
* @return
......
......@@ -53,6 +53,9 @@
<if test="belongId != null and belongId!='-1' and belongId != -1">
AND c.`belong_id`= #{belongId}
</if>
<if test="belongName != null and belongName !=''">
AND c.`belong_name` like concat('%',#{belongName},'%')
</if>
order by c.rec_date desc
</select>
......
......@@ -2,6 +2,7 @@ package com.yeejoin.equipmanage.common.entity.dto;
import com.yeejoin.equipmanage.common.entity.EquipmentSpecific;
import com.yeejoin.equipmanage.common.entity.publics.BaseDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -45,4 +46,7 @@ public class EquipTypeAmountPageDTO extends BaseDTO<EquipmentSpecific> {
@ApiModelProperty(value = "行业编码")
private String industryCode;
@ApiModelProperty(value = "所在位置名称")
private String warehouseStructureName;
}
......@@ -46,5 +46,7 @@ public class TzsCommonParam {
public static final String LICENCE_INFO = "licenceInfo";
public static final String ATTACHMENT = "attachment";
public static final String INSPECTION_UNIT_CODE = "1044";
public static final String USE_UNIT_CODE = "1051";
}
package com.yeejoin.amos.boot.module.tzs.flc.api.dto;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto;
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;
import java.util.List;
import java.util.Map;
/**
* 设备告知单
*
* @author system_generator
* @date 2021-12-10
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="EquipmentInformDto", description="设备告知单")
public class EquipmentInformDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "施工告知编号")
private String productCode;
@ApiModelProperty(value = "施工告知日期")
private Date productInformDate;
@ApiModelProperty(value = "施工单位")
private String productUnit;
@ApiModelProperty(value = "施工单位id")
private Long productUnitId;
@ApiModelProperty(value = "施工类型")
private String productType;
@ApiModelProperty(value = "施工类型code")
private String productTypeCode;
@ApiModelProperty(value = "生产许可证编号")
private String licenceCode;
@ApiModelProperty(value = "生产许可证有效期")
private Date licenceDate;
@ApiModelProperty(value = "区域编码")
private String regionCode;
@ApiModelProperty(value = "省")
private String province;
@ApiModelProperty(value = "市")
private String city;
@ApiModelProperty(value = "县区")
private String district;
@ApiModelProperty(value = "街道")
private String stree;
@ApiModelProperty(value = "小区")
private String community;
@ApiModelProperty(value = "详细地址")
private String address;
@ApiModelProperty(value = "经度")
private String longitude;
@ApiModelProperty(value = "纬度")
private String latitude;
@ApiModelProperty(value = "施工负责人")
private String principal;
@ApiModelProperty(value = "施工负责人id")
private Long principalId;
@ApiModelProperty(value = "施工负责人电话")
private String principalPhone;
@ApiModelProperty(value = "计划施工日期")
private Date planProductDate;
@ApiModelProperty(value = "接收机构")
private String acceptUnit;
@ApiModelProperty(value = "接收机构id")
private Long acceptUnitId;
@ApiModelProperty(value = "检验机构")
private String inspectonUnit;
@ApiModelProperty(value = "检验机构id")
private Long inspectonUnitId;
@ApiModelProperty(value = "使用单位")
private String useUnit;
@ApiModelProperty(value = "使用单位id")
private Long useUnitId;
@ApiModelProperty(value = "产权单位")
private String propertyUnit;
@ApiModelProperty(value = "产权单位id")
private Long propertyUnitId;
@ApiModelProperty(value = "使用场所")
private String useSite;
@ApiModelProperty(value = "使用场所code")
private String useSiteCode;
@ApiModelProperty(value = "告知书编号")
private String informCode;
@ApiModelProperty(value = "告知单状态 0 暂存 1未接收 9已接收")
private String informStatus;
@ExcelIgnore
@ApiModelProperty(value = "附件")
@TableField(exist = false)
private Map<String, List<AttachmentDto>> attachments;
}
package com.yeejoin.amos.boot.module.tzs.flc.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 2021-12-10
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="InformEquipmentDto", description="告知申请-设备信息表")
public class InformEquipmentDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "设备id")
private String equipId;
@ApiModelProperty(value = "设备编号")
private String code;
@ApiModelProperty(value = "设备名称")
private String name;
@ApiModelProperty(value = "设备类别id")
private Long categoryId;
@ApiModelProperty(value = "设备类别名称")
private String categoryName;
@ApiModelProperty(value = "设备种类id")
private Long typeId;
@ApiModelProperty(value = "设备种类名称")
private String typeName;
@ApiModelProperty(value = "设备品种id")
private Long varietyId;
@ApiModelProperty(value = "设备品种名称")
private String varietyName;
@ApiModelProperty(value = "设备品牌")
private String brand;
@ApiModelProperty(value = "规格型号")
private String model;
@ApiModelProperty(value = "单位内部编号")
private String innerCode;
@ApiModelProperty(value = "设计单位名称")
private String designUnitName;
@ApiModelProperty(value = "制造单位名称")
private String manufacturer;
@ApiModelProperty(value = "设计使用年限")
private Integer designLife;
@ApiModelProperty(value = "出厂日期")
private Date factoryDate;
@ApiModelProperty(value = "产品编号(出厂编号)")
private String productCode;
@ApiModelProperty(value = "监督检验机构")
private Long supervisionAgency;
@ApiModelProperty(value = "检验报告编号")
private String inspectionReportCode;
@ApiModelProperty(value = "设备状态(未安装,已安装...)")
private String status;
@ApiModelProperty(value = "设备所属单位id")
private Long equipUnitId;
@ApiModelProperty(value = "设备所属单位")
private String equipUnit;
@ApiModelProperty(value = "告知单id")
private Long informId;
}
package com.yeejoin.amos.boot.module.tzs.flc.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
/**
* 设备告知单
*
* @author system_generator
* @date 2021-12-10
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tz_equipment_inform")
public class EquipmentInform extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 施工告知编号
*/
@TableField("product_code")
private String productCode;
/**
* 施工告知日期
*/
@TableField("product_inform_date")
private Date productInformDate;
/**
* 施工单位
*/
@TableField("product_unit")
private String productUnit;
/**
* 施工单位id
*/
@TableField("product_unit_id")
private Long productUnitId;
/**
* 施工类型
*/
@TableField("product_type")
private String productType;
/**
* 施工类型code
*/
@TableField("product_type_code")
private String productTypeCode;
/**
* 生产许可证编号
*/
@TableField("licence_code")
private String licenceCode;
/**
* 生产许可证有效期
*/
@TableField("licence_date")
private Date licenceDate;
/**
* 区域编码
*/
@TableField("region_code")
private String regionCode;
/**
* 省
*/
@TableField("province")
private String province;
/**
* 市
*/
@TableField("city")
private String city;
/**
* 县区
*/
@TableField("district")
private String district;
/**
* 街道
*/
@TableField("stree")
private String stree;
/**
* 小区
*/
@TableField("community")
private String community;
/**
* 详细地址
*/
@TableField("address")
private String address;
/**
* 经度
*/
@TableField("longitude")
private String longitude;
/**
* 纬度
*/
@TableField("latitude")
private String latitude;
/**
* 施工负责人
*/
@TableField("principal")
private String principal;
/**
* 施工负责人id
*/
@TableField("principal_id")
private Long principalId;
/**
* 施工负责人电话
*/
@TableField("principal_phone")
private String principalPhone;
/**
* 计划施工日期
*/
@TableField("plan_product_date")
private Date planProductDate;
/**
* 接收机构
*/
@TableField("accept_unit")
private String acceptUnit;
/**
* 接收机构id
*/
@TableField("accept_unit_id")
private Long acceptUnitId;
/**
* 检验机构
*/
@TableField("inspecton_unit")
private String inspectonUnit;
/**
* 检验机构id
*/
@TableField("inspecton_unit_id")
private Long inspectonUnitId;
/**
* 使用单位
*/
@TableField("use_unit")
private String useUnit;
/**
* 使用单位id
*/
@TableField("use_unit_id")
private Long useUnitId;
/**
* 产权单位
*/
@TableField("property_unit")
private String propertyUnit;
/**
* 产权单位id
*/
@TableField("property_unit_id")
private Long propertyUnitId;
/**
* 使用场所
*/
@TableField("use_site")
private String useSite;
/**
* 使用场所code
*/
@TableField("use_site_code")
private String useSiteCode;
/**
* 告知书编号
*/
@TableField("inform_code")
private String informCode;
/**
* 告知单状态 0 暂存 1未接收 9已接收
*/
@TableField("inform_status")
private String informStatus;
}
package com.yeejoin.amos.boot.module.tzs.flc.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
/**
* 告知申请-设备信息表
*
* @author system_generator
* @date 2021-12-10
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tcb_inform_equipment")
public class InformEquipment extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 设备id
*/
@TableField("equip_id")
private String equipId;
/**
* 设备编号
*/
@TableField("code")
private String code;
/**
* 设备名称
*/
@TableField("name")
private String name;
/**
* 设备类别id
*/
@TableField("category_id")
private Long categoryId;
/**
* 设备类别名称
*/
@TableField("category_name")
private String categoryName;
/**
* 设备种类id
*/
@TableField("type_id")
private Long typeId;
/**
* 设备种类名称
*/
@TableField("type_name")
private String typeName;
/**
* 设备品种id
*/
@TableField("variety_id")
private Long varietyId;
/**
* 设备品种名称
*/
@TableField("variety_name")
private String varietyName;
/**
* 设备品牌
*/
@TableField("brand")
private String brand;
/**
* 规格型号
*/
@TableField("model")
private String model;
/**
* 单位内部编号
*/
@TableField("inner_code")
private String innerCode;
/**
* 设计单位名称
*/
@TableField("design_unit_name")
private String designUnitName;
/**
* 制造单位名称
*/
@TableField("manufacturer")
private String manufacturer;
/**
* 设计使用年限
*/
@TableField("design_life")
private Integer designLife;
/**
* 出厂日期
*/
@TableField("factory_date")
private Date factoryDate;
/**
* 产品编号(出厂编号)
*/
@TableField("product_code")
private String productCode;
/**
* 监督检验机构
*/
@TableField("supervision_agency")
private Long supervisionAgency;
/**
* 检验报告编号
*/
@TableField("inspection_report_code")
private String inspectionReportCode;
/**
* 设备状态(未安装,已安装...)
*/
@TableField("status")
private String status;
/**
* 设备所属单位id
*/
@TableField("equip_unit_id")
private Long equipUnitId;
/**
* 设备所属单位
*/
@TableField("equip_unit")
private String equipUnit;
/**
* 告知单id
*/
@TableField("inform_id")
private Long informId;
}
package com.yeejoin.amos.boot.module.tzs.flc.api.enums;
import lombok.Getter;
/**
* 设备告知书状态枚举
*/
@Getter
public enum EquipmentInformStatusEnum {
暂存("0", "暂存"),
未接收("1", "未接收"),
已接收("2", "已接收");
private String code;
private String name;
EquipmentInformStatusEnum(String code, String name) {
this.name = name;
this.code = code;
}
public static EquipmentInformStatusEnum getByCode(String code) {
for (EquipmentInformStatusEnum statusEnum : EquipmentInformStatusEnum.values()) {
if (statusEnum.getCode().equals(code)) {
return statusEnum;
}
}
return null;
}
}
package com.yeejoin.amos.boot.module.tzs.flc.api.mapper;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.EquipmentInform;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 设备告知单 Mapper 接口
*
* @author system_generator
* @date 2021-12-10
*/
public interface EquipmentInformMapper extends BaseMapper<EquipmentInform> {
}
package com.yeejoin.amos.boot.module.tzs.flc.api.mapper;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.InformEquipment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 告知申请-设备信息表 Mapper 接口
*
* @author system_generator
* @date 2021-12-10
*/
public interface InformEquipmentMapper extends BaseMapper<InformEquipment> {
}
package com.yeejoin.amos.boot.module.tzs.flc.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 企业信息表 Mapper 接口
......@@ -11,4 +15,5 @@ import com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfo;
*/
public interface UnitInfoMapper extends BaseMapper<UnitInfo> {
List<UnitInfoDto> getUnitByType(@Param("typeCode") String typeCode);
}
package com.yeejoin.amos.boot.module.tzs.flc.api.service;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentInformDto;
/**
* 设备告知单接口类
*
* @author system_generator
* @date 2021-12-10
*/
public interface IEquipmentInformService {
EquipmentInformDto createEquipmentInform(EquipmentInformDto model);
}
package com.yeejoin.amos.boot.module.tzs.flc.api.service;
/**
* 告知申请-设备信息表接口类
*
* @author system_generator
* @date 2021-12-10
*/
public interface IInformEquipmentService {
}
......@@ -6,6 +6,8 @@ import com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfo;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfoChange;
import java.util.List;
/**
* 企业信息表接口类
*
......@@ -32,4 +34,8 @@ public interface IUnitInfoService {
UnitInfoDto getDtoByOrgId(Long sequenceNbr);
UnitInfoDto changeUnInfo(UnitInfoDto model);
List<UnitInfoDto> getInspectionUnit();
List<UnitInfoDto> getUseUnit();
}
<?xml version="1.0" encoding="UTF-8"?>
<!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.tzs.flc.api.mapper.EquipmentInformMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!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.tzs.flc.api.mapper.InformEquipmentMapper">
</mapper>
......@@ -2,4 +2,15 @@
<!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.tzs.flc.api.mapper.UnitInfoMapper">
<select id="getUnitByType" resultType="com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoDto">
select
a.*
from tz_flc_unit_info a
where a.is_delete = 0 AND
(a.unit_status = '1' or a.is_change = 1)
AND a.unit_type_code LIKE CONCAT('%', #{typeCode}, '%')
</select>
</mapper>
......@@ -177,12 +177,12 @@ public class KeySiteController extends BaseController {
@RequestParam(value = "size") int size, @RequestParam(required = false) String name,
@RequestParam(required = false) Long buildingId, @RequestParam(required = false) String fireEnduranceRate,
@RequestParam(required = false) String useNature, @RequestParam(required = false) String fireFacilitiesInfo,
@RequestParam(required = false) Long belongId) {
@RequestParam(required = false) Long belongId, @RequestParam(required = false) String belongName) {
Page<KeySiteDto> page = new Page<KeySiteDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(keySiteServiceImpl.getPageList(page, name, buildingId, fireEnduranceRate,
useNature, fireFacilitiesInfo, belongId));
useNature, fireFacilitiesInfo, belongId,belongName));
}
/**
......
......@@ -61,8 +61,8 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite
* 分页查询
*/
public IPage<KeySiteDto> getPageList(Page<KeySiteDto> page, String name, Long buildingId, String fireEnduranceRate,
String useNature, String fireFacilitiesInfo, Long belongId){
return keySiteMapper.getPageList(page,name,buildingId,fireEnduranceRate,useNature,fireFacilitiesInfo,belongId);
String useNature, String fireFacilitiesInfo, Long belongId, String belongName){
return keySiteMapper.getPageList(page,name,buildingId,fireEnduranceRate,useNature,fireFacilitiesInfo,belongId,belongName);
}
@Override
......
......@@ -3,10 +3,10 @@ package com.yeejoin.equipmanage.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class AddResourceHandlersConfig extends WebMvcConfigurerAdapter {
public class AddResourceHandlersConfig implements WebMvcConfigurer {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
......
......@@ -249,7 +249,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
JSONObject jsonObject = unitMap.getJSONObject("map");
confirmAlamVo.setUnitInvolvedId(equipmentSpecific.getAgencyId());
confirmAlamVo.setUnitInvolvedName(unitMap.getString("bizOrgName"));
confirmAlamVo.setAddress(ent.getAlarmPlace());
confirmAlamVo.setAddress(jsonObject.getString("companyLocation"));
confirmAlamVo.setLongitude(jsonObject.getDouble("longitude"));
confirmAlamVo.setLatitude(jsonObject.getDouble("latitude"));
}
......
package com.yeejoin.amos.fas.core.framework;
import java.io.File;
import com.yeejoin.amos.fas.business.constants.FasConstant;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import java.io.File;
import com.yeejoin.amos.fas.business.constants.FasConstant;;
;
@Configuration
public class FasApplicationConfig extends WebMvcConfigurerAdapter{
public class FasApplicationConfig implements WebMvcConfigurer {
@Value("${windows.img.path}")
private String winImgPath;
......@@ -27,6 +28,5 @@ public class FasApplicationConfig extends WebMvcConfigurerAdapter{
}
registry.addResourceHandler("/upload/**").addResourceLocations("file:"+localPath.trim()+FasConstant.UPLOAD_ROOT_PATH + File.separator);
// registry.addResourceHandler("/upload/video/**").addResourceLocations("file:G:/upload/video/");
super.addResourceHandlers(registry);
}
}
package com.yeejoin.amos.latentdanger.core.framework;
import java.io.File;
import com.yeejoin.amos.latentdanger.business.constants.Constants;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import com.yeejoin.amos.latentdanger.business.constants.Constants;
import java.io.File;
@Configuration
public class PatrolApplicationConfig extends WebMvcConfigurerAdapter{
public class PatrolApplicationConfig implements WebMvcConfigurer {
@Value("${windows.img.path}")
private String winImgPath;
......@@ -27,6 +26,5 @@ public class PatrolApplicationConfig extends WebMvcConfigurerAdapter{
}
registry.addResourceHandler("/upload/**").addResourceLocations("file:"+localPath.trim()+ Constants.UPLOAD_ROOT_PATH + File.separator);
// registry.addResourceHandler("/upload/video/**").addResourceLocations("file:G:/upload/video/");
super.addResourceHandlers(registry);
}
}
package com.yeejoin.amos.maintenance.core.framework;
import java.io.File;
import com.yeejoin.amos.maintenance.business.constants.XJConstant;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import com.yeejoin.amos.maintenance.business.constants.XJConstant;
import java.io.File;
@Configuration
public class PatrolApplicationConfig extends WebMvcConfigurerAdapter{
public class PatrolApplicationConfig implements WebMvcConfigurer {
@Value("${windows.img.path}")
private String winImgPath;
......@@ -27,6 +26,5 @@ public class PatrolApplicationConfig extends WebMvcConfigurerAdapter{
}
registry.addResourceHandler("/upload/**").addResourceLocations("file:"+localPath.trim()+XJConstant.UPLOAD_ROOT_PATH + File.separator);
// registry.addResourceHandler("/upload/video/**").addResourceLocations("file:G:/upload/video/");
super.addResourceHandlers(registry);
}
}
package com.yeejoin.amos.patrol.core.framework;
import java.io.File;
import com.yeejoin.amos.patrol.business.constants.XJConstant;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import com.yeejoin.amos.patrol.business.constants.XJConstant;
import java.io.File;
@Configuration
public class PatrolApplicationConfig extends WebMvcConfigurerAdapter{
public class PatrolApplicationConfig implements WebMvcConfigurer {
@Value("${windows.img.path}")
private String winImgPath;
......@@ -27,6 +26,5 @@ public class PatrolApplicationConfig extends WebMvcConfigurerAdapter{
}
registry.addResourceHandler("/upload/**").addResourceLocations("file:"+localPath.trim()+XJConstant.UPLOAD_ROOT_PATH + File.separator);
// registry.addResourceHandler("/upload/video/**").addResourceLocations("file:G:/upload/video/");
super.addResourceHandlers(registry);
}
}
package com.yeejoin.amos.supervision.core.framework;
import java.io.File;
import com.yeejoin.amos.supervision.business.constants.XJConstant;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import com.yeejoin.amos.supervision.business.constants.XJConstant;
import java.io.File;
@Configuration
public class PatrolApplicationConfig extends WebMvcConfigurerAdapter{
public class PatrolApplicationConfig implements WebMvcConfigurer {
@Value("${windows.img.path}")
private String winImgPath;
......@@ -27,6 +26,5 @@ public class PatrolApplicationConfig extends WebMvcConfigurerAdapter{
}
registry.addResourceHandler("/upload/**").addResourceLocations("file:"+localPath.trim()+XJConstant.UPLOAD_ROOT_PATH + File.separator);
// registry.addResourceHandler("/upload/video/**").addResourceLocations("file:G:/upload/video/");
super.addResourceHandlers(registry);
}
}
package com.yeejoin.amos.boot.module.tzs.flc.biz.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.EquipmentInform;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.List;
import com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl.EquipmentInformServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentInformDto;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
/**
* 设备告知单
*
* @author system_generator
* @date 2021-12-10
*/
@RestController
@Api(tags = "设备告知单Api")
@RequestMapping(value = "/equipment-inform")
public class EquipmentInformController extends BaseController {
@Autowired
EquipmentInformServiceImpl equipmentInformServiceImpl;
/**
* 根据regionCode 获取设备告知单单号
* @param regionCode
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getInformCode/{regionCode}")
@ApiOperation(httpMethod = "GET",value = "根据regionCode 获取设备告知单单号", notes = "根据regionCode 获取设备告知单单号")
public ResponseModel<String> getInformCode(@PathVariable String regionCode) {
// 行政编码 + 年月 + 顺序号
String code = regionCode +DateUtils.getDateNowShortNumber();
int number = equipmentInformServiceImpl.count(new LambdaQueryWrapper<EquipmentInform>().like(EquipmentInform::getProductCode,code));
String numberStr = String.format("%04d", number);
code += numberStr;
return ResponseHelper.buildResponse(code);
}
/**
* 新增设备告知单
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增设备告知单", notes = "新增设备告知单")
public ResponseModel<EquipmentInformDto> save(@RequestBody EquipmentInformDto model) {
model = equipmentInformServiceImpl.createEquipmentInform(model);
return ResponseHelper.buildResponse(model);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新设备告知单", notes = "根据sequenceNbr更新设备告知单")
public ResponseModel<EquipmentInformDto> updateBySequenceNbrEquipmentInform(@RequestBody EquipmentInformDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(equipmentInformServiceImpl.updateWithModel(model));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除设备告知单", notes = "根据sequenceNbr删除设备告知单")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){
return ResponseHelper.buildResponse(equipmentInformServiceImpl.removeById(sequenceNbr));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个设备告知单", notes = "根据sequenceNbr查询单个设备告知单")
public ResponseModel<EquipmentInformDto> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(equipmentInformServiceImpl.queryBySeq(sequenceNbr));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "设备告知单分页查询", notes = "设备告知单分页查询")
public ResponseModel<Page<EquipmentInformDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size) {
Page<EquipmentInformDto> page = new Page<EquipmentInformDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(equipmentInformServiceImpl.queryForEquipmentInformPage(page));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "设备告知单列表全部数据查询", notes = "设备告知单列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<EquipmentInformDto>> selectForList() {
return ResponseHelper.buildResponse(equipmentInformServiceImpl.queryForEquipmentInformList());
}
}
package com.yeejoin.amos.boot.module.tzs.flc.biz.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.List;
import com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl.InformEquipmentServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.InformEquipmentDto;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
/**
* 告知申请-设备信息表
*
* @author system_generator
* @date 2021-12-10
*/
@RestController
@Api(tags = "告知申请-设备信息表Api")
@RequestMapping(value = "/inform-equipment")
public class InformEquipmentController extends BaseController {
@Autowired
InformEquipmentServiceImpl informEquipmentServiceImpl;
/**
* 新增告知申请-设备信息表
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增告知申请-设备信息表", notes = "新增告知申请-设备信息表")
public ResponseModel<InformEquipmentDto> save(@RequestBody InformEquipmentDto model) {
model = informEquipmentServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新告知申请-设备信息表", notes = "根据sequenceNbr更新告知申请-设备信息表")
public ResponseModel<InformEquipmentDto> updateBySequenceNbrInformEquipment(@RequestBody InformEquipmentDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(informEquipmentServiceImpl.updateWithModel(model));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除告知申请-设备信息表", notes = "根据sequenceNbr删除告知申请-设备信息表")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){
return ResponseHelper.buildResponse(informEquipmentServiceImpl.removeById(sequenceNbr));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个告知申请-设备信息表", notes = "根据sequenceNbr查询单个告知申请-设备信息表")
public ResponseModel<InformEquipmentDto> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(informEquipmentServiceImpl.queryBySeq(sequenceNbr));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "告知申请-设备信息表分页查询", notes = "告知申请-设备信息表分页查询")
public ResponseModel<Page<InformEquipmentDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size) {
Page<InformEquipmentDto> page = new Page<InformEquipmentDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(informEquipmentServiceImpl.queryForInformEquipmentPage(page));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "告知申请-设备信息表列表全部数据查询", notes = "告知申请-设备信息表列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<InformEquipmentDto>> selectForList() {
return ResponseHelper.buildResponse(informEquipmentServiceImpl.queryForInformEquipmentList());
}
}
package com.yeejoin.amos.boot.module.tzs.flc.biz.controller;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
......@@ -447,6 +448,28 @@ public class UnitInfoController extends BaseController {
}
/**
* 获取检验机构列表
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getInspectionUnit")
@ApiOperation(httpMethod = "GET", value = "获取检验机构列表", notes = "获取检验机构列表")
public ResponseModel<List<UnitInfoDto>> getInspectionUnit() {
List<UnitInfoDto> result = unitInfoServiceImpl.getInspectionUnit();
return ResponseHelper.buildResponse(result);
}
/**
* 获取使用单位列表
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getUseUnit")
@ApiOperation(httpMethod = "GET", value = "获取使用单位列表", notes = "获取使用单位列表")
public ResponseModel<List<UnitInfoDto>> getUseUnit() {
List<UnitInfoDto> result = unitInfoServiceImpl.getUseUnit();
return ResponseHelper.buildResponse(result);
}
}
......@@ -45,6 +45,7 @@ import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
......@@ -189,7 +190,7 @@ public class UnitPersonController extends BaseController {
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/listMyUnitPerson")
@ApiOperation(httpMethod = "GET",value = "根据当前登录人获取人员信息 带分页搜索", notes = "根据当前登录人获取人员信息 带分页搜索")
@ApiOperation(httpMethod = "GET",value = "企业端-根据当前登录人获取人员信息 带分页搜索", notes = "企业端-根据当前登录人获取人员信息 带分页搜索")
public ResponseModel<Object> listMyUnitPerson(@RequestParam(required = false) Map<String, Object> requestBody) {
List<Long> unitIds = getMyUnitList();
List<Long> parentIds = new ArrayList<>();
......@@ -205,6 +206,28 @@ public class UnitPersonController extends BaseController {
return ResponseHelper.buildResponse(iUnitPersonService.pagePerson(parentIds,requestBody.get("pageNum").toString(),requestBody.get("pageSize").toString(), requestBody));
}
/**
* 企业端-根据当前登录人获取人员信息不分页
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/listMyUnitPersonAll")
@ApiOperation(httpMethod = "GET",value = "企业端-根据当前登录人获取人员信息不分页", notes = "企业端-据当前登录人获取人员信息不分页")
public ResponseModel<Object> listMyUnitPerson() {
List<Long> unitIds = getMyUnitList();
List<Long> parentIds = new ArrayList<>();
unitIds.stream().forEach( id-> {
OrgUsr unit = iOrgUsrService.getOne(new LambdaQueryWrapper<OrgUsr>().eq(OrgUsr::getIsDelete,false).eq(OrgUsr::getAmosOrgId,id));
if(unit != null) {
parentIds.add(unit.getSequenceNbr());
}
});
if(parentIds.size() == 0) {
parentIds.add(-1l);
}
return ResponseHelper.buildResponse(iUnitPersonService.pagePerson(parentIds,"1",Integer.MAX_VALUE+"", new HashMap<String, Object>()));
}
/**
* 获取本单位拥有的角色信息
......
package com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.SourceFileServiceImpl;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentIndexDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.EquipmentInform;
import com.yeejoin.amos.boot.module.tzs.flc.api.enums.EquipmentInformStatusEnum;
import com.yeejoin.amos.boot.module.tzs.flc.api.enums.EquipmentStatusEnum;
import com.yeejoin.amos.boot.module.tzs.flc.api.mapper.EquipmentInformMapper;
import com.yeejoin.amos.boot.module.tzs.flc.api.service.IEquipmentInformService;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentInformDto;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import java.util.Date;
import java.util.List;
/**
* 设备告知单服务实现类
*
* @author system_generator
* @date 2021-12-10
*/
@Service
public class EquipmentInformServiceImpl extends BaseService<EquipmentInformDto,EquipmentInform,EquipmentInformMapper> implements IEquipmentInformService {
@Autowired
SourceFileServiceImpl sourceFileService;
@Autowired
OrgUsrServiceImpl iOrgUsrService;
/**
* 分页查询
*/
public Page<EquipmentInformDto> queryForEquipmentInformPage(Page<EquipmentInformDto> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<EquipmentInformDto> queryForEquipmentInformList() {
return this.queryForList("" , false);
}
@Override
public EquipmentInformDto createEquipmentInform(EquipmentInformDto model) {
// 获取用户所在单位 保存施工单位所属信息
OrgUsr myUnit = null;
AgencyUserModel user = Privilege.agencyUserClient.getme().getResult();
List<CompanyModel> companys = user.getCompanys();
for(CompanyModel c : companys) {
myUnit = iOrgUsrService.getOne(new LambdaQueryWrapper<OrgUsr>().eq(OrgUsr::getIsDelete,false).eq(OrgUsr::getAmosOrgId,c.getSequenceNbr()));
}
if(myUnit == null) {
throw new BadRequest("该用户非施工单位人员无法创建告知单");
}
// 判断是暂存还是提交
if(EquipmentInformStatusEnum.未接收.getCode().equals(model.getInformStatus())) { // 提交判断日期
if(model.getPlanProductDate() == null) {
throw new BadRequest("未填写计划施工日期");
}
if(( model.getPlanProductDate().getTime() - System.currentTimeMillis() ) < 3*24*60*60*1000 ) {
throw new BadRequest("计划施工日期比现在时间至少提前3天");
}
}
model.setProductInformDate(new Date());
model.setProductUnitId(myUnit.getSequenceNbr());
model.setProductUnit(myUnit.getBizOrgName());
model = this.createWithModel(model);
saveSourceFile(model);
return model;
}
// 保存附件信息
public void saveSourceFile(EquipmentInformDto model) {
if (model.getAttachments() != null) {
sourceFileService.saveAttachments(model.getSequenceNbr(), model.getAttachments());
}
}
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.InformEquipment;
import com.yeejoin.amos.boot.module.tzs.flc.api.mapper.InformEquipmentMapper;
import com.yeejoin.amos.boot.module.tzs.flc.api.service.IInformEquipmentService;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.InformEquipmentDto;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
/**
* 告知申请-设备信息表服务实现类
*
* @author system_generator
* @date 2021-12-10
*/
@Service
public class InformEquipmentServiceImpl extends BaseService<InformEquipmentDto,InformEquipment,InformEquipmentMapper> implements IInformEquipmentService {
/**
* 分页查询
*/
public Page<InformEquipmentDto> queryForInformEquipmentPage(Page<InformEquipmentDto> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<InformEquipmentDto> queryForInformEquipmentList() {
return this.queryForList("" , false);
}
}
\ No newline at end of file
......@@ -546,4 +546,14 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
return unitChangeInfoToDto(targetInfo);
}
@Override
public List<UnitInfoDto> getInspectionUnit() {
return baseMapper.getUnitByType(TzsCommonParam.INSPECTION_UNIT_CODE);
}
@Override
public List<UnitInfoDto> getUseUnit() {
return baseMapper.getUnitByType(TzsCommonParam.USE_UNIT_CODE);
}
}
\ No newline at end of file
......@@ -552,6 +552,7 @@
</select>
<select id="getColaCategoryAmountList" resultMap="CategoryAmountList">
<if test="equipTypeAmountPage.type == 'equipment' or codeHead==null or codeHead=='' or codeHead==' '">
select * from (
SELECT
wles.id,
wles.qr_code,
......@@ -630,12 +631,16 @@
<if test="equipTypeAmountPage.iotCode!=null and equipTypeAmountPage.iotCode!=''">
AND wles.iot_code LIKE CONCAT('%',#{equipTypeAmountPage.iotCode},'%')
</if>
)s1
<if test="equipTypeAmountPage.warehouseStructureName!=null and equipTypeAmountPage.warehouseStructureName!=''">
where s1.full_name LIKE CONCAT('%',#{equipTypeAmountPage.warehouseStructureName},'%')
</if>
</if>
<if test="(codeHead==null or codeHead=='' or codeHead==' ') and equipTypeAmountPage.status == null and equipTypeAmountPage.warehouseStructureId==null and equipTypeAmountPage.systemId==null">
union all
</if>
<if test="(equipTypeAmountPage.type == 'car' or codeHead==null or codeHead=='' or codeHead==' ') and equipTypeAmountPage.status == null and equipTypeAmountPage.warehouseStructureId==null and equipTypeAmountPage.systemId==null">
SELECT
select * from ( SELECT
wlc.id,
wlc.qr_code,
CONCAT('03#',wlc.qr_code) fullqrCode,
......@@ -694,6 +699,10 @@
<if test="equipTypeAmountPage.iotCode!=null and equipTypeAmountPage.iotCode!=''">
AND wlc.iot_code LIKE CONCAT('%',#{equipTypeAmountPage.iotCode},'%')
</if>
)s2
<if test="equipTypeAmountPage.warehouseStructureName!=null and equipTypeAmountPage.warehouseStructureName!=''">
where s2.full_name LIKE CONCAT('%',#{equipTypeAmountPage.warehouseStructureName},'%')
</if>
</if>
order by createDate DESC
</select>
......
spring.application.name=TZS
spring.application.name=TZS-kfm
server.servlet.context-path=/tzs
server.port=11000
spring.profiles.active=dev
spring.profiles.active=jd
spring.jackson.time-zone=GMT+8
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
......
......@@ -479,6 +479,21 @@
</changeSet>
<changeSet author="kongfm" id="2021-12-16-01">
<preConditions onFail="MARK_RAN">
<sqlCheck expectedResult="0">select count(*) from cb_data_dictionary where sequence_nbr = 1107</sqlCheck>
</preConditions>
<comment>add data_dictionary inform </comment>
<sql>
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1107, '1107', '安装', 'BUILD_TYPE', NULL, NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1108, '1108', '改造', 'BUILD_TYPE', NULL, NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1109, '1109', '维修', 'BUILD_TYPE', NULL, NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1110, '1110', '移装', 'BUILD_TYPE', NULL, NULL, NULL, NULL, NULL, b'0', 1);
</sql>
</changeSet>
</databaseChangeLog>
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