Commit 91696a8a authored by tangwei's avatar tangwei

派工施工管理

parent f02aed27
......@@ -17,10 +17,15 @@ public enum WorkOrderEnum {
施工中("施工中", "施工中"),
待登记("待登记", "待登记"),
登记中("登记中", "登记中"),
审核中("审核中", "审核中"),
待审核("待审核", "待审核"),
未通过("未通过", "未通过"),
已完工("已完工", "已完工");
......
package com.yeejoin.amos.boot.module.hygf.api.dto;
import com.yeejoin.amos.boot.module.hygf.api.entity.HygfOnGrid;
import com.yeejoin.amos.boot.module.hygf.api.entity.PowerStationConstructionData;
import com.yeejoin.amos.boot.module.hygf.api.entity.PowerStationEngineeringInfo;
import com.yeejoin.amos.boot.module.hygf.api.entity.WorkOrder;
import lombok.Data;
/**
* @description:
* @author: tw
* @createDate: 2024/1/12
*/
@Data
public class PowerStationEngineeringInfoAllDto {
// 基本信息
SurveyInformationDto surveyInformation;
Long workOrderPowerStationId;
// 资料归档
InformationDto information;
// 勘察信息详情
SurveyDetailsDto surveyDetails;
// 扩展信息
ExtendedInformationDto extendedInformation;
// 商务信息
CommercialDto commercial;
//设计信息
DesignInformationDto designInformation;
//订单跟踪
LoggerDto orderTracking;
//工程信息
PowerStationEngineeringInfo powerStationEngineeringInfo;
//施工信息
PowerStationConstructionData powerStationConstructionData;
//并网信息
HygfOnGrid hygfOnGrid;
//派工单信息
WorkOrder workOrder;
}
package com.yeejoin.amos.boot.module.hygf.api.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
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 java.util.Date;
import java.util.List;
/**
* 施工电站工程信息
......@@ -58,4 +62,52 @@ public class PowerStationEngineeringInfoDto extends BaseDto {
private Long workOrderPowerStationId;
@JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "完工登记日期")
private Date completionDate;
/**
* 施工组件信息
*/
private List<Object> constructionComponentInfo;
/**
* 施工逆变器信息
*/
private List<Object> constructionInverterInfo;
/**
* 施工采集器信息
*/
private List<Object> constructionCollectorBoxInfo;
/**
* 施工并网箱信息
*/
private List<Object> constructionGridBoxInfo;
/**
* 工程负责人
*/
private String projectRegionManager;
/**
* 工程负责人电话
*/
private String projectRegionManagerPhone;
/**
* 施工负责人
*/
private String constructionRegionManager;
/**
* 施工负责人电话
*/
private String constructionRegionManagerPhone;
}
package com.yeejoin.amos.boot.module.hygf.api.dto;
import com.yeejoin.amos.boot.module.hygf.api.entity.HygfOnGrid;
import com.yeejoin.amos.boot.module.hygf.api.entity.PowerStationConstructionData;
import com.yeejoin.amos.boot.module.hygf.api.entity.PowerStationEngineeringInfo;
import com.yeejoin.amos.boot.module.hygf.api.entity.WorkOrder;
import io.swagger.annotations.ApiModel;
import lombok.Data;
......@@ -28,4 +32,22 @@ public class SurveyInfoAllDto {
//订单跟踪
LoggerDto orderTracking;
//工程信息
PowerStationEngineeringInfo powerStationEngineeringInfo;
//施工信息
PowerStationConstructionData powerStationConstructionData;
//并网信息
HygfOnGrid hygfOnGrid;
//派工单信息
WorkOrder workOrder;
}
package com.yeejoin.amos.boot.module.hygf.api.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -46,6 +47,10 @@ public class WorkOrderDto extends BaseDto {
@ApiModelProperty(value = "区域公司orgcode")
private String regionCode;
/**
* 区域公司省市区
*/
private String regionAddress;
@ApiModelProperty(value = "工程负责人")
private String projectRegionManager;
......@@ -62,5 +67,14 @@ public class WorkOrderDto extends BaseDto {
@ApiModelProperty(value = "派工单状态")
private String workOrderStatus;
@ApiModelProperty(value = "平台经销商单位id")
private Long amosDealerId;
@ApiModelProperty(value = "平台经销商单位名称")
private String amosDealerName;
@ApiModelProperty(value = "平台经销商单位orgcode")
private String amosDealerOrgCode;
List<PeasantHousehold> peasantHouseholdId;
}
package com.yeejoin.amos.boot.module.hygf.api.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.web.bind.annotation.RequestParam;
import java.lang.reflect.Type;
import java.util.Date;
/**
* @description:
* @author: tw
* @createDate: 2024/1/4
*/
@Data
public class WorkOrderPage {
@ApiModelProperty(value = "农户id")
protected Long sequenceNbr;
@ApiModelProperty(value = "农户信息编号")
private String peasantHouseholdNo;
@ApiModelProperty(value = "派工单编号")
private String workOrderNum;
@ApiModelProperty(value = "业主姓名")
private String ownersName;
@ApiModelProperty(value = "工程负责人")
private String projectRegionManager;
@ApiModelProperty(value = "施工负责人")
private String constructionRegionManager;
@JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "完工时间")
private Date completionDate;
@ApiModelProperty(value = "项目地址")
private String projectAddressName;
@ApiModelProperty(value = "电站施工状态")
private String powerStationConstructionStatus;
@ApiModelProperty(value = "派工电站id")
protected Long workOrderPowerStationId;
@ApiModelProperty(value = "派工单id")
protected String workOrderId;
/**
* 区域公司id
*/
private Long regionCompanyId;
@ApiModelProperty(value = "平台经销商单位id")
private Long amosDealerId;
private String type ;
int current;
int size;
}
......@@ -2,11 +2,13 @@ package com.yeejoin.amos.boot.module.hygf.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
import java.util.List;
/**
* 施工电站施工资料
......@@ -17,7 +19,7 @@ import java.util.Date;
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("hygf_power_station_construction_data")
@TableName(value = "hygf_power_station_construction_data",autoResultMap = true)
public class PowerStationConstructionData extends BaseEntity {
private static final long serialVersionUID = 1L;
......@@ -37,140 +39,140 @@ public class PowerStationConstructionData extends BaseEntity {
/**
* 施工交底文件
*/
@TableField("construction_instructions_file")
private String constructionInstructionsFile;
@TableField(value ="construction_instructions_file",typeHandler = FastjsonTypeHandler.class)
private List<Object> constructionInstructionsFile;
/**
* 劳动防护用品配置
*/
@TableField("labor_protection_equipment_config")
private String laborProtectionEquipmentConfig;
@TableField(value ="labor_protection_equipment_config",typeHandler = FastjsonTypeHandler.class)
private List<Object> laborProtectionEquipmentConfig;
/**
* 施工前安全措施保障视频
*/
@TableField("safety_precaution_video")
private String safetyPrecautionVideo;
@TableField(value ="safety_precaution_video",typeHandler = FastjsonTypeHandler.class)
private List<Object> safetyPrecautionVideo;
/**
* 支架整体图一
*/
@TableField("bracket_overall_plan1")
private String bracketOverallPlan1;
@TableField(value ="bracket_overall_plan1",typeHandler = FastjsonTypeHandler.class)
private List<Object> bracketOverallPlan1;
/**
* 支架整体图二
*/
@TableField("bracket_overall_plan2")
private String bracketOverallPlan2;
@TableField(value ="bracket_overall_plan2",typeHandler = FastjsonTypeHandler.class)
private List<Object> bracketOverallPlan2;
/**
* 方阵倾角测试照片/规模
*/
@TableField("array_inclination_test_photo")
private String arrayInclinationTestPhoto;
@TableField(value ="array_inclination_test_photo",typeHandler = FastjsonTypeHandler.class)
private List<Object> arrayInclinationTestPhoto;
/**
* 方阵整体图一(全景)
*/
@TableField("array_overall_plan1")
private String arrayOverallPlan1;
@TableField(value ="array_overall_plan1",typeHandler = FastjsonTypeHandler.class)
private List<Object> arrayOverallPlan1;
/**
* 方阵整体图二
*/
@TableField("array_overall_plan2")
private String arrayOverallPlan2;
@TableField(value ="array_overall_plan2",typeHandler = FastjsonTypeHandler.class)
private List<Object> arrayOverallPlan2;
/**
* 方阵整体图三
*/
@TableField("array_overall_plan3")
private String arrayOverallPlan3;
@TableField(value ="array_overall_plan3",typeHandler = FastjsonTypeHandler.class)
private List<Object> arrayOverallPlan3;
/**
* 逆变器整体图
*/
@TableField("inverter_overall_plan")
private String inverterOverallPlan;
@TableField(value ="inverter_overall_plan",typeHandler = FastjsonTypeHandler.class)
private List<Object> inverterOverallPlan;
/**
* 光伏电缆走线
*/
@TableField("photovoltaic_cable_routing")
private String photovoltaicCableRouting;
@TableField(value ="photovoltaic_cable_routing",typeHandler = FastjsonTypeHandler.class)
private List<Object> photovoltaicCableRouting;
/**
* 电表箱外部整体
*/
@TableField("electricity_meter_box_exterior")
private String electricityMeterBoxExterior;
@TableField(value ="electricity_meter_box_exterior",typeHandler = FastjsonTypeHandler.class)
private List<Object> electricityMeterBoxExterior;
/**
* 电表箱内部整体
*/
@TableField("electricity_meter_box_interior")
private String electricityMeterBoxInterior;
@TableField(value ="electricity_meter_box_interior",typeHandler = FastjsonTypeHandler.class)
private List<Object> electricityMeterBoxInterior;
/**
* 支架接地
*/
@TableField("bracket_grounding")
private String bracketGrounding;
@TableField(value ="bracket_grounding",typeHandler = FastjsonTypeHandler.class)
private List<Object> bracketGrounding;
/**
* 接地点
*/
@TableField("grounding_point")
private String groundingPoint;
@TableField(value ="grounding_point",typeHandler = FastjsonTypeHandler.class)
private List<Object> groundingPoint;
/**
* 交流电缆走线
*/
@TableField("ac_cable_routing")
private String acCableRouting;
@TableField(value ="ac_cable_routing",typeHandler = FastjsonTypeHandler.class)
private List<Object> acCableRouting;
/**
* 其他照片
*/
@TableField("other_photos")
private String otherPhotos;
@TableField(value ="other_photos",typeHandler = FastjsonTypeHandler.class)
private List<Object> otherPhotos;
/**
* 备案附件
*/
@TableField("archive_attachments")
private String archiveAttachments;
@TableField(value ="archive_attachments",typeHandler = FastjsonTypeHandler.class)
private List<Object> archiveAttachments;
/**
* 安装人员信息
*/
@TableField("installer_info")
private String installerInfo;
@TableField(value ="installer_info",typeHandler = FastjsonTypeHandler.class)
private List<Object> installerInfo;
/**
* 施工组件信息
*/
@TableField("construction_component_info")
private String constructionComponentInfo;
@TableField(value ="construction_component_info",typeHandler = FastjsonTypeHandler.class)
private List<Object> constructionComponentInfo;
/**
* 施工逆变器信息
*/
@TableField("construction_inverter_info")
private String constructionInverterInfo;
@TableField(value ="construction_inverter_info",typeHandler = FastjsonTypeHandler.class)
private List<Object> constructionInverterInfo;
/**
* 施工采集器信息
*/
@TableField("construction_collector_box_info")
private String constructionCollectorBoxInfo;
@TableField(value ="construction_collector_box_info",typeHandler = FastjsonTypeHandler.class)
private List<Object> constructionCollectorBoxInfo;
/**
* 施工并网箱信息
*/
@TableField("construction_grid_box_info")
private String constructionGridBoxInfo;
@TableField(value = "construction_grid_box_info",typeHandler = FastjsonTypeHandler.class)
private List<Object> constructionGridBoxInfo;
/**
*
......
......@@ -2,11 +2,13 @@ package com.yeejoin.amos.boot.module.hygf.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
import java.util.List;
/**
* 施工电站工程信息
......@@ -17,7 +19,7 @@ import java.util.Date;
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("hygf_power_station_engineering_info")
@TableName(value = "hygf_power_station_engineering_info",autoResultMap = true)
public class PowerStationEngineeringInfo extends BaseEntity {
private static final long serialVersionUID = 1L;
......@@ -100,4 +102,62 @@ public class PowerStationEngineeringInfo extends BaseEntity {
@TableField("work_order_power_station_id")
private Long workOrderPowerStationId;
@JsonFormat(pattern = "yyyy-MM-dd")
@TableField("completion_date")
private Date completionDate;
/**
* 施工组件信息
*/
@TableField(exist = false)
private List<Object> constructionComponentInfo;
/**
* 施工逆变器信息
*/
@TableField(exist = false)
private List<Object> constructionInverterInfo;
/**
* 施工采集器信息
*/
@TableField(exist = false)
private List<Object> constructionCollectorBoxInfo;
/**
* 施工并网箱信息
*/
@TableField(exist = false)
private List<Object> constructionGridBoxInfo;
/**
* 工程负责人
*/
@TableField(exist = false)
private String projectRegionManager;
/**
* 工程负责人电话
*/
@TableField(exist = false)
private String projectRegionManagerPhone;
/**
* 施工负责人
*/
@TableField(exist = false)
private String constructionRegionManager;
/**
* 施工负责人电话
*/
@TableField(exist = false)
private String constructionRegionManagerPhone;
}
......@@ -2,10 +2,14 @@ package com.yeejoin.amos.boot.module.hygf.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.Date;
import java.util.List;
......@@ -38,18 +42,21 @@ public class WorkOrder extends BaseEntity {
/**
* 制单日期
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@TableField("issue_date")
private Date issueDate;
/**
* 计划开工日期
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@TableField("planned_start_date")
private Date plannedStartDate;
/**
* 计划完工日期
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@TableField("planned_end_date")
private Date plannedEndDate;
......@@ -68,9 +75,17 @@ public class WorkOrder extends BaseEntity {
/**
* 区域公司orgcode
*/
@TableField("region__code")
@TableField("region_code")
private String regionCode;
/**
* 区域公司省市区
*/
@TableField("region_address")
private String regionAddress;
/**
* 工程负责人
*/
......@@ -102,8 +117,37 @@ public class WorkOrder extends BaseEntity {
private String workOrderStatus;
@ApiModelProperty(value = "平台经销商单位id")
@TableField("amos_dealer_id")
private Long amosDealerId;
@ApiModelProperty(value = "平台经销商单位名称")
@TableField("amos_dealer_name")
private String amosDealerName;
@ApiModelProperty(value = "平台经销商单位orgcode")
@TableField("amos_dealer_org_code")
private String amosDealerOrgCode;
@TableField(exist = false)
List<PeasantHousehold> peasantHouseholdId;
@TableField(exist = false)
int peasantHouseholdNum;//施工电站数
@TableField(exist = false)
int peasantHouseholdSgNum;//已施工电站数
/**
* 经销商单位
* */
@TableField(exist = false)
private Long developerId;
@TableField(exist = false)
int current;
@TableField(exist = false)
int size;
}
......@@ -23,17 +23,18 @@ public class WorkOrderPowerStation extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
*
* 派单id
*/
@TableField("work_order_id")
private Long workOrderId;
/**
*
* 电站id
*/
@TableField("peasant_household_id")
private Long peasantHouseholdId;
/**
* 电站施工状态
*/
......
......@@ -22,6 +22,7 @@ public interface UnitInfoMapper extends BaseMapper<UnitInfo> {
IPage<CompanyDto> getCompanyDto(@Param("dto") CompanyDto dto);
Map<String,Integer> getCompanyDtoCount(@Param("dto")CompanyDto dto);
List< Map<String,Object>> getuserList(@Param("userName") String userName,@Param("role") Long role,@Param("regionalCompaniesSeq") Long regionalCompaniesSeq,@Param("amosUnitId") Long amosUnitId);
List< Map<String,Object>> getuserListtelephone(@Param("userName") String userName,@Param("role") Long role,@Param("regionalCompaniesSeq") Long regionalCompaniesSeq,@Param("amosUnitId") Long amosUnitId);
}
package com.yeejoin.amos.boot.module.hygf.api.mapper;
import com.yeejoin.amos.boot.module.hygf.api.dto.WorkOrderPage;
import com.yeejoin.amos.boot.module.hygf.api.entity.WorkOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import lombok.Data;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 施工派工工单 Mapper 接口
......@@ -10,5 +15,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @date 2024-01-02
*/
public interface WorkOrderMapper extends BaseMapper<WorkOrder> {
List<WorkOrder> selectWorkOrderList(@Param("dto") WorkOrder dto);
List<WorkOrderPage> queryForwgpage(@Param("dto") WorkOrderPage dto);
}
package com.yeejoin.amos.boot.module.hygf.api.mapper;
import com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold;
import com.yeejoin.amos.boot.module.hygf.api.entity.WorkOrderPowerStation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 施工派工单电站 Mapper 接口
......@@ -11,4 +15,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface WorkOrderPowerStationMapper extends BaseMapper<WorkOrderPowerStation> {
List<PeasantHousehold> selectPeasantHousehold(@Param("sequenceNbr") Long sequenceNbr,@Param("ownersName") String ownersName);
}
......@@ -32,6 +32,9 @@ and hygf_document_station.station_id is not null
hygf_peasant_household.construction_state='已收货'
and hygf_peasant_household.developer_id=#{developerId}
and hygf_peasant_household.regional_companies_seq=#{regionalCompaniesSeq}
and hygf_peasant_household.sequence_nbr not in (
select hygf_work_order_power_station.peasant_household_id from hygf_work_order_power_station
)
<if test="peasantHouseholdNo!=null and peasantHouseholdNo !=''">
and hygf_peasant_household.peasant_household_no like concat(concat("%",#{peasantHouseholdNo}),"%")
</if>
......
......@@ -40,9 +40,7 @@ from privilege_company where IS_DELETED=0 and AGENCY_CODE='JXIOP'
<select id="getuserList" resultType="Map">
select
std_user_biz.amos_user_id amosUserId,
std_user_biz.real_name realName,
std_user_biz.emergency_telephone emergencyTelephone
DISTINCT std_user_biz.real_name realName
from
std_user_biz LEFT JOIN hygf_personnel_business on std_user_biz.sequence_nbr =hygf_personnel_business.foundation_id
......@@ -64,4 +62,32 @@ from privilege_company where IS_DELETED=0 and AGENCY_CODE='JXIOP'
</select>
<select id="getuserListtelephone" resultType="Map">
select
std_user_biz.emergency_telephone emergencyTelephone
from
std_user_biz LEFT JOIN hygf_personnel_business on std_user_biz.sequence_nbr =hygf_personnel_business.foundation_id
<where>
<if test="role!=null">
and std_user_biz.role like concat(concat("%",#{role}),"%")
</if>
<if test="regionalCompaniesSeq!=null">
and hygf_personnel_business.regional_companies_seq=#{regionalCompaniesSeq}
</if>
<if test="amosUnitId!=null">
and hygf_personnel_business.amos_unit_id=#{amosUnitId}
</if>
<if test="userName!=null">
and std_user_biz.real_name=#{userName}
</if>
</where>
LIMIT 1
</select>
</mapper>
......@@ -2,4 +2,102 @@
<!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.hygf.api.mapper.WorkOrderMapper">
<select id="selectWorkOrderList" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.WorkOrder" >
SELECT
hygf_work_order.*,
(SELECT count(*) from hygf_work_order_power_station where hygf_work_order_power_station.work_order_id = hygf_work_order.sequence_nbr ) peasantHouseholdNum,
(SELECT count(*) from hygf_work_order_power_station where hygf_work_order_power_station.work_order_id = hygf_work_order.sequence_nbr
and hygf_work_order_power_station.power_station_construction_status in ("待登记","未通过","已完工","待审核")
) peasantHouseholdSgNum
FROM hygf_work_order WHERE hygf_work_order.is_delete=0
<if test="dto.workOrderNum!=null and dto.workOrderNum!=''">
and hygf_work_order.work_order_num like concat(concat("%",#{dto.workOrderNum}),"%")
</if>
<if test="dto.projectRegionManager!=null and dto.projectRegionManager!=''">
and hygf_work_order.project_region_manager like concat(concat("%",#{dto.projectRegionManager}),"%")
</if>
<if test="dto.workOrderStatus!=null and dto.workOrderStatus!=''">
and hygf_work_order.work_order_status=#{dto.workOrderStatus}
</if>
<if test="dto.amosDealerId!=null and dto.amosDealerId!=''">
and hygf_work_order.amos_dealer_id = #{dto.amosDealerId}
</if>
<if test="dto.regionCompanyId!=null and dto.regionCompanyId!=''">
and hygf_work_order.region_company_id =#{dto.regionCompanyId}
</if>
ORDER BY hygf_work_order.rec_date DESC
</select>
<select id="queryForwgpage" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.WorkOrderPage" >
select
hygf_peasant_household.sequence_nbr sequenceNbr,
hygf_peasant_household.peasant_household_no peasantHouseholdNo,
hygf_work_order.work_order_num workOrderNum,
hygf_peasant_household.owners_name ownersName,
hygf_work_order.project_region_manager projectRegionManager,
hygf_work_order.construction_region_manager constructionRegionManager,
hygf_power_station_engineering_info.completion_date completionDate ,
hygf_peasant_household.project_address_name projectAddressName,
hygf_work_order_power_station.power_station_construction_status powerStationConstructionStatus,
hygf_work_order_power_station.sequence_nbr workOrderPowerStationId
from hygf_work_order_power_station LEFT join hygf_work_order
on hygf_work_order.sequence_nbr=hygf_work_order_power_station.work_order_id
LEFT JOIN hygf_peasant_household on hygf_peasant_household.sequence_nbr=hygf_work_order_power_station.peasant_household_id
LEFT JOIN hygf_power_station_engineering_info on hygf_power_station_engineering_info.work_order_id=hygf_work_order.sequence_nbr
<where>
<if test="dto.workOrderId!=null and dto.workOrderId!=''">
and hygf_work_order.sequence_nbr = #{dto.workOrderId}
</if>
<if test=' dto.type!=null and dto.type == "1"'>
and hygf_work_order_power_station.power_station_construction_status in ("待登记","未通过","已完工","待审核")
</if>
<if test=' dto.type !=null and dto.type == "2"'>
and hygf_work_order_power_station.power_station_construction_status in ("未通过","已完工","待审核")
</if>
<if test="dto.projectAddressName!=null and dto.projectAddressName!=''">
and hygf_peasant_household.project_address_name like concat(concat("%",#{dto.projectAddressName}),"%")
</if>
<if test="dto.peasantHouseholdNo!=null and dto.peasantHouseholdNo!=''">
and hygf_peasant_household.peasant_household_no like concat(concat("%",#{dto.peasantHouseholdNo}),"%")
</if>
<if test="dto.ownersName!=null and dto.ownersName!=''">
and hygf_peasant_household.owners_name like concat(concat("%",#{dto.ownersName}),"%")
</if>
<if test="dto.workOrderNum!=null and dto.workOrderNum!=''">
and hygf_work_order.work_order_num like concat(concat("%",#{dto.workOrderNum}),"%")
</if>
<if test="dto.projectRegionManager!=null and dto.projectRegionManager!=''">
and hygf_work_order.project_region_manager like concat(concat("%",#{dto.projectRegionManager}),"%")
</if>
<if test="dto.powerStationConstructionStatus!=null and dto.powerStationConstructionStatus!=''">
and hygf_work_order_power_station.power_station_construction_status=#{dto.powerStationConstructionStatus}
</if>
<if test="dto.amosDealerId!=null and dto.amosDealerId!=''">
and hygf_work_order.amos_dealer_id = #{dto.amosDealerId}
</if>
<if test="dto.regionCompanyId!=null and dto.regionCompanyId!=''">
and hygf_work_order.region_company_id =#{dto.regionCompanyId}
</if>
ORDER BY hygf_work_order_power_station.rec_date DESC
</where>
</select>
</mapper>
......@@ -2,4 +2,21 @@
<!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.hygf.api.mapper.WorkOrderPowerStationMapper">
<select id="selectPeasantHousehold" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold">
SELECT
hygf_peasant_household.*
FROM
hygf_work_order_power_station
LEFT JOIN hygf_peasant_household ON hygf_work_order_power_station.peasant_household_id = hygf_peasant_household.sequence_nbr
WHERE
hygf_work_order_power_station.work_order_id=#{sequenceNbr}
<if test="ownersName!=null and ownersName!=''">
and hygf_peasant_household.owners_name like concat(concat("%",#{ownersName}),"%")
</if>
</select>
</mapper>
......@@ -819,7 +819,7 @@ public ResponseModel< List<Map<String,Object>> > getRegionalCompanieByuser(
public ResponseModel< Map<String,Object> > getuserTelephone( @RequestParam(required=false) String userName
) { Map<String,Object> data=null;
if(StringUtils.isNotEmpty(userName)){
List<Map<String,Object>> date= unitInfoMapper.getuserList(userName,null,null,null);
List<Map<String,Object>> date= unitInfoMapper.getuserListtelephone(userName,null,null,null);
if(date!=null&&!date.isEmpty()){
data=date.get(0);
}
......
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