标准箱信息查询
This commit is contained in:
parent
8b614fd7dd
commit
93e1838c34
|
|
@ -260,4 +260,26 @@ public class BmQrBoxController extends BaseController {
|
||||||
{
|
{
|
||||||
qrBoxService.download(bmQrBoxInfo, response);
|
qrBoxService.download(bmQrBoxInfo, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标准箱信息查询
|
||||||
|
* @param info
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "标准箱信息查询")
|
||||||
|
@GetMapping("/getBoxInfo")
|
||||||
|
public AjaxResult getBoxInfo(BoxBindWarehouseDto info) {
|
||||||
|
return qrBoxService.getBoxInfo(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标准箱信息详情查询
|
||||||
|
* @param info
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "标准箱信息详情查询")
|
||||||
|
@GetMapping("/getBoxDetails")
|
||||||
|
public AjaxResult getBoxDetails(BoxBindWarehouseDto info) {
|
||||||
|
return qrBoxService.getBoxDetails(info);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.bonus.material.basic.domain.dto;
|
package com.bonus.material.basic.domain.dto;
|
||||||
|
|
||||||
|
import com.bonus.common.core.web.domain.BaseEntity;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
@ -15,7 +16,7 @@ import java.math.BigDecimal;
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
public class BoxBindWarehouseDto {
|
public class BoxBindWarehouseDto extends BaseEntity {
|
||||||
|
|
||||||
@ApiModelProperty(value = "标准箱ID")
|
@ApiModelProperty(value = "标准箱ID")
|
||||||
private Long boxId;
|
private Long boxId;
|
||||||
|
|
@ -39,4 +40,16 @@ public class BoxBindWarehouseDto {
|
||||||
private String maStatus;
|
private String maStatus;
|
||||||
@ApiModelProperty(value = "入库数量")
|
@ApiModelProperty(value = "入库数量")
|
||||||
private BigDecimal inputNum;
|
private BigDecimal inputNum;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "标准箱状态")
|
||||||
|
private String boxStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "机具名称")
|
||||||
|
private String typeName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "规格型号")
|
||||||
|
private String typeModelName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "标准箱名称")
|
||||||
|
private String boxName;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -152,4 +152,11 @@ public interface BmQrBoxMapper {
|
||||||
int updateStorageNum(BoxBindWarehouseDto boxMa);
|
int updateStorageNum(BoxBindWarehouseDto boxMa);
|
||||||
|
|
||||||
int updateBoxStatus(BoxBindWarehouseDto boxMa);
|
int updateBoxStatus(BoxBindWarehouseDto boxMa);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询标准箱信息
|
||||||
|
* @param info
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
BoxBindWarehouseDto getBoxInfo(BoxBindWarehouseDto info);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -112,4 +112,18 @@ public interface BmQrBoxService {
|
||||||
AjaxResult getBoxCodeList(BmQrBoxInfo bmQrBoxInfo);
|
AjaxResult getBoxCodeList(BmQrBoxInfo bmQrBoxInfo);
|
||||||
|
|
||||||
AjaxResult appBoxInput(BoxBindWarehouseDto boxBindWarehouseDto);
|
AjaxResult appBoxInput(BoxBindWarehouseDto boxBindWarehouseDto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询标准箱信息
|
||||||
|
* @param info
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AjaxResult getBoxInfo(BoxBindWarehouseDto info);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标准箱信息详情查询
|
||||||
|
* @param info
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AjaxResult getBoxDetails(BoxBindWarehouseDto info);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ import com.bonus.material.basic.mapper.BmQrBoxMapper;
|
||||||
import com.bonus.material.basic.service.BmQrBoxService;
|
import com.bonus.material.basic.service.BmQrBoxService;
|
||||||
import com.bonus.material.ma.domain.vo.MachineVo;
|
import com.bonus.material.ma.domain.vo.MachineVo;
|
||||||
import com.bonus.material.ma.mapper.MachineMapper;
|
import com.bonus.material.ma.mapper.MachineMapper;
|
||||||
|
import com.bonus.material.purchase.config.RemoteConfig;
|
||||||
import com.bonus.material.purchase.domain.PurchaseCheckDetails;
|
import com.bonus.material.purchase.domain.PurchaseCheckDetails;
|
||||||
import com.bonus.material.purchase.domain.vo.PurchaseVo;
|
import com.bonus.material.purchase.domain.vo.PurchaseVo;
|
||||||
import com.bonus.material.purchase.mapper.PurchaseBindMapper;
|
import com.bonus.material.purchase.mapper.PurchaseBindMapper;
|
||||||
|
|
@ -64,6 +65,9 @@ public class BmQrBoxServiceImpl implements BmQrBoxService {
|
||||||
@Resource
|
@Resource
|
||||||
private TmTaskMapper tmTaskMapper;
|
private TmTaskMapper tmTaskMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private RemoteConfig remoteConfig;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询二维码标准箱管理列表
|
* 查询二维码标准箱管理列表
|
||||||
*/
|
*/
|
||||||
|
|
@ -601,6 +605,49 @@ public class BmQrBoxServiceImpl implements BmQrBoxService {
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取标准箱详情
|
||||||
|
* @param info
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AjaxResult getBoxInfo(BoxBindWarehouseDto info) {
|
||||||
|
BoxBindWarehouseDto bmQrBoxInfo = bmQrBoxMapper.getBoxInfo(info);
|
||||||
|
// 根据boxCode查询标准箱详情
|
||||||
|
List<BoxBindWarehouseDto> boxList = bmQrBoxMapper.getBoxList(info);
|
||||||
|
if (bmQrBoxInfo != null) {
|
||||||
|
Map<String, String> boxStatus = remoteConfig.getDictValue("qr_box_status");
|
||||||
|
if (StringUtils.isNotBlank(bmQrBoxInfo.getBoxStatus())) {
|
||||||
|
bmQrBoxInfo.setBoxStatus(StringUtils.isBlank(boxStatus.get(bmQrBoxInfo.getBoxStatus())) ? "" : boxStatus.get(bmQrBoxInfo.getBoxStatus()));
|
||||||
|
}
|
||||||
|
if (CollectionUtil.isNotEmpty(boxList)) {
|
||||||
|
bmQrBoxInfo.setInputNum(BigDecimal.valueOf(boxList.size()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return AjaxResult.success(bmQrBoxInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标准箱信息详情查询
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AjaxResult getBoxDetails(BoxBindWarehouseDto dto) {
|
||||||
|
List<BoxBindWarehouseDto> list = bmQrBoxMapper.getBoxList(dto);
|
||||||
|
if (CollectionUtil.isNotEmpty(list)) {
|
||||||
|
Map<String, String> machineStatus = remoteConfig.getDictValue("ma_machine_status");
|
||||||
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
|
list.forEach(info -> {
|
||||||
|
if (StringUtils.isNotBlank(info.getMaStatus())) {
|
||||||
|
info.setMaStatus(StringUtils.isBlank(machineStatus.get(info.getMaStatus())) ? "" : machineStatus.get(info.getMaStatus()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
private int updateBoxStatus(BoxBindWarehouseDto boxMa) {
|
private int updateBoxStatus(BoxBindWarehouseDto boxMa) {
|
||||||
int result = 0;
|
int result = 0;
|
||||||
result = bmQrBoxMapper.updateBoxStatus(boxMa);
|
result = bmQrBoxMapper.updateBoxStatus(boxMa);
|
||||||
|
|
|
||||||
|
|
@ -334,7 +334,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
mm.ma_code AS maCode,
|
mm.ma_code AS maCode,
|
||||||
mm.ma_status AS maStatus,
|
mm.ma_status AS maStatus,
|
||||||
mm.type_id AS maTypeId,
|
mm.type_id AS maTypeId,
|
||||||
mm.buy_task AS taskId
|
mm.buy_task AS taskId,
|
||||||
|
qb.create_time AS createTime
|
||||||
FROM
|
FROM
|
||||||
bm_qrcode_box_bind qb
|
bm_qrcode_box_bind qb
|
||||||
LEFT JOIN bm_qrcode_box bb on qb.box_id = bb.box_id
|
LEFT JOIN bm_qrcode_box bb on qb.box_id = bb.box_id
|
||||||
|
|
@ -345,6 +346,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
AND mt1.del_flag = '0'
|
AND mt1.del_flag = '0'
|
||||||
WHERE
|
WHERE
|
||||||
bb.box_code = #{boxCode}
|
bb.box_code = #{boxCode}
|
||||||
|
<if test="maCode != null and maCode != ''">
|
||||||
|
AND mm.ma_code LIKE concat('%',#{maCode},'%')
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updateNewInputNum">
|
<update id="updateNewInputNum">
|
||||||
|
|
@ -383,6 +387,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
AND pcd.status NOT IN (19)
|
AND pcd.status NOT IN (19)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getBoxInfo" resultType="com.bonus.material.basic.domain.dto.BoxBindWarehouseDto">
|
||||||
|
SELECT
|
||||||
|
box_id AS boxId,
|
||||||
|
box_name AS boxName,
|
||||||
|
box_status AS boxStatus,
|
||||||
|
box_code AS boxCode,
|
||||||
|
create_by AS createBy,
|
||||||
|
create_time AS createTime
|
||||||
|
FROM
|
||||||
|
bm_qrcode_box
|
||||||
|
WHERE
|
||||||
|
box_code = #{boxCode}
|
||||||
|
</select>
|
||||||
|
|
||||||
<update id="updateTaskStatus">
|
<update id="updateTaskStatus">
|
||||||
UPDATE tm_task SET task_status = 22 WHERE task_id = #{taskId}
|
UPDATE tm_task SET task_status = 22 WHERE task_id = #{taskId}
|
||||||
</update>
|
</update>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue