Commit 90866abc authored by tangwei's avatar tangwei

解决冲突

parents d98838ac 5f979703
......@@ -146,4 +146,7 @@ public class MaintenanceDto extends BaseDto {
@ApiModelProperty(value = "身份证反面")
private List<Object> idCardOppositeList;
@ApiModelProperty(value = "是否签订安全协议")
private Integer isSignAnAgreement ;
}
......@@ -246,4 +246,10 @@ public class Maintenance extends BaseEntity {
//证书
@TableField(exist = false)
List<MaintenanceFile> maintenanceFiles;
/**
* 是否签订安全协议
*/
@TableField("is_sign_an_agreement")
private Integer isSignAnAgreement ;
}
package com.yeejoin.amos.boot.module.hygf.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.hygf.api.dto.HYGFMaintenanceTicketsDto;
import com.yeejoin.amos.boot.module.hygf.api.entity.HYGFMaintenanceTickets;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
......@@ -9,4 +11,6 @@ import java.util.List;
public interface HYGFMaintenanceTicketsMapper extends BaseMapper<HYGFMaintenanceTickets> {
@Select("SELECT sn_code FROM hygf_jp_inverter WHERE third_station_id = #{stationId}")
List<String> queryInverterSncodesByStationId(String stationId);
List<HYGFMaintenanceTicketsDto> qureyListByQueryparams(@Param("dto") HYGFMaintenanceTicketsDto dto );
}
......@@ -20,6 +20,8 @@ public interface MaintenanceMapper extends BaseMapper<Maintenance> {
public void updateTraining(String userId);
public void updateTrainingAgreement(String userId);
//验证平台手机号验证平台账号
public Integer selectauthLogininfo(@Param("telephone")String telephone,@Param("adminLoginName")String adminLoginName);
......
......@@ -21,6 +21,10 @@ public class MaintenanceUtil {
public static final String OK="是";
public static final String NO="否";
// 是否签订安全协议
public static final Integer QD = 1 ;
public static final Integer WQD = 0 ;
......
......@@ -2,4 +2,20 @@
<!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.HYGFMaintenanceTicketsMapper">
<select id="qureyListByQueryparams"
resultType="com.yeejoin.amos.boot.module.hygf.api.dto.HYGFMaintenanceTicketsDto">
select * from
hygf_maintenance_tickets
<where>
is_delete = 0
<if test="dto.handlerStatus != null and dto.handlerStatus !=''">
And handler_status = #{dto.handlerStatus}
</if>
<if test="dto.stationName != null and dto.stationName !=''">
And station_name LIKE CONCAT('%', #{dto.stationName}, '%')
</if>
</where>
order by sequence_nbr desc
</select>
</mapper>
......@@ -7,7 +7,11 @@
select sequence_nbr from std_user_biz where amos_user_id = #{userId}
) and is_delete = 0
</update>
<update id="updateTrainingAgreement">
update hygf_maintenance set is_sign_an_agreement = 0 where foundation_id = (
select sequence_nbr from std_user_biz where amos_user_id = #{userId}
) and is_delete = 0
</update>
<select id="selectauthLogininfo" resultType="INT">
......
......@@ -90,15 +90,13 @@ public class HYGFMaintenanceTicketsController extends BaseController {
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "运维工单分页查询", notes = "运维工单分页查询")
public ResponseModel<Page<HYGFMaintenanceTicketsDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size) {
Page<HYGFMaintenanceTicketsDto> page = new Page<HYGFMaintenanceTicketsDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(hygfMaintenanceTicketsServiceimpl.queryForHYGFMaintenanceTicketsDtoPage(page));
(value = "size") int size, HYGFMaintenanceTicketsDto hygfMaintenanceTicketsDto) {
return ResponseHelper.buildResponse(hygfMaintenanceTicketsServiceimpl.queryForHYGFMaintenanceTicketsDtoPage(current,size,hygfMaintenanceTicketsDto));
}
/**
......
......@@ -175,4 +175,15 @@ public class MaintenanceController extends BaseController {
maintenanceServiceImpl.updateUser( sequenceNbr , type);
return ResponseHelper.buildResponse(null);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "签订安全协议", notes = "签订安全协议")
@GetMapping(value = "/updateAgreement")
public ResponseModel<Object> updateTrainingAgreement(String userId) {
maintenanceServiceImpl.updateTrainingAgreement(userId);
return ResponseHelper.buildResponse(null);
}
}
......@@ -4,7 +4,10 @@ import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yeejoin.amos.boot.module.hygf.api.dto.*;
import com.yeejoin.amos.boot.module.hygf.api.entity.HYGFMaintenanceTickets;
import com.yeejoin.amos.boot.module.hygf.api.mapper.HYGFMaintenanceTicketsMapper;
......@@ -29,8 +32,16 @@ public class HYGFMaintenanceTicketsServiceImpl extends BaseService<HYGFMaintenan
/**
* 分页查询
*/
public Page<HYGFMaintenanceTicketsDto> queryForHYGFMaintenanceTicketsDtoPage(Page<HYGFMaintenanceTicketsDto> page) {
return this.queryForPage(page, null, false);
public Page<HYGFMaintenanceTicketsDto> queryForHYGFMaintenanceTicketsDtoPage(int current,int size ,HYGFMaintenanceTicketsDto hygfMaintenanceTicketsDto) {
PageHelper.startPage(current,size);
List<HYGFMaintenanceTicketsDto> hygfMaintenanceTicketsDtos = this.getBaseMapper().qureyListByQueryparams(hygfMaintenanceTicketsDto);
PageInfo<HYGFMaintenanceTicketsDto> page =new PageInfo<>(hygfMaintenanceTicketsDtos);
Page<HYGFMaintenanceTicketsDto> pageNew = new Page<>();
pageNew.setCurrent(current);
pageNew.setTotal(page.getTotal());
pageNew.setSize(size);
pageNew.setRecords(page.getList());
return pageNew;
}
public List<String> queryInverterSncodesByStationId(String stationId){
......
......@@ -76,6 +76,8 @@ public class MaintenanceServiceImpl extends BaseService<MaintenanceDto,Maintenan
RedisUtils redisUtil;
private static final String regionRedis="app_region_redis";
private static final Integer isSignAnAgreement = 1;
@Value("${amos.secret.key}")
String secretKey;
/**
......@@ -119,10 +121,13 @@ public class MaintenanceServiceImpl extends BaseService<MaintenanceDto,Maintenan
//审核状态
model.setReviewStatus(MaintenanceUtil.SHZ);
//培训状态
model.setTrainingStatus(MaintenanceUtil.WPX);
//是否锁定
model.setLockStatus(MaintenanceUtil.OK);
//签订协议
model.setIsSignAnAgreement(MaintenanceUtil.WQD);
//设置区域公司
RegionalCompanies regionalCompanies= regionalCompaniesMapper.selectRegionName(model.getRegionalCompaniesSeq());
model.setRegionalCompaniesCode(regionalCompanies!=null?regionalCompanies.getRegionalCompaniesCode():null);
......@@ -356,6 +361,10 @@ public class MaintenanceServiceImpl extends BaseService<MaintenanceDto,Maintenan
this.getBaseMapper().updateTraining(userId);
}
public void updateTrainingAgreement(String userId){
this.getBaseMapper().updateTrainingAgreement(userId);
}
......
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