Commit 8a41dc76 authored by LiuLin's avatar LiuLin

fix(jg):设备移交代码提交,代码bug修改

parent 12b14fac
package com.yeejoin.amos.boot.module.jg.api.dto;
import com.baomidou.mybatisplus.annotation.TableField;
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;
......@@ -39,7 +40,8 @@ public class JgEquipTransferDto extends BaseDto {
private String applyStatusDesc;
@ApiModelProperty(value = "申请日期")
private Date applyDate;
@JsonFormat(pattern = "yyyy-MM-dd")
private String applyDate;
@ApiModelProperty(value = "施工单位统一信用代码")
private String installUnitCreditCode;
......
......@@ -143,26 +143,5 @@ public class JgEquipTransfer extends BaseEntity {
private String instanceRoles;
@TableField(exist = false)
private String equCategory;
@TableField(exist = false)
private String equDefine;
@TableField(exist = false)
private String factoryNum;
@TableField(exist = false)
private String equRegisterCode;
@TableField(exist = false)
private String supervisoryCode;
@TableField(exist = false)
private String useInnerCode;
@TableField(exist = false)
private String concatenatedAddress;
@TableField(exist = false)
private String processAdvice;
}
......@@ -2,9 +2,7 @@ package com.yeejoin.amos.boot.module.jg.api.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.api.dto.JgEquipTransferDto;
import com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgEquipTransfer;
import com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......@@ -17,7 +15,7 @@ import java.util.Map;
* @date 2023-12-20
*/
public interface JgEquipTransferMapper extends CustomBaseMapper<JgEquipTransfer> {
Page<JgEquipTransfer> queryForPage(Page<JgEquipTransfer> page, @Param("param") JgEquipTransferDto model, @Param("type") String type, @Param("companyCode") String companyCode);
Page<JgEquipTransferDto> queryForPage(Page<JgEquipTransferDto> page, @Param("param") JgEquipTransferDto model, @Param("type") String type, @Param("companyCode") String companyCode);
void updatePromoter(@Param("id")Long id);
......
......@@ -25,7 +25,7 @@ public interface IJgEquipTransferService extends IService<JgEquipTransfer> {
* @param type 类型:enterprise-企业端、supervision-监管端
* @return 设备移交分页列表
*/
Page<JgEquipTransferDto> queryForJgEquipTransferPage(Page<JgEquipTransfer> page, JgEquipTransferDto dto, String type, ReginParams reginParams);
Page<JgEquipTransferDto> queryForJgEquipTransferPage(Page<JgEquipTransferDto> page, JgEquipTransferDto dto, String type, ReginParams reginParams);
/**
* 根据sequenceNbr查询
......
......@@ -5,14 +5,14 @@
</update>
<select id="queryForPage" resultType="com.yeejoin.amos.boot.module.jg.api.entity.JgEquipTransfer">
<select id="queryForPage" resultType="com.yeejoin.amos.boot.module.jg.api.dto.JgEquipTransferDto">
select
jet.sequence_nbr AS sequenceNbr,
jet.apply_no AS applyNo,
jet.use_unit_credit_code AS useUnitCreditCode,
jet.use_unit_name AS useUnitName,
jet.apply_status AS applyStatus,
jet.apply_date AS applyDate,
date_format(jet.apply_date,'%Y-%m-%d') as applyDate,
jet.install_unit_credit_code AS installUnitCreditCode,
jet.equip_num AS equipNum,
jet.install_unit_name AS installUnitName,
......@@ -74,11 +74,14 @@
<if test="param.useUnitName != null and param.useUnitName != ''">
AND jet.use_unit_name LIKE CONCAT('%', #{param.useUnitName}, '%')
</if>
<if test="param.installUnitName != null and param.installUnitName != ''">
AND jet.install_unit_name LIKE CONCAT('%', #{param.installUnitName}, '%')
<if test="param.installUnitCreditCode != null and param.installUnitCreditCode != ''">
AND jet.install_unit_credit_code = #{param.installUnitCreditCode}
</if>
<if test="param.factoryNum != null and param.factoryNum != ''">
AND fi.factory_num LIKE CONCAT('%', #{param.factoryNum}, '%')
</if>
<if test="param.applyStatus != null and param.applyStatus != ''">
AND jet.apply_status = #{param.applyStatus}
<if test="param.applyDate != null and param.applyDate != ''">
AND date_format(jet.apply_date, '%Y-%m-%d') = #{param.applyDate}
</if>
</if>
<if test="type == 'useUnit'">
......
......@@ -109,13 +109,13 @@ public class JgEquipTransferController extends BaseController {
* @return Page
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET", value = "设备移交分页查询", notes = "设备移交分页查询")
@PostMapping(value = "/page")
@ApiOperation(httpMethod = "POST", value = "设备移交分页查询", notes = "设备移交分页查询")
public ResponseModel<Page<JgEquipTransferDto>> queryForPage(@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size,
@ApiParam(value = "类型:useUnit-使用单位、installUnit-施工单位", required = true) @RequestParam(value = "type", defaultValue = "useUnit") String type,
@RequestBody(required = false) JgEquipTransferDto dto) {
Page<JgEquipTransfer> page = new Page<>(current, size);
Page<JgEquipTransferDto> page = new Page<>(current, size);
return ResponseHelper.buildResponse(jgEquipTransferServiceImpl.queryForJgEquipTransferPage(page, dto, type, getSelectedOrgInfo()));
}
......
......@@ -237,10 +237,8 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,J
}
@Override
public Page<JgEquipTransferDto> queryForJgEquipTransferPage(Page<JgEquipTransfer> page, JgEquipTransferDto dto, String type, ReginParams reginParams) {
Page<JgEquipTransfer> equipTransferPage = this.baseMapper.queryForPage(page, dto, type, reginParams.getCompany().getCompanyCode());
public Page<JgEquipTransferDto> queryForJgEquipTransferPage(Page<JgEquipTransferDto> page, JgEquipTransferDto dto, String type, ReginParams reginParams) {
Page<JgEquipTransferDto> equipTransferPage = this.baseMapper.queryForPage(page, dto, type, reginParams.getCompany().getCompanyCode());
Page<JgEquipTransferDto> equipTransferDtoPage = new Page<>();
BeanUtils.copyProperties(equipTransferPage, equipTransferDtoPage, "records");
List<JgEquipTransferDto> records = equipTransferPage.getRecords().stream().map(transfer -> {
......
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