1.修复单据类型候选类型查询无数据问题

master
x_z 3 years ago
parent 338bdf041a
commit a120995e1c

@ -160,7 +160,7 @@ public class BussinessTypeController {
return ResultVOUtils.error(ResultEnum.DATA_ERROR); return ResultVOUtils.error(ResultEnum.DATA_ERROR);
} }
List<BussinessTypeEntity> bussinessTypeEntities = bussinessTypeService.candidateBussinessType(cndidateRequest.getMainAction(), cndidateRequest.getCustomerId()); List<BussinessTypeEntity> bussinessTypeEntities = bussinessTypeService.candidateBussinessType(cndidateRequest.getMainAction(), cndidateRequest.getCustomerId(), cndidateRequest.getCurAction());
//查询补单单据类型 //查询补单单据类型
return ResultVOUtils.success(bussinessTypeEntities); return ResultVOUtils.success(bussinessTypeEntities);
} }

@ -18,6 +18,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List; import java.util.List;
@Slf4j @Slf4j
@ -124,13 +125,21 @@ public class BussinessTypeService {
* @param id * @param id
* @return * @return
*/ */
public List<BussinessTypeEntity> candidateBussinessType(String mainAction, String customerId) { public List<BussinessTypeEntity> candidateBussinessType(String mainAction, String customerId, String curAction) {
if (mainAction.equals(TypeConstant.TYPE_OUT)) { if (mainAction.equals(TypeConstant.TYPE_OUT)) {
mainAction = TypeConstant.TYPE_PUT; mainAction = TypeConstant.TYPE_PUT;
} else { } else {
mainAction = TypeConstant.TYPE_OUT; mainAction = TypeConstant.TYPE_OUT;
} }
return bussinessTypeDao.selectCandidateBussinsessTypes(mainAction, customerId); List<BussinessTypeEntity> bussinessTypeEntities = new ArrayList<>();
if (StrUtil.isNotBlank(curAction)) {
//当前单据类型已经绑定的平衡补单类型
BussinessTypeEntity bussinessTypeEntity = bussinessTypeDao.selectByAction(curAction);
bussinessTypeEntities.add(bussinessTypeEntity);
}
List<BussinessTypeEntity> result = bussinessTypeDao.selectCandidateBussinsessTypes(mainAction, customerId);
bussinessTypeEntities.addAll(result);
return bussinessTypeEntities;
} }
/** /**

Loading…
Cancel
Save