Browse Source

车辆入库优化初始化接口

master
dimengzhe 3 years ago
parent
commit
4aa8851e73
  1. 8
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinbound/ScmVehicleInboundDetailsVo.java
  2. 2
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinbound/ScmVehicleInboundMapper.java
  3. 2
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinbound/ScmVehicleInboundMapper.xml
  4. 9
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinbound/ScmVehicleInboundService.java

8
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinbound/ScmVehicleInboundDetailsVo.java

@ -14,5 +14,13 @@ public class ScmVehicleInboundDetailsVo implements Vo {
private static final long serialVersionUID = 6836808201591951508L; private static final long serialVersionUID = 6836808201591951508L;
@ApiModelProperty(value = "入库日期") @ApiModelProperty(value = "入库日期")
private String inboundDate; private String inboundDate;
@ApiModelProperty(value = "入库人")
private String inbound; private String inbound;
@ApiModelProperty(value = "车架号")
private String vinNo;
@ApiModelProperty(value = "库位")
private String warehouseCode;
@ApiModelProperty(value = "附件")
private String inboundPhoto;
} }

2
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinbound/ScmVehicleInboundMapper.java

@ -33,5 +33,5 @@ public interface ScmVehicleInboundMapper extends BaseMapper<ScmVehicleInbound> {
* @param sid 车辆入库管理sid * @param sid 车辆入库管理sid
* @return * @return
*/ */
ScmVehicleInboundDetailsVo details(@Param("sid") String sid, @Param("path") String path); ScmVehicleInboundDetailsVo details(@Param("sid") String sid);
} }

2
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinbound/ScmVehicleInboundMapper.xml

@ -22,7 +22,7 @@
</select> </select>
<select id="details" resultType="com.yxt.anrui.scm.api.scmvehicleinbound.ScmVehicleInboundDetailsVo"> <select id="details" resultType="com.yxt.anrui.scm.api.scmvehicleinbound.ScmVehicleInboundDetailsVo">
select si.inboundDate, si.inbound, si.vinNo, si.warehouseCode, concat(#{path}, si.inboundPhoto) select si.inboundDate, si.inbound, si.vinNo, si.warehouseCode, si.inboundPhoto
from scm_vehicle_inbound si from scm_vehicle_inbound si
where si.sid = #{sid} where si.sid = #{sid}
</select> </select>

9
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinbound/ScmVehicleInboundService.java

@ -87,7 +87,14 @@ public class ScmVehicleInboundService extends MybatisBaseService<ScmVehicleInbou
return rb.setMsg("该数据不存在"); return rb.setMsg("该数据不存在");
} }
String path = fileUploadComponent.getUrlPrefix(); String path = fileUploadComponent.getUrlPrefix();
ScmVehicleInboundDetailsVo vo = baseMapper.details(sid, path); ScmVehicleInboundDetailsVo vo = baseMapper.details(sid);
if (vo != null) {
if (StringUtils.isNotBlank(vo.getInboundPhoto())) {
if (!vo.getInboundPhoto().contains(path)) {
vo.setInboundPhoto(path + vo.getInboundPhoto());
}
}
}
return rb.success().setData(vo); return rb.success().setData(vo);
} }

Loading…
Cancel
Save