接口联调
This commit is contained in:
parent
3fa849fa98
commit
d112ee1e81
|
|
@ -159,4 +159,7 @@ public class BackApplyInfo implements Serializable {
|
||||||
|
|
||||||
@ApiModelProperty(value="设备编码")
|
@ApiModelProperty(value="设备编码")
|
||||||
private String maCode;
|
private String maCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="二维码")
|
||||||
|
private String qrCode;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -282,4 +282,11 @@ public interface BackApplyInfoMapper {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int updateMaCode(MaCodeDto maCodeDto);
|
int updateMaCode(MaCodeDto maCodeDto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据二维码查询机具信息
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<MaCodeVo> getMachineByQrCode(BackApplyInfo dto);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -963,7 +963,12 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult getMachine(BackApplyInfo dto) {
|
public AjaxResult getMachine(BackApplyInfo dto) {
|
||||||
//判断输入或者编码识别或者二维码识别是否为领料工程和单位对应
|
//判断输入或者编码识别或者二维码识别是否为领料工程和单位对应
|
||||||
List<MaCodeVo> list = backApplyInfoMapper.getMachine(dto);
|
List<MaCodeVo> list = new ArrayList<>();
|
||||||
|
if (dto.getMaCode() != null) {
|
||||||
|
list = backApplyInfoMapper.getMachine(dto);
|
||||||
|
} else if (dto.getQrCode() != null) {
|
||||||
|
list = backApplyInfoMapper.getMachineByQrCode(dto);
|
||||||
|
}
|
||||||
if (CollectionUtils.isNotEmpty(list)) {
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
for (MaCodeVo maCodeVo : list) {
|
for (MaCodeVo maCodeVo : list) {
|
||||||
Map<String, String> maMachineMap = remoteConfig.getDictValue("ma_machine_status");
|
Map<String, String> maMachineMap = remoteConfig.getDictValue("ma_machine_status");
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,64 @@
|
||||||
|
package com.bonus.material.lease.domain.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author ma_sh
|
||||||
|
* @create 2024/12/25 13:42
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LeaseOutVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("任务id")
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
@ApiModelProperty("机具名称")
|
||||||
|
private String typeName;
|
||||||
|
|
||||||
|
@ApiModelProperty("规格型号")
|
||||||
|
private String typeModelName;
|
||||||
|
|
||||||
|
@ApiModelProperty("单位")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
@ApiModelProperty("数量")
|
||||||
|
private BigDecimal num;
|
||||||
|
|
||||||
|
@ApiModelProperty("设备编码")
|
||||||
|
private String maCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("额定载荷")
|
||||||
|
private String ratedLoad;
|
||||||
|
|
||||||
|
@ApiModelProperty("试验载荷")
|
||||||
|
private String testLoad;
|
||||||
|
|
||||||
|
@ApiModelProperty("持荷时间")
|
||||||
|
private String holdingTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("试验日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date testTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("下次试验日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date nextTestTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("验收结论")
|
||||||
|
private String checkResult;
|
||||||
|
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
|
|
@ -6,6 +6,7 @@ import com.bonus.material.back.domain.vo.MaCodeVo;
|
||||||
import com.bonus.material.basic.domain.BmQrcodeInfo;
|
import com.bonus.material.basic.domain.BmQrcodeInfo;
|
||||||
import com.bonus.material.lease.domain.LeaseApplyDetails;
|
import com.bonus.material.lease.domain.LeaseApplyDetails;
|
||||||
import com.bonus.common.biz.domain.lease.LeaseOutDetails;
|
import com.bonus.common.biz.domain.lease.LeaseOutDetails;
|
||||||
|
import com.bonus.material.lease.domain.vo.LeaseOutVo;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -96,4 +97,11 @@ public interface LeaseApplyDetailsMapper {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<MaCodeVo> getCodeList(@Param("id") Long id, @Param("typeId") Long typeId);
|
List<MaCodeVo> getCodeList(@Param("id") Long id, @Param("typeId") Long typeId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取领料出库单详情
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<LeaseOutVo> selectLeaseOutDetailsList(Long id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ import com.bonus.material.lease.domain.LeaseApplyDetails;
|
||||||
import com.bonus.material.lease.domain.vo.LeaseApplyRequestVo;
|
import com.bonus.material.lease.domain.vo.LeaseApplyRequestVo;
|
||||||
import com.bonus.common.biz.domain.lease.LeaseOutRequestVo;
|
import com.bonus.common.biz.domain.lease.LeaseOutRequestVo;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 领料任务Service接口
|
* 领料任务Service接口
|
||||||
*
|
*
|
||||||
|
|
@ -94,4 +96,18 @@ public interface ILeaseApplyInfoService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
AjaxResult getInfoByQrcode(BmQrcodeInfo bmQrcodeInfo);
|
AjaxResult getInfoByQrcode(BmQrcodeInfo bmQrcodeInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取领料任务详情
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
LeaseApplyRequestVo getInfo(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出领料出库详细
|
||||||
|
* @param leaseApplyRequestVo
|
||||||
|
* @param response
|
||||||
|
*/
|
||||||
|
void exportInfo(LeaseApplyRequestVo leaseApplyRequestVo, HttpServletResponse response);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ import com.bonus.material.lease.service.ILeaseApplyInfoService;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 领料任务Service业务层处理
|
* 领料任务Service业务层处理
|
||||||
|
|
@ -338,4 +339,14 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
||||||
result.put("msg", msg);
|
result.put("msg", msg);
|
||||||
return AjaxResult.success(result);
|
return AjaxResult.success(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LeaseApplyRequestVo getInfo(Long id) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void exportInfo(LeaseApplyRequestVo leaseApplyRequestVo, HttpServletResponse response) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -370,6 +370,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where bcd.parent_id = #{parentId} and bcd.type_id = #{typeId}
|
where bcd.parent_id = #{parentId} and bcd.type_id = #{typeId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getMachineByQrCode" resultType="com.bonus.material.back.domain.vo.MaCodeVo">
|
||||||
|
SELECT
|
||||||
|
mm.ma_id AS maId,
|
||||||
|
mm.ma_code AS maCode,
|
||||||
|
mm.ma_status AS maStatus,
|
||||||
|
mt1.type_name AS typeName,
|
||||||
|
mm.type_id AS typeId,
|
||||||
|
mt.type_name AS materialName,
|
||||||
|
mt2.type_name AS materialType,
|
||||||
|
ba.unit_id AS unitId,
|
||||||
|
bu.unit_name AS unitName,
|
||||||
|
ba.project_id AS proId,
|
||||||
|
bp.pro_name AS proName,
|
||||||
|
ba.agreement_id AS agreementId
|
||||||
|
FROM
|
||||||
|
lease_out_details lod
|
||||||
|
LEFT JOIN ma_machine mm ON lod.ma_id = mm.ma_id
|
||||||
|
LEFT JOIN ma_type mt ON mm.type_id = mt.type_id
|
||||||
|
AND mt.del_flag = '0'
|
||||||
|
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
||||||
|
AND mt1.del_flag = '0'
|
||||||
|
LEFT JOIN ma_type mt2 ON mt1.parent_id = mt2.type_id
|
||||||
|
AND mt2.del_flag = '0'
|
||||||
|
LEFT JOIN lease_apply_info lai ON lod.parent_id = lai.id
|
||||||
|
LEFT JOIN tm_task_agreement tta ON lai.task_id = tta.task_id
|
||||||
|
LEFT JOIN bm_agreement_info ba ON tta.agreement_id = ba.agreement_id
|
||||||
|
LEFT JOIN bm_project bp on bp.pro_id = ba.project_id
|
||||||
|
AND bp.del_flag = '0'
|
||||||
|
LEFT JOIN bm_unit bu on bu.unit_id = ba.unit_id
|
||||||
|
AND bu.del_flag = '0'
|
||||||
|
WHERE
|
||||||
|
mm.ma_status = '2' and mm.qr_code = #{qrCode}
|
||||||
|
</select>
|
||||||
|
|
||||||
<insert id="insertBackApplyInfo" parameterType="com.bonus.material.back.domain.BackApplyInfo" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertBackApplyInfo" parameterType="com.bonus.material.back.domain.BackApplyInfo" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into back_apply_info
|
insert into back_apply_info
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
|
|
||||||
|
|
@ -132,6 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="selectPurchaseCheckInfoJoinList" resultMap="PurchaseCheckInfoResult">
|
<select id="selectPurchaseCheckInfoJoinList" resultMap="PurchaseCheckInfoResult">
|
||||||
<include refid="selectPurchaseCheckInfoJoinSQL"/>
|
<include refid="selectPurchaseCheckInfoJoinSQL"/>
|
||||||
<where>
|
<where>
|
||||||
|
<if test="code != null and code != ''"> and t.code = #{code}</if>
|
||||||
<if test="taskId != null "> and pci.task_id = #{taskId}</if>
|
<if test="taskId != null "> and pci.task_id = #{taskId}</if>
|
||||||
<if test="purchaseTime != null "> and pci.purchase_time = #{purchaseTime}</if>
|
<if test="purchaseTime != null "> and pci.purchase_time = #{purchaseTime}</if>
|
||||||
<if test="startTime != null "> and date_format(pci.arrival_time,'%y%m%d') >= date_format(#{startTime},'%y%m%d')</if>
|
<if test="startTime != null "> and date_format(pci.arrival_time,'%y%m%d') >= date_format(#{startTime},'%y%m%d')</if>
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
LEFT JOIN bm_project bpi ON bai2.project_id = bpi.pro_id and bpi.del_flag = '0'
|
LEFT JOIN bm_project bpi ON bai2.project_id = bpi.pro_id and bpi.del_flag = '0'
|
||||||
left join sys_user su on rd.create_by = su.user_id
|
left join sys_user su on rd.create_by = su.user_id
|
||||||
<where>
|
<where>
|
||||||
|
<if test="inputCode != null and inputCode != ''">
|
||||||
|
AND tt.CODE = #{inputCode}
|
||||||
|
</if>
|
||||||
<if test="keyWord != null and keyWord != ''">
|
<if test="keyWord != null and keyWord != ''">
|
||||||
AND (
|
AND (
|
||||||
locate(#{keyWord}, su.nick_name) > 0
|
locate(#{keyWord}, su.nick_name) > 0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue