|
|
|
@ -13,6 +13,7 @@ import com.glxp.api.entity.collect.IoCollectOrderBiz;
|
|
|
|
|
import com.glxp.api.req.collect.CollectOrderBizRequest;
|
|
|
|
|
import com.glxp.api.res.collect.CollectOrderBizResponse;
|
|
|
|
|
import com.glxp.api.service.basic.UdiProductService;
|
|
|
|
|
import com.glxp.api.util.IntUtil;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
@ -38,14 +39,14 @@ public class IoCollectOrderBizService extends ServiceImpl<IoCollectOrderBizMappe
|
|
|
|
|
PageHelper.offsetPage(offset, collectOrderRequest.getLimit());
|
|
|
|
|
}
|
|
|
|
|
List<CollectOrderBizResponse> data = collectOrderBizMapper.filterList(collectOrderRequest);
|
|
|
|
|
if (collectOrderRequest.getIsOrderCheck() == null){
|
|
|
|
|
for (CollectOrderBizResponse collectOrderBizResponse : data){
|
|
|
|
|
if (collectOrderRequest.getIsOrderCheck() == null) {
|
|
|
|
|
for (CollectOrderBizResponse collectOrderBizResponse : data) {
|
|
|
|
|
collectOrderBizResponse.setProductLocation(setProductName(collectOrderBizResponse));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//设置 应该扫码数量 shouldCount
|
|
|
|
|
if (data.size() > 0){
|
|
|
|
|
for (CollectOrderBizResponse collectOrderBizResponse : data){
|
|
|
|
|
if (data.size() > 0) {
|
|
|
|
|
for (CollectOrderBizResponse collectOrderBizResponse : data) {
|
|
|
|
|
List<BasicProductsEntity> productList = basicProductsDao.selectList(
|
|
|
|
|
new LambdaQueryWrapper<BasicProductsEntity>()
|
|
|
|
|
.eq(BasicProductsEntity::getYbbm, collectOrderBizResponse.getYbbm())
|
|
|
|
@ -53,28 +54,28 @@ public class IoCollectOrderBizService extends ServiceImpl<IoCollectOrderBizMappe
|
|
|
|
|
BasicProductsEntity product = productList.get(0);
|
|
|
|
|
Integer myBhxjsl = product.getBhxjsl();
|
|
|
|
|
Integer shouldCount = 0;
|
|
|
|
|
double quotient = (double)collectOrderBizResponse.getCount() / myBhxjsl;
|
|
|
|
|
double quotient = (double) collectOrderBizResponse.getCount() / myBhxjsl;
|
|
|
|
|
int integerPart = (int) quotient;
|
|
|
|
|
if (quotient == integerPart) {
|
|
|
|
|
if (integerPart == 0){
|
|
|
|
|
if (collectOrderBizResponse.getAutoTagStatus() != 2){
|
|
|
|
|
if (integerPart == 0) {
|
|
|
|
|
if (collectOrderBizResponse.getAutoTagStatus() != 2) {
|
|
|
|
|
shouldCount = 1;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
shouldCount = integerPart;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (collectOrderBizResponse.getAutoTagStatus() == 2){
|
|
|
|
|
if (IntUtil.value(collectOrderBizResponse.getAutoTagStatus()) == 2) {
|
|
|
|
|
shouldCount = 0;
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
shouldCount = integerPart + 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
collectOrderBizResponse.setShouldCount(shouldCount);
|
|
|
|
|
if (collectOrderBizResponse.getScanCount() == null){
|
|
|
|
|
if (collectOrderBizResponse.getScanCount() == null) {
|
|
|
|
|
collectOrderBizResponse.setScanCount(0);
|
|
|
|
|
}
|
|
|
|
|
if (collectOrderBizResponse.getScanActCount() == null){
|
|
|
|
|
if (collectOrderBizResponse.getScanActCount() == null) {
|
|
|
|
|
collectOrderBizResponse.setScanActCount(0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -82,8 +83,8 @@ public class IoCollectOrderBizService extends ServiceImpl<IoCollectOrderBizMappe
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String setProductName(CollectOrderBizResponse collectOrderBizResponse){
|
|
|
|
|
if (StrUtil.isEmpty(collectOrderBizResponse.getWorkplaceQueueCode())){
|
|
|
|
|
public String setProductName(CollectOrderBizResponse collectOrderBizResponse) {
|
|
|
|
|
if (StrUtil.isEmpty(collectOrderBizResponse.getWorkplaceQueueCode())) {
|
|
|
|
|
//todo 暂时解决办法
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|