add:新增手持功能-空木箱库存查询
This commit is contained in:
@@ -26,14 +26,14 @@ public class ProductOutTwoController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ProductOutTwoService productOutTwoService;
|
private ProductOutTwoService productOutTwoService;
|
||||||
|
|
||||||
@PostMapping("/ivtQuery")
|
@PostMapping("/ivtQueryTwo")
|
||||||
@Log("单据初始化查询")
|
@Log("单据初始化查询")
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
public ResponseEntity<Object> ivtQuery(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> ivtQuery(@RequestBody JSONObject whereJson) {
|
||||||
return new ResponseEntity<>(productOutTwoService.ivtQuery(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(productOutTwoService.ivtQuery(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/ivtDtlQuery")
|
@PostMapping("/ivtDtlQueryTwo")
|
||||||
@Log("查询点位木箱")
|
@Log("查询点位木箱")
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
public ResponseEntity<Object> ivtDtlQuery(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> ivtDtlQuery(@RequestBody JSONObject whereJson) {
|
||||||
@@ -54,4 +54,11 @@ public class ProductOutTwoController {
|
|||||||
return new ResponseEntity<>(productOutTwoService.outConfirm(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(productOutTwoService.outConfirm(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/queryBoxIvt")
|
||||||
|
@Log("查询木箱库内库存")
|
||||||
|
@SaIgnore
|
||||||
|
public ResponseEntity<Object> queryBoxIvt(@RequestBody JSONObject whereJson) {
|
||||||
|
return new ResponseEntity<>(productOutTwoService.queryBoxIvt(whereJson), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,4 +45,15 @@ public interface ProductOutTwoService {
|
|||||||
* @return JSONObject: 返回前端参数
|
* @return JSONObject: 返回前端参数
|
||||||
*/
|
*/
|
||||||
JSONObject outConfirm(JSONObject whereJson);
|
JSONObject outConfirm(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询库内空木箱
|
||||||
|
* @param whereJson{
|
||||||
|
* material_code:木箱料号
|
||||||
|
* material_name:木箱描述
|
||||||
|
* box_no:木箱号
|
||||||
|
* }
|
||||||
|
* @return JSONObject: 返回前端参数
|
||||||
|
*/
|
||||||
|
JSONObject queryBoxIvt(JSONObject whereJson);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.nl.b_lms.pda.service.ProductOutTwoService;
|
import org.nl.b_lms.pda.service.ProductOutTwoService;
|
||||||
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxlashboundService;
|
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxlashboundService;
|
||||||
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxlashbound;
|
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxlashbound;
|
||||||
|
import org.nl.b_lms.storage_manage.database.service.dao.mapper.BstIvtBoxinfoMapper;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.wms.pda.st.service.impl.ProductionOutServiceImpl;
|
import org.nl.wms.pda.st.service.impl.ProductionOutServiceImpl;
|
||||||
@@ -14,7 +15,9 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@@ -27,14 +30,20 @@ public class ProductOutTwoServiceImpl implements ProductOutTwoService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IBstIvtBoxlashboundService iBstIvtBoxlashboundService;
|
private IBstIvtBoxlashboundService iBstIvtBoxlashboundService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 木箱信息mapper
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private BstIvtBoxinfoMapper bstIvtBoxinfoMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject ivtQuery(JSONObject whereJson) {
|
public JSONObject ivtQuery(JSONObject whereJson) {
|
||||||
return new ProductionOutServiceImpl().ivtQuery(whereJson);
|
return new ProductionOutServiceImpl().ivtQueryTwo(whereJson);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject ivtDtlQuery(JSONObject whereJson) {
|
public JSONObject ivtDtlQuery(JSONObject whereJson) {
|
||||||
return new ProductionOutServiceImpl().ivtDtlQuery(whereJson);
|
return new ProductionOutServiceImpl().ivtDtlQueryTwo(whereJson);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -95,4 +104,16 @@ public class ProductOutTwoServiceImpl implements ProductOutTwoService {
|
|||||||
result.put("message", "解绑成功!");
|
result.put("message", "解绑成功!");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject queryBoxIvt(JSONObject whereJson) {
|
||||||
|
|
||||||
|
List<Map> boxIvtPda = this.bstIvtBoxinfoMapper.getBoxIvtPda(whereJson);
|
||||||
|
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
jo.put("data", boxIvtPda);
|
||||||
|
jo.put("message", "查询成功!");
|
||||||
|
return jo;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,4 +35,11 @@ public interface BstIvtBoxinfoMapper extends BaseMapper<BstIvtBoxinfo> {
|
|||||||
* @return List<Map>
|
* @return List<Map>
|
||||||
*/
|
*/
|
||||||
List<Map> getBoxIvtPage(@Param("query") Map query, @Param("pageQuery") Pageable pageQuery);
|
List<Map> getBoxIvtPage(@Param("query") Map query, @Param("pageQuery") Pageable pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询木箱库存(手持)
|
||||||
|
* @param query 查询条件
|
||||||
|
* @return List<Map>
|
||||||
|
*/
|
||||||
|
List<Map> getBoxIvtPda(@Param("query") JSONObject query);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,4 +53,45 @@
|
|||||||
</where>
|
</where>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getBoxIvtPda" resultType="java.util.Map">
|
||||||
|
SELECT
|
||||||
|
box.box_no,
|
||||||
|
box.material_code,
|
||||||
|
box.material_name,
|
||||||
|
box.num,
|
||||||
|
box.box_length,
|
||||||
|
box.box_width,
|
||||||
|
box.box_high,
|
||||||
|
box.box_weight,
|
||||||
|
attr.struct_code,
|
||||||
|
(
|
||||||
|
CASE box.vehicle_type
|
||||||
|
WHEN '1' THEN '小托盘'
|
||||||
|
WHEN '2' THEN '大托盘'
|
||||||
|
END
|
||||||
|
) AS vehicle_type
|
||||||
|
FROM
|
||||||
|
bst_ivt_boxinfo box
|
||||||
|
INNER JOIN st_ivt_structattr attr ON attr.storagevehicle_code = box.box_no
|
||||||
|
<where>
|
||||||
|
box.is_packing = '0'
|
||||||
|
AND attr.lock_type = '1'
|
||||||
|
AND attr.sect_code = 'BZC01'
|
||||||
|
|
||||||
|
<if test="query.material_code != null and query.material_code != ''">
|
||||||
|
AND box.material_code = #{query.material_code}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="query.material_name != null and query.material_name != ''">
|
||||||
|
AND box.material_name LIKE '%${query.material_name}%'
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="query.box_no != null and query.box_no != ''">
|
||||||
|
AND box.box_no LIKE '%${query.box_no}%'
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</where>
|
||||||
|
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user